Rev 16120 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !set methtit=Integration by parts |
2 | !set methenv=ZZ QQ RR |
||
3 | !set methparmtype=parm function integrate, function, function |
||
4 | !set methhelp=This method applies integration by parts. |
||
5 | |||
6 | !if $wims_read_parm iswordof form check |
||
16120 | bpr | 7 | !goto $wims_read_parm |
20 | reyssat | 8 | !endif |
9 | |||
10 | !exit |
||
11 | :form |
||
12 | Apply integration by parts on |
||
16120 | bpr | 13 | !read deduc/methparm.phtml 1 |
14 | : |
||
15 | <div class="wimscenter"> |
||
16 | \(integrate(u*v'dx) = u*v - integrate(u'*v dx)) |
||
17 | </div> |
||
18 | <table class="wimsnoborder"> |
||
16135 | bpr | 19 | <tr><td style="text-align:right"> where \(u = ) </td><td> |
16120 | bpr | 20 | !read deduc/methparm.phtml 2,30 |
21 | </td></tr> |
||
16135 | bpr | 22 | <tr><td style="text-align:right"> and \(v = ) </td><td> |
16120 | bpr | 23 | !read deduc/methparm.phtml 3,30 |
24 | </td></tr> |
||
25 | </table> |
||
20 | reyssat | 26 | |
27 | !exit |
||
28 | :check |
||
16120 | bpr | 29 | ker=!item 2 of $methparmobj1 |
30 | ker=!mathsubst integrate= in $ker |
||
31 | ker=!trim $ker |
||
32 | ker=!declosing $ker |
||
33 | !distribute items $ker into iker,ivar |
||
34 | vartest=!varlist $ivar |
||
35 | !if $ivar != $vartest |
||
20 | reyssat | 36 | error=Fail |
37 | !exit |
||
16120 | bpr | 38 | !endif |
20 | reyssat | 39 | |
16120 | bpr | 40 | mout=!exec maxima diff($methparm3,$ivar);\ |
20 | reyssat | 41 | diff($methparm2,$ivar); |
16120 | bpr | 42 | !distribute lines $mout into vprime,uprime |
43 | !if diff isvarof $vprime,$uprime or $vprime=$empty or $uprime=$empty |
||
20 | reyssat | 44 | :bad_data |
45 | error=bad_data |
||
46 | !exit |
||
16120 | bpr | 47 | !endif |
48 | !read deduc/sub/checkzero ($iker)-($methparm2)*($vprime)\ |
||
20 | reyssat | 49 | ($uprime)*($methparm3) |
16120 | bpr | 50 | !distribute lines $out into ztest1,ztest2 |
51 | !if $ztest1=$empty or $ztest2=$empty |
||
20 | reyssat | 52 | !goto bad_data |
16120 | bpr | 53 | !endif |
54 | !if $ztest1!=yes |
||
55 | error=Bad function: \(uv') $m_neq \($iker)! |
||
20 | reyssat | 56 | !advance penalty |
57 | !exit |
||
16120 | bpr | 58 | !endif |
59 | !read deduc/sub/simplify ($methparm2)*($methparm3)\ |
||
20 | reyssat | 60 | ($uprime)*($methparm3) |
16120 | bpr | 61 | !distribute lines $out into uv,uprimev |
62 | !if $ztest2=yes |
||
20 | reyssat | 63 | !if strictintegrate isin $m_options |
16120 | bpr | 64 | error=You don't have the right to take a constant for \(u).\ |
65 | Please change your method. |
||
66 | !exit |
||
20 | reyssat | 67 | !else |
16120 | bpr | 68 | newobject1=($uv) |
20 | reyssat | 69 | !endif |
16120 | bpr | 70 | !else |
20 | reyssat | 71 | newobject1=($uv - integrate($uprimev,$ivar)) |
16120 | bpr | 72 | !endif |
73 | oldobject=1 |
||
74 | methexp=\(u=$methparm2), \(v=$methparm3) |
||
75 | |||
20 | reyssat | 76 | !exit |