Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2071 | zjchen | 1 | |
2 | !goto $wims_read_parm |
||
3 | |||
4 | :def |
||
5 | title=Implicit derivative |
||
6 | synonyme=implicit function differentiation, differentiate implicitly, derivative of implicit function |
||
7 | input=equation |
||
8 | !exit |
||
9 | |||
10 | :proc |
||
11 | |||
12 | formula=!item 1 of $formula |
||
13 | t=!varlist nofn $formula |
||
14 | t=!listintersect $t and p,q,r,s,t,u,v,w,x,y,z,P,Q,R,S,T,U,V,W,X,Y,Z |
||
15 | t=!sort nocase item $t |
||
16 | vcnt=!itemcnt $t |
||
17 | !if $vcnt<2 |
||
18 | error=bad_formula |
||
19 | !exit |
||
20 | !endif |
||
21 | eq== |
||
22 | !if $eq isin $formula |
||
23 | fml=!translate $eq to , in $formula |
||
24 | !distribute items $fml into f1, f2 |
||
25 | !if $f2=$empty |
||
26 | error=bad_formula |
||
27 | !exit |
||
28 | !endif |
||
29 | fml=$f1 - ($f2) |
||
30 | !else |
||
31 | fml=$formula |
||
32 | formula=$formula = 0 |
||
33 | !endif |
||
34 | |||
35 | variable=!items2words $variable |
||
36 | x=!word 1 of $variable |
||
37 | !if $x=$empty |
||
38 | x=!item 1 of $t |
||
39 | !endif |
||
40 | remain=!listcomplement $x in $t |
||
41 | maxima_header=f:$fml;dx:diff(f,$x,1); |
||
42 | |||
43 | msrc= |
||
44 | !for i in $remain |
||
45 | msrc=!append line -dx/diff(f,$i,1); to $msrc |
||
46 | !next i |
||
47 | result=!exec maxima $msrc |
||
48 | !exit |
||
49 | |||
50 | :output |
||
51 | Derivative of the implicit function |
||
52 | !htmlmath $formula |
||
53 | with respect to $x: |
||
54 | <p><center> |
||
55 | !for i=1 to $vcnt-1 |
||
56 | !set v=!item $i of $remain |
||
57 | !set q=!line $i of $result |
||
58 | !if $q!=$empty |
||
59 | !if $vcnt<=2 |
||
60 | <p>d$v/d$x = |
||
61 | !else |
||
62 | <p>$m_partial$v/$m_partial$x = |
||
63 | !endif |
||
64 | !htmlmath $q |
||
65 | !endif |
||
66 | !next i |
||
67 | </center> <p> |
||
68 | !exit |
||
69 |