Rev 16120 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !set methtit=Rewrite an integral |
2 | !set methenv=ZZ QQ RR |
||
3 | !set methparmtype=parm function integrate, function |
||
4 | !set methhelp=You can rewrite the kernel of an integral in an equivalent form. |
||
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 |
||
16120 | bpr | 12 | !reset methparm3 |
13 | !set N=!linecnt $mtobj1 |
||
14 | !if $N=1 |
||
20 | reyssat | 15 | !set l=!item 2 to -1 of $mtobj1 |
16 | !set l=!mathsubst integrate= in $l |
||
17 | !set l=!declosing $l |
||
18 | !set v=!item 2 of $l |
||
16120 | bpr | 19 | !endif |
20 | reyssat | 20 | Rewrite the integration |
16120 | bpr | 21 | !read deduc/methparm.phtml 1 |
20 | reyssat | 22 | in |
16120 | bpr | 23 | <div class="wimscenter"> |
24 | \(integrate()) |
||
25 | !read deduc/methparm.phtml 2,40 |
||
26 | !if $N=1 |
||
20 | reyssat | 27 | d$v |
16120 | bpr | 28 | !else |
29 | d<input size="4" name="methparm3" /> |
||
30 | !endif |
||
31 | </div> |
||
20 | reyssat | 32 | !exit |
33 | :check |
||
16120 | bpr | 34 | ker=!item 2 of $methparmobj1 |
35 | ker=!mathsubst integrate= in $ker |
||
36 | ker=!trim $ker |
||
37 | ker=!declosing $ker |
||
38 | !distribute items $ker into iker,ivar |
||
39 | vartest=!varlist $ivar |
||
40 | !if $ivar != $vartest |
||
20 | reyssat | 41 | error=Fail |
42 | !exit |
||
16120 | bpr | 43 | !endif |
20 | reyssat | 44 | |
16120 | bpr | 45 | methparm3=!word 1 of $methparm3 |
46 | !if $methparm3!=$empty and $methparm3!=$ivar |
||
20 | reyssat | 47 | error=You cannot change the variable name here. Please correct. |
16135 | bpr | 48 | !exit |
49 | !endif |
||
16120 | bpr | 50 | !read deduc/sub/checkzero ($iker)-($methparm2) |
51 | !if $out=$empty |
||
20 | reyssat | 52 | error=bad_data |
53 | !exit |
||
16120 | bpr | 54 | !endif |
55 | !if $out!=yes |
||
20 | reyssat | 56 | error=Bad rewriting. Please correct. |
57 | !exit |
||
16120 | bpr | 58 | !endif |
59 | |||
60 | newobject1=integrate($methparm2,$ivar) |
||
61 | oldobject=1 |
||
62 | methexp=rewriting |
||
20 | reyssat | 63 | !exit |