1 /* this is the integration part of intsce. it can be altered,
2 translated, and incorporated in intsce lisp which contains
3 the top-level routine that does the pattern matching. */
5 sceint(m,n):=block([den,num],modedeclare([m,n],integer),
7 num: if m=0 then (if n=0 then return(ret) else
8 if n=1 then (d*co+b*si)*ex else
9 (d*co+n*b*si)*ex*co^(n-1)+n*(n-1)*b^2*sceint(0,n-2)) else
10 if m=1 then (if n=0 then (d*si-b*co)*ex else
11 if n=1 then (d*si*co+b*si^2-b*co^2)*ex else
12 (d*si*co+n*b*si^2-b*co^2)*co^(n-1)*ex+
13 n*(n-1)*b^2*sceint(1,n-2)) else
15 (if n=0 then (d*si-m*b*co)*ex*si^(m-1)+m*(m-1)*b^2*sceint(m-2,0) else
16 if n=1 then (d*co*si+b*si^2-m*b*co^2)*si^(m-1)*ex+m*(m-1)*b^2*sceint(m-2,1) else
17 (d*si*co+n*b*si^2-m*b*co^2)*si^(m-1)*co^(n-1)*ex+
18 n*(n-1)*b^2*sceint(m,n-2)+m*(m-1)*b^2*sceint(m-2,n)),