1(load("contrib_ode"),0);
20$
3
4/* Test cases for ode1_lie functions */
5
6/* Some exact equations from rtestode */
7
8/* ode2(x^2*cos(x*y)*'diff(y,x) + (sin(x*y)+x*y*(cos(x*y)))=0, y, x); */
9sym:ode1_a(phi:(sin(x*y)+x*y*(cos(x*y)))/(x^2*cos(x*y)),y,x);
10[x,-y];
11symtest(phi,sym[1],sym[2],y,x);
120;
13
14/* ode2( (2*x*y-exp(-2*y))*'diff(y,x)+y=0, y, x); */
15/* sym:ode1_a(phi:-y/(2*x*y-exp(-2*y)),y,x); BAD */
16
17/* ode2( 'diff(y,x)=(y/x)^2+2*(y/x), y, x); */
18sym:ode1_a(phi:(y/x)^2+2*(y/x), y, x); /* %psi_yyy=0 in ode1_a */
19[x^2,-x^2];
20symtest(phi,xi:sym[1],eta:sym[2],y,x);
210;
22mu:lie_integrating_factor(phi,xi,eta);
231/(-y^2-2*x*y-x^2);
24lie_exact(phi,mu,y,x);
25-y/(x*y+x^2) = %c;
26/* and the whole process */
27ans:ode1_lie(phi,y,x);
28-y/(x*y+x^2) = %c;
29ode_check('diff(y,x)=phi,first(solve(ans,y)));
300;
31