## maxima-commits

 [Maxima-commits] CVS: maxima/share/contrib/diffequations/tests rtestode_kamke_1_1.mac, 1.15, 1.16 From: David Billinghurst - 2007-02-27 20:13:08 Update of /cvsroot/maxima/maxima/share/contrib/diffequations/tests In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26669 Modified Files: rtestode_kamke_1_1.mac Log Message: Remove additional code to check Bessel function solutions. This is now done within ode_check(). Index: rtestode_kamke_1_1.mac =================================================================== RCS file: /cvsroot/maxima/maxima/share/contrib/diffequations/tests/rtestode_kamke_1_1.mac,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- rtestode_kamke_1_1.mac 26 Feb 2007 09:47:51 -0000 1.15 +++ rtestode_kamke_1_1.mac 27 Feb 2007 20:13:03 -0000 1.16 @@ -15,28 +15,6 @@ (pn_(n_):=print("Kamke ODE 1.",n_),true); true; -/* Need these indentities to check solutions */ -besjident(n,x):=bessel_j(n,x)=2*(n-1)*bessel_j(n-1,x)/x-bessel_j(n-2,x); -besjident(n,x):=bessel_j(n,x)=2*(n-1)*bessel_j(n-1,x)/x-bessel_j(n-2,x); -besiident(n,x):=bessel_i(n,x)=-2*(n-1)*bessel_i(n-1,x)/x+bessel_i(n-2,x); -besiident(n,x):=bessel_i(n,x)=-2*(n-1)*bessel_i(n-1,x)/x+bessel_i(n-2,x); -beskident(n,x):=bessel_k(n,x)=2*(n-1)*bessel_k(n-1,x)/x+bessel_k(n-2,x); -beskident(n,x):=bessel_k(n,x)=2*(n-1)*bessel_k(n-1,x)/x+bessel_k(n-2,x); - -/* Another way to simplify Bessel function solutions */ -(besjysimp(e,n,x):=block([expr], - expr:subst(2*(n-1)*bessel_j(n-1,x)/x-bessel_j(n-2,x),bessel_j(n,x),e), - expr:subst(2*(n-1)*bessel_y(n-1,x)/x-bessel_y(n-2,x),bessel_y(n,x),expr), - ratsimp(expr)), 0); -0; -/* Apply besjysimp for order n and n-1 */ -(besjysimp2(e,n,x):=block([expr:besjysimp(e,n,x)],besjysimp(expr,n-1,x)), 0); -0; -/* Apply besjysimp for order n, n-1 and n-2 */ -(besjysimp3(e,n,x):=block([expr:besjysimp(e,n,x)], - expr:besjysimp(expr,n-1,x),besjysimp(expr,n-2,x)), 0); -0; - /* 1 */ (pn_(1),ans:contrib_ode(eqn:'diff(y,x)-(a4*x^4+a3*x^3+a2*x^2+a1*x+a0)^(-1/2),y,x)); [y = 'integrate(1/sqrt(a4*x^4+a3*x^3+a2*x^2+a1*x+a0),x)+%c]; @@ -132,7 +110,7 @@ +2*bessel_j(1/3,2*%i*(a*x+b)^(3/2)/(3*a)))*a*x*sqrt(a*x+b) +(2*bessel_y(1/3,2*%i*(a*x+b)^(3/2)/(3*a))*%c +2*bessel_j(1/3,2*%i*(a*x+b)^(3/2)/(3*a)))*b*sqrt(a*x+b))]; -[method,besjysimp3(ode_check(eqn,ans[1]),7/3,sqrt(a*x+b)*(2*%i*a*x+2*%i*b)/(3*a))]; +[method,ode_check(eqn,ans[1])]; [riccati,0]; /* 14 - The constraints need some work @@ -315,7 +293,7 @@ -%c*bessel_y(a-1,2*sqrt(-x))-bessel_j(a-1,2*sqrt(-x)))*sqrt(-x) +a*(%c*bessel_y(a,2*sqrt(-x))+bessel_j(a,2*sqrt(-x))))*x^a /(2*%c*bessel_y(a,2*sqrt(-x))+2*bessel_j(a,2*sqrt(-x)))]; -[method,besjysimp3(ode_check(eqn,ans[1]),a+2,2*sqrt(-x))]; +[method,ode_check(eqn,ans[1])]; [riccati,0]; /* 31 */ @@ -644,7 +622,7 @@ /* 95 */ (pn_(95),ans:contrib_ode(eqn:x*'diff(y,x)+y^2+x^2,y,x)); [y=-(bessel_y(1,x)*%c+bessel_j(1,x))*x/(bessel_y(0,x)*%c+bessel_j(0,x))]; -[method,besjysimp(ode_check(eqn,ans[1]),2,x)]; +[method,ode_check(eqn,ans[1])]; [riccati,0]; /* 96 */ @@ -683,17 +661,8 @@ -bessel_i(-1/4,sqrt(a)*sqrt(c)*x^2/2))*sqrt(c)*x^2 /((bessel_k(3/4,sqrt(a)*sqrt(c)*x^2/2)*%c +bessel_i(3/4,sqrt(a)*sqrt(c)*x^2/2))*sqrt(a))]; -ode_check(eqn,ans[1]); -((bessel_i(-5/4,sqrt(a)*sqrt(c)*x^2/2) - -bessel_i(3/4,sqrt(a)*sqrt(c)*x^2/2))*a*c*x^4 - +bessel_i(-1/4,sqrt(a)*sqrt(c)*x^2/2)*sqrt(a)*sqrt(c)*x^2) - /((bessel_k(3/4,sqrt(a)*sqrt(c)*x^2/2)*%c - +bessel_i(3/4,sqrt(a)*sqrt(c)*x^2/2))*a); -expand(ev(%,besiident(3/4,sqrt(a)*sqrt(c)*x^2/2), - beskident(3/4,sqrt(a)*sqrt(c)*x^2/2))); -0; -method; -riccati; +[method,ode_check(eqn,ans[1])]; +[riccati,0]; (kill(beta,b),forget(a>0,c>0),done); done; @@ -705,10 +674,7 @@ +bessel_j(2,2*sqrt(a)*sqrt(x))-bessel_j(0,2*sqrt(a)*sqrt(x)))*sqrt(a)*sqrt(x) -bessel_y(1,2*sqrt(a)*sqrt(x))*%c-bessel_j(1,2*sqrt(a)*sqrt(x))) /((2*bessel_y(1,2*sqrt(a)*sqrt(x))*%c+2*bessel_j(1,2*sqrt(a)*sqrt(x)))*x)]; -[method,besjysimp2(ode_check(eqn,ans[1]),3,2*sqrt(a)*sqrt(x))]; +[method,ode_check(eqn,ans[1])]; [riccati,0]; forget(a>0); [a>0]; - -(kill(besjident,besiident,beskident,besjysimp,besjysimp3,besjysimp3),done); -done;

No, thanks