1 (load("contrib_ode"),0);
4 /* ODE tests - Equations 1-100
7 E Kamke, Differentialgleichungen Losungsmethoden und Losungen,
8 Vol 1, Geest & Portig, Leipzig, 1961
10 E. S. Cheb-Terrab, T. Koloknikov, First Order ODEs,
11 Symmetries and Linear Transformations, European Journal of
12 Applied Mathematics, Vol. 14, No. 2, pp. 231-246 (2003).
13 (http://lie.uwaterloo.ca/papers/ode_iv.pdf)
15 /* Don't kill(all); It messes up trigsimp */
18 (pn_(n_):=print("Kamke ODE 1.",n_),true);
22 (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));
23 [y = 'integrate(1/sqrt(a4*x^4+a3*x^3+a2*x^2+a1*x+a0),x)+%c];
24 [method,ode_check(eqn,ans[1])];
28 (pn_(2),ans:contrib_ode(eqn:'diff(y,x)+a*y-c*exp(b*x),y,x));
29 [y = %e^-(a*x)*(c*%e^(b*x+a*x)/(b+a)+%c)];
30 [method,ode_check(eqn,ans[1])];
34 (pn_(3),ans:contrib_ode(eqn:'diff(y,x)+a*y-b*sin(c*x),y,x));
35 [y=%e^-(a*x)*(b*%e^(a*x)*(a*sin(c*x)-c*cos(c*x))/(c^2+a^2)+%c)];
36 [method,ode_check(eqn,ans[1])];
40 (pn_(4),ans:contrib_ode(eqn:'diff(y,x)+2*x*y-x*exp(-x^2),y,x));
41 [y=(x^2/2+%c)*%e^-x^2];
42 [method,ode_check(eqn,ans[1])];
46 (pn_(5),ans:contrib_ode(eqn:'diff(y,x)+y*cos(x)-exp(2*x),y,x));
47 [y=%e^-sin(x)*('integrate(%e^(sin(x)+2*x),x)+%c)];
48 [method,ode_check(eqn,ans[1])];
52 (pn_(6),ans:contrib_ode(eqn:'diff(y,x)+y*cos(x)-sin(2*x)/2,y,x));
53 [y=%e^-sin(x)*((sin(x)-1)*%e^sin(x)+%c)];
54 [method,ode_check(eqn,ans[1])];
58 (pn_(7),ans:contrib_ode(eqn:'diff(y,x)+y*cos(x)-exp(-sin(x)),y,x));
59 [y = (x+%c)*%e^-sin(x)];
60 [method,ode_check(eqn,ans[1])];
64 (pn_(8),ans:contrib_ode(eqn: 'diff(y,x) + y*tan(x) - sin(2*x),y,x));
65 [y = (%c-2*cos(x))/sec(x)];
66 [method,ode_check(eqn,ans[1])];
70 (pn_(9),ans:contrib_ode(eqn:'diff(y,x)-(sin(log(x))+cos(log(x))+a)*y,y,x));
71 [y=%c*%e^(x*(sin(log(x))+cos(log(x)))/2+x*(sin(log(x))-cos(log(x)))/2+a*x)];
72 [method,ode_check(eqn,ans[1])];
76 (pn_(10),ans:contrib_ode(eqn: 'diff(y,x) + 'diff(f(x),x)*y - f(x)*'diff(f(x),x),y,x));
77 [y=%e^-f(x)*('integrate(f(x)*%e^f(x)*'diff(f(x),x,1),x)+%c)];
78 [method,ode_check(eqn,ans[1])];
82 (pn_(11),ans:contrib_ode(eqn: 'diff(y,x) + f(x)*y - g(x),y,x));
83 [y = %e^-('integrate(f(x),x))*('integrate(g(x)*%e^'integrate(f(x),x),x)+%c)];
84 [method,ode_check(eqn,ans[1])];
88 (pn_(12),ans:contrib_ode(eqn:'diff(y,x) + y^2 - 1,y,x));
89 [(log(y+1)-log(y-1))/2=x+%c];
90 solve(map(exp,2*ans[1]),y);
91 [y = (%e^(2*x+2*%c)+1)/(%e^(2*x+2*%c)-1)];
92 [method,ode_check(eqn,%[1])];
95 /* 13 - Riccati eqn */
96 (pn_(13),ans:contrib_ode(eqn:'diff(y,x) + y^2 - a*x - b,y,x),0);
99 [y = -(((-bessel_y(1/3,2*%i*(a*x+b)^(3/2)/(3*a))*%c
100 -bessel_j(1/3,2*%i*(a*x+b)^(3/2)/(3*a)))*a*sqrt(a*x+b)
101 +%i*((bessel_y(4/3,2*%i*(a*x+b)^(3/2)/(3*a))
102 -bessel_y(-(2/3),2*%i*(a*x+b)^(3/2)/(3*a)))*%c
103 +bessel_j(4/3,2*%i*(a*x+b)^(3/2)/(3*a))
104 -bessel_j(-(2/3),2*%i*(a*x+b)^(3/2)/(3*a)))*a^2*x^2
105 +%i*((2*bessel_y(4/3,2*%i*(a*x+b)^(3/2)/(3*a))
106 -2*bessel_y(-(2/3),2*%i*(a*x+b)^(3/2)/(3*a)))*%c
107 +2*bessel_j(4/3,2*%i*(a*x+b)^(3/2)/(3*a))
108 -2*bessel_j(-(2/3),2*%i*(a*x+b)^(3/2)/(3*a)))*a*b*x
109 +%i*((bessel_y(4/3,2*%i*(a*x+b)^(3/2)/(3*a))
110 -bessel_y(-(2/3),2*%i*(a*x+b)^(3/2)/(3*a)))*%c
111 +bessel_j(4/3,2*%i*(a*x+b)^(3/2)/(3*a))
112 -bessel_j(-(2/3),2*%i*(a*x+b)^(3/2)/(3*a)))*b^2)
113 /((2*bessel_y(1/3,2*%i*(a*x+b)^(3/2)/(3*a))*%c
114 +2*bessel_j(1/3,2*%i*(a*x+b)^(3/2)/(3*a)))*a*x*sqrt(a*x+b)
115 +(2*bessel_y(1/3,2*%i*(a*x+b)^(3/2)/(3*a))*%c
116 +2*bessel_j(1/3,2*%i*(a*x+b)^(3/2)/(3*a)))*b*sqrt(a*x+b)))];
118 /* FIXME: bind stack overflow when checking 2015-04-06
119 [method,ode_check(eqn,ans[1])];
123 /* 14 - The constraints need some work
124 want m # -2, rather than m > -2 */
127 (pn_("14i"),ans:contrib_ode(eqn: 'diff(y,x) + y^2 + a*x^m,y,x),0);
130 [y = -((sqrt(a)*(bessel_j((m+3)/(m+2),2*sqrt(a)*x^(m/2+1)/(m+2))
131 -%c*bessel_j(-((m+3)/(m+2)),2*sqrt(a)*x^(m/2+1)/(m+2))
132 +%c*bessel_j((m+1)/(m+2),2*sqrt(a)*x^(m/2+1)/(m+2))
133 -bessel_j(-((m+1)/(m+2)),2*sqrt(a)*x^(m/2+1)/(m+2)))*x^(m/2+1)
134 -bessel_j(1/(m+2),2*sqrt(a)*x^(m/2+1)/(m+2))
135 -%c*bessel_j(-(1/(m+2)),2*sqrt(a)*x^(m/2+1)/(m+2)))
136 /((2*bessel_j(1/(m+2),2*sqrt(a)*x^(m/2+1)/(m+2))
137 +2*%c*bessel_j(-(1/(m+2)),2*sqrt(a)*x^(m/2+1)/(m+2)))*x))];
139 [method,ratsimp(ode_check(eqn,ans[1]))];
146 (pn_("14ii"),ans:contrib_ode(eqn: 'diff(y,x) + y^2 + a*x^m,y,x),0);
149 [y = -(sqrt(-a)*(%c*bessel_k((m+1)/(m+2),2*sqrt(-a)*x^(m/2+1)/(m+2))-bessel_i(-((m+1)/(m+2)),2*sqrt(-a)*x^(m/2+1)/(m+2)))*x^(m/2)/(%c*bessel_k(1/(m+2),2*sqrt(-a)*x^(m/2+1)/(m+2))+bessel_i(1/(m+2),2*sqrt(-a)*x^(m/2+1)/(m+2))))];
151 [method,ratsimp(ode_check(eqn,ans[1]))];
156 (m:-2,assume(a > 1/4));
158 (pn_("14iii"),ans:contrib_ode(eqn: 'diff(y,x) + y^2 + a*x^m,y,x));
159 [ x = %c*%e^-(2*atan((2*x*y-1)/sqrt(4*a-1))/sqrt(4*a-1))];
160 solve(map(log,ans[1]/%c),y);
161 [y = -((sqrt(4*a-1)*tan(sqrt(4*a-1)*log(x/%c)/2)-1)/(2*x))];
162 [method,ode_check(eqn,%[1])];
164 (kill(m),forget(a > 1/4));
167 (m:-2,assume(a < 1/4));
169 (pn_("14iv"),ans:contrib_ode(eqn: 'diff(y,x) + y^2 + a*x^m,y,x));
170 [x=%c*%e^-(log(-((-2*x*y+sqrt(1-4*a)+1)/(2*x*y+sqrt(1-4*a)-1)))/sqrt(1-4*a))];
171 solve(map(log,ans[1]/%c),y);
172 [y = ((sqrt(1-4*a)+1)*%e^(sqrt(1-4*a)*log(x/%c))+sqrt(1-4*a)-1)/(2*x*%e^(sqrt(1-4*a)*log(x/%c))-2*x)];
173 [method,ode_check(eqn,%[1])];
175 (kill(m),forget(a < 1/4));
178 /* 15 This is a Riccati eqn */
179 (pn_(15),ans:contrib_ode(eqn:'diff(y,x) + y^2 - 2*x^2*y + x^4 -2*x-1,y,x));
180 [y = (x^2*(%c*%e^(2*x)+1)+%c*%e^(2*x)-1)/(%c*%e^(2*x)+1)];
181 [method,ode_check(eqn,ans[1])];
184 /* 16 This is a Riccati eqn */
185 (pn_(16),ans:contrib_ode(eqn:'diff(y,x) + y^2 +(x*y-1)*f(x),y,x));
186 [[y='diff(%u,x,1)/%u,-'diff(%u,x,1)*x*f(x)+%u*f(x)-'diff(%u,x,2)=0]];
191 (pn_(17),ans:contrib_ode(eqn:'diff(y,x) - y^2 -3*y + 4,y,x));
192 [-((log(y+4)-log(y-1))/5) = x+%c];
193 solve(map(exp,ans[1]*5),y);
194 [y = -((4*%e^(5*x+5*%c)+1)/(%e^(5*x+5*%c)-1))];
195 [method,ode_check(eqn,%[1])];
199 (pn_(18),ans:contrib_ode(eqn:'diff(y,x)-y^2-x*y-x+1,y,x),0);
202 [y = -(%e^-(2*x)*(%e^(2*x)*(sqrt(2)*sqrt(%pi)*%c
203 *erf((%i*x-2*%i)/sqrt(2))
204 +sqrt(2)*%e^2*sqrt(%pi))
205 +2*%i*%c*%e^(x^2/2+2))
206 /(sqrt(2)*sqrt(%pi)*%c*erf((%i*x-2*%i)/sqrt(2))+sqrt(2)*%e^2*sqrt(%pi)))];
208 [method,ode_check(eqn,ans[1])];
212 (pn_(19),ans:contrib_ode(eqn:'diff(y,x) - (y + x)^2,y,x));
213 [[x=%c-atan(sqrt(%t)),y=-x-sqrt(%t)],[x=atan(sqrt(%t))+%c,y=sqrt(%t)-x]];
215 solve(ans[1][2],sqrt(%t));
219 ans[1]:first(solve(%,y));
221 solve(ans[2][2],sqrt(%t));
225 ans[2]:first(solve(%,y));
228 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
232 (pn_(20),ans:contrib_ode(eqn:'diff(y,x)-y^2+(x^2+1)*y-2*x,y,x));
233 [y = ((x^2+1)*'integrate(%e^(x^3/3+x),x)-%e^(x^3/3+x)+%c*x^2+%c)/('integrate(%e^(x^3/3+x),x)+%c)];
234 [method,ode_check(eqn,ans[1])];
238 (pn_(21),ans:contrib_ode(eqn:'diff(y,x)-y^2+y*sin(x)-cos(x),y,x));
239 [y = (%e^cos(x)*sin(x)*'integrate(%e^-cos(x),x)+%c*%e^cos(x)*sin(x)-1)/(%e^cos(x)*'integrate(%e^-cos(x),x)+%c*%e^cos(x))];
240 [method,ode_check(eqn,ans[1])];
244 (pn_(22),ans:contrib_ode(eqn:'diff(y,x)-y^2-y*sin(2*x)-cos(2*x),y,x));
245 [[y=-'diff(%u,x,1)/%u,-'diff(%u,x,1)*sin(2*x)+%u*cos(2*x)+'diff(%u,x,2)=0]];
250 (pn_(23),ans:contrib_ode(eqn:'diff(y,x) + a*y^2 - b,y,x));
251 [-(log(-((sqrt(a)*sqrt(b)-a*y)/(a*y+sqrt(a)*sqrt(b))))/(2*sqrt(a)*sqrt(b)))=x+%c];
252 solve(map(exp,2*sqrt(a)*sqrt(b)*ans[1]),y);
253 [y=sqrt(b)*(%e^(2*sqrt(a)*sqrt(b)*x+2*%c*sqrt(a)*sqrt(b))+1)/(sqrt(a)*(%e^(2*sqrt(a)*sqrt(b)*x+2*%c*sqrt(a)*sqrt(b))-1))];
254 [method,ode_check(eqn,%[1])];
260 assume(nu>-2,a>0,b>0);
262 (pn_(24),ans:contrib_ode(eqn:'diff(y,x) + a*y^2 - b*x^nu,y,x),0);
265 [y = -(sqrt(a)*sqrt(b)*(%c*bessel_k((nu+1)/(nu+2),2*sqrt(a)*sqrt(b)*x^(nu/2+1)/(nu+2))-bessel_i(-((nu+1)/(nu+2)),2*sqrt(a)*sqrt(b)*x^(nu/2+1)/(nu+2)))*x^(nu/2)/(%c*a*bessel_k(1/(nu+2),2*sqrt(a)*sqrt(b)*x^(nu/2+1)/(nu+2))+a*bessel_i(1/(nu+2),2*sqrt(a)*sqrt(b)*x^(nu/2+1)/(nu+2))))];
267 [method,ratsimp(ode_check(eqn,ans[1]))];
269 forget(nu>-2,a>0,b>0);
272 /* 25 - This is a Riccati equation */
273 (pn_(25),ans:contrib_ode(eqn:'diff(y,x)+a*y^2-b*x^(2*nu)-c*x^(nu-1),y,x));
274 [[y='diff(%u,x,1)/(%u*a),%u*a^2*(b*x^(2*nu)+c*x^(nu-1))-'diff(%u,x,2)*a=0]];
279 (pn_(26),ans:contrib_ode(eqn:'diff(y,x)-(A*y- a)*(B*y-b),y,x));
280 [((log(B*y-b)-log(A*y-a))/(A*b-a*B)) = x+%c];
281 [method,ode_check(eqn,ans[1])];
284 /* 27 - also Murphy 1.62*/
285 (pn_(27),ans:contrib_ode(eqn:'diff(y,x) + a*y*(y-x) - 1,y,x),0);
286 /* [y = (sqrt(%pi)*a*x*%e^(a*x^2/2)*erf(sqrt(a)*x/sqrt(2))
287 +sqrt(a)*(sqrt(2)*%c*a*x*%e^(a*x^2/2)+sqrt(2)))
288 /(sqrt(%pi)*a*%e^(a*x^2/2)*erf(sqrt(a)*x/sqrt(2))
289 +sqrt(2)*%c*a^(3/2)*%e^(a*x^2/2))]; */
291 [method,ode_check(eqn,ans[1])];
295 (pn_(28),ans:contrib_ode(eqn:'diff(y,x)+x*y^2-x^3*y-2*x,y,x));
296 [y = %e^-(x^4/4)*(x^2*%e^(x^4/4)*(sqrt(%pi)*%c*erf(x^2/2)+sqrt(%pi))+2*%c)
297 /(sqrt(%pi)*%c*erf(x^2/2)+sqrt(%pi))];
298 [method,ode_check(eqn,ans[1])];
302 (pn_(29),ans:contrib_ode(eqn:'diff(y,x) - x*y^2 - 3*x*y,y,x));
303 [-((log(y+3)-log(y))/3) = x^2/2+%c];
304 solve(map(exp,3*ans[1]),y);
305 [y = -3*%e^(3*x^2/2+3*%c)/(%e^(3*x^2/2+3*%c)-1)];
306 [method,ode_check(eqn,%[1])];
310 (pn_(30),ans:contrib_ode(eqn:'diff(y,x)+x^(-a-1)*y^2-x^a,y,x));
311 [y = -(((%c*bessel_y(a+1,2*sqrt(-x))+bessel_j(a+1,2*sqrt(-x))
312 -%c*bessel_y(a-1,2*sqrt(-x))-bessel_j(a-1,2*sqrt(-x)))*sqrt(-x)
313 +a*(%c*bessel_y(a,2*sqrt(-x))+bessel_j(a,2*sqrt(-x))))*x^a
314 /(2*%c*bessel_y(a,2*sqrt(-x))+2*bessel_j(a,2*sqrt(-x))))];
315 [method,ode_check(eqn,ans[1])];
321 (pn_(31),ans:contrib_ode(eqn:'diff(y,x) - a*x^n*(y^2+1),y,x));
322 [atan(y)/a = x^(n+1)/(n+1)+%c];
324 [y = tan(a*x^(n+1)/(n+1)+%c*a*n/(n+1)+%c*a/(n+1))];
325 [method,ode_check(eqn,%[1])];
330 /* 32 - FIXME: Why the %i in the solution? */
333 (pn_(32),ans:contrib_ode(eqn:'diff(y,x) + y^2*sin(x) - 2*sin(x)/cos(x)^2,y,x));
334 [y = ((3*%c-%i)*sinh(3*log(cos(x))/2)+(%c-3*%i)*cosh(3*log(cos(x))/2))/(2*%i*cos(x)*sinh(3*log(cos(x))/2)-2*%c*cos(x)*cosh(3*log(cos(x))/2))];
335 [method,ode_check(eqn,ans[1])];
341 (pn_(33),ans:contrib_ode(eqn:'diff(y,x)-y^2*'diff(f(x),x)/g(x)+'diff(g(x),x)/f(x),y,x));
342 [[y = -'diff(%u,x,1)*g(x)/(%u*'diff(f(x),x,1)),-'diff(%u,x,1)*('diff(f(x),x,2)/g(x)-'diff(f(x),x,1)*'diff(g(x),x,1)/g(x)^2)-%u*('diff(f(x),x,1))^2*'diff(g(x),x,1)/(f(x)*g(x)^2)+'diff(%u,x,2)*'diff(f(x),x,1)/g(x)=0]];
347 (pn_(34),ans:contrib_ode(eqn:'diff(y,x)+f(x)*y^2+g(x)*y,y,x));
348 [y=%e^-('integrate(g(x),x))/('integrate(f(x)*%e^-'integrate(g(x),x),x)+%c)];
349 [method,ode_check(eqn,ans[1])];
355 (pn_(35),ans:contrib_ode(eqn:'diff(y,x)+f(x)*(y^2+2*a*y+b),y,x));
356 [-(log(-((-y+sqrt(a^2-b)-a)/(y+sqrt(a^2-b)+a)))/(2*sqrt(a^2-b)))='integrate(f(x),x)+%c];
357 solve(map(exp,2*sqrt(a^2-b)*ans[1]),y);
358 [y=(sqrt(a^2-b)*(%e^(2*sqrt(a^2-b)*'integrate(f(x),x)+2*%c*sqrt(a^2-b))+1)+a*(1-%e^(2*sqrt(a^2-b)*'integrate(f(x),x)+2*%c*sqrt(a^2-b))))/(%e^(2*sqrt(a^2-b)*'integrate(f(x),x)+2*%c*sqrt(a^2-b))-1)];
359 [method,ode_check(eqn,%[1])];
365 (pn_(36),ans:contrib_ode(eqn:'diff(y,x) + y^3 + a*x*y^2,y,x));
369 (pn_(37),ans:contrib_ode(eqn:'diff(y,x)-y^3-a*exp(x)*y^2,y,x));
372 /* Kamke 38 - Chini invariant constant - 1/(8*a*b^2)
374 One integrable case is a:-1/6 b:1/3
376 (pn_(38),a:-1/6,b:1/3,ans:contrib_ode(eqn:'diff(y,x) - a*y^3 - b*x^(-3/2),y,x));
377 [x = %c*%e^((sqrt(x)*(2*y*log(sqrt(x)*y+1)-2*y*log(sqrt(x)*y-2))+2*log(sqrt(x)*y+1)-2*log(sqrt(x)*y-2)-6)/(3*sqrt(x)*y+3))];
384 (pn_(39),ans:contrib_ode(eqn:'diff(y,x)-a3*y^3-a2*y^2-a1*y-a0,y,x));
385 ['integrate(1/(a3*y^3+a2*y^2+a1*y+a0),y)=x+%c];
388 (pn_(40),ans:contrib_ode(eqn:'diff(y,x)+3*a*y^3+6*a*x*y^2,y,x));
394 (pn_(41),ans:contrib_ode(eqn:'diff(y,x)+a*x*y^3+b*y^2,y,x));
395 [x=%c*%e^-((b*log(-((-2*a*x*y+sqrt(b^2+4*a)-b)/(2*a*x*y+sqrt(b^2+4*a)+b)))+sqrt(b^2+4*a)*(log(a*x^2*y^2+b*x*y-1)-2*log(x*y)))/(2*sqrt(b^2+4*a)))];
402 (pn_(42),ans:contrib_ode(eqn:'diff(y,x)-x*(x+2)*y^3-(x+3)*y^2,y,x));
406 (pn_(43),ans:contrib_ode(eqn:'diff(y,x)+(3*a*x^2+4*a^2*x+b)*y^3+3*x*y^2,y,x));
410 (pn_(44),ans:contrib_ode(eqn:'diff(y,x)+2*a*x^3*y^3+2*x*y,y,x));
411 [y=%e^-x^2/sqrt(%c-a*(2*x^2+1)*%e^-(2*x^2)/2)];
412 [method,ode_check(eqn,ans[1])];
416 (pn_(45),ans:contrib_ode(eqn:'diff(y,x)+2*(a^2*x^3-b^2*x)*y^3+3*b*y^2,y,x));
419 /* 46 Abel eqn with relative invariant = 0 */
420 (kn_("46i"),a:1,ans:contrib_ode(eqn:'diff(y,x)- x^a*y^3+3*y^2-x^(-a)*y-x^(-2*a)+ a*x^(-a-1),y,x));
421 [x = %c*%e^-((2*log(x*y-1)-log(x*y-2)-log(x*y))/2)];
422 /* This doesn't work. Bug is ode_check?? ***FIXME***
423 [method,ode_check(eqn,ans[1])];
426 x^2 = %c^2*x*y*(x*y-2)/(x*y-1)^2;
428 [y = (%c*sqrt(%c^2-x^2)+x^2-%c^2)/(x^3-%c^2*x), y = -((%c*sqrt(%c^2-x^2)-x^2+%c^2)/(x^3-%c^2*x))];
429 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
434 (pn_("46ii"),assume(a>1),ans:contrib_ode(eqn:'diff(y,x) - x^a*y^3 + 3*y^2 - x^(-a)*y -x^(-2*a) + a*x^(-a-1),y,x));
435 [y=%e^-(2*x^(1-a)/(1-a))/sqrt(2*(a-1)^((a+1)/(1-a))
436 *gamma_incomplete((a+1)/(1-a),-4*x^(1-a)/(a-1))*x^(a+1)
437 /((1-a)*4^((a+1)/(1-a))*(-x^(1-a))^((a+1)/(1-a)))+%c)+1/x^a];
438 [method,ode_check(eqn,ans[1])];
443 /* 47 - Too general - E S Cheb-Terrab and T Kolokolnikov */
444 /* 48 - Too general - E S Cheb-Terrab and T Kolokolnikov */
446 /* 50 - Too general - E S Cheb-Terrab and T Kolokolnikov */
447 /* 51 infinite run time */
449 /* 52 Asks if n is integer */
450 /* (pn_(52),ans:'diff(y,x)-a*y^n-b*x^(n/(1-n)),y,x)); */
453 /* (pn_(53),ans:contrib_ode(eqn:'diff(y,x)-f(x)^(1-n)*'diff(g(x),x)*y^n/(a*g(x)+b)^n-'diff(f(x),x)*y/f(x)-f(x)*'diff(g(x),x),y,x));
457 /* (pn_(54),ans:contrib_ode(eqn:'diff(y,x)-a^n*f(x)^(1-n)*'diff(g(x),x)*y^n-'diff(f(x),x)*y/f(x)-f(x)*'diff(g(x),x),y,x));
460 /* 55 - Too general - E S Cheb-Terrab and T Kolokolnikov */
461 /* 56 - Too general - E S Cheb-Terrab and T Kolokolnikov */
464 (pn_(57),ans:contrib_ode(eqn:'diff(y,x)-sqrt(abs(y)),y,x));
465 ['integrate(1/sqrt(abs(y)),y)=x+%c];
466 [method,ode_check(eqn,ans[1])];
470 assume((8*b+a^2)>0,x>0);
472 (pn_(58),ans:contrib_ode(eqn:'diff(y,x)-a*sqrt(y)-b*x,y,x));
473 [x=%c*%e^-(((sqrt(8*b+a^2)*log(-((-2*y+a*x*sqrt(y)+b*x^2)/x^2))+a*log(-((-4*sqrt(y)+sqrt(8*b+a^2)*x+a*x)/(4*sqrt(y)+sqrt(8*b+a^2)*x-a*x))))/(2*sqrt(8*b+a^2))))];
474 forget((8*b+a^2)>0,x>0);
478 (pn_(59),ans:contrib_ode(eqn:'diff(y,x)-a*sqrt(y^2+1)-b,y,x));
479 ['integrate(1/(a*sqrt(y^2+1)+b),y) = x+%c];
480 /* maxima no longer integrates this 2006-09-02
483 ans[1],abs,integrate;
485 [method,ode_check(eqn,%)];
491 (pn_(60),ans:contrib_ode(eqn:'diff(y,x)-sqrt(y^2-1)/sqrt(x^2-1),y,x));
492 [log(2*sqrt(y^2-1)+2*y)=log(2*sqrt(x^2-1)+2*x)+%c];
493 [method,ode_check(eqn,ans[1])];
497 (pn_(61),ans:contrib_ode(eqn:'diff(y,x)-sqrt(x^2-1)/sqrt(y^2-1),y,x));
498 [(y*sqrt(y^2-1)-log(2*sqrt(y^2-1)+2*y))/2=(x*sqrt(x^2-1)-log(2*sqrt(x^2-1)+2*x))/2+%c];
499 [method,ode_check(eqn,ans[1])];
502 /* 62 "infinite" run time */
505 (pn_(63),ans:contrib_ode(eqn:'diff(y,x)-(1+ y^2)/(abs(y+sqrt(1+y))*sqrt(1+x)^3),y,x));
506 ['integrate(abs(sqrt(y+1)+y)/(y^2+1),y)= %c-2/sqrt(x+1)];
507 [method,ode_check(eqn,%)];
511 /* Used to pass but now fails due to integration problems.
512 Almost certainly related to bug # 1487703
514 assume(a>0,b>0,4*a*c>b^2);
516 (pn_(64),ans:contrib_ode(eqn: 'diff(y,x)-sqrt((a*y^2+b*y+c)/(a*x^2+b*x+c)),y,x));
517 [(sqrt(a)*sqrt(2*a*y^2+2*b*y+2*c)*asinh((4*a*y+2*b)/sqrt(16*a*c-4*b^2))-sqrt(2)*sqrt(a)*asinh((2*a*x+b)/sqrt(4*a*c-b^2))*sqrt(a*y^2+b*y+c))/(sqrt(2)*a*sqrt(2*a*y^2+2*b*y+2*c))=%c];
520 forget(a>0,b>0,4*a*c>b^2);
525 (pn_(65),ans:contrib_ode(eqn:'diff(y,x)-sqrt((y^3+1)/(x^3+1)),y,x));
526 [-((sqrt(2*y^3+2)*'integrate((3*y^2*'integrate(sqrt((y^3+1)/(x^3+1)),x)+(-3*y^5-3*y^2)*'integrate(1/((x^3+1)*sqrt((y^3+1)/(x^3+1))),x)-2*y^3-2)/(2*y^3+2)^(3/2),y)+'integrate(sqrt((y^3+1)/(x^3+1)),x))/sqrt(2*y^3+2))=%c];
531 (pn_(66),ans:contrib_ode(eqn:'diff(y,x)-sqrt(abs(y*(1-y)*(1-a*y)))/sqrt(abs(x*(1-x)*(1-a*x))),y,x));
532 ['integrate(1/(sqrt(abs(y-1))*sqrt(abs(y))*sqrt(abs(a*y-1))),y)='integrate(1/(sqrt(abs(x-1))*sqrt(abs(x))*sqrt(abs(a*x-1))),x)+%c];
533 [method,ode_check(eqn,%)];
537 (pn_(67),ans:contrib_ode(eqn:'diff(y,x)-sqrt(1-y^4)/sqrt(1-x^4),y,x));
538 ['integrate(1/sqrt(1-y^4),y) = 'integrate(1/sqrt(1-x^4),x)+%c];
539 [method,ode_check(eqn,ans[1])];
543 /*(pn_(68),ans:contrib_ode(eqn:'diff(y,x)-sqrt((a*y^4+b*y^2+1)/(a*x^4+b*x^2+1)),y,x));
544 ['integrate(1/sqrt(a*y^4+b*y^2+1),y)='integrate(1/sqrt(a*x^4+b*x^2+1),x)+%c]; */
548 /* 74 - Too general - E S Cheb-Terrab and T Kolokolnikov */
551 (pn_(75),ans:contrib_ode(eqn:'diff(y,x)-exp(x-y)+exp(x),y,x));
552 [log(%e^y-1)+%e^x=%c];
554 [y=log(%e^(%c-%e^x)+1)];
555 [method,ode_check(eqn,%[1])];
561 (pn_(76),ans:contrib_ode(eqn:'diff(y,x)-a*cos(y)+b,y,x));
562 [-(log(-(((-b-a)*sin(y)+sqrt(a^2-b^2)*(cos(y)+1))/((b+a)*sin(y)+sqrt(a^2-b^2)*(cos(y)+1))))/sqrt(a^2-b^2))=x+%c];
568 /* 77 infinite run time */
569 /* 78 infinite run time */
570 /* 79 - Too general - E S Cheb-Terrab and T Kolokolnikov */
573 (pn_(80),ans:contrib_ode(eqn:'diff(y,x)+f(x)*sin(y)+(1-'diff(f(x),x))*cos(y)-'diff(f(x),x)-1,y,x));
577 /* 82 - Too general - E S Cheb-Terrab and T Kolokolnikov */
580 (pn_(83),ans:contrib_ode(eqn:'diff(y,x)-tan(x*y),y,x));
586 (pn_(84),ans:contrib_ode(eqn:'diff(y,x)-f(a*x+b*y),y,x));
587 [b*'integrate(f(b*y+a*x)/(b*f(b*y+a*x)+a),x)-'integrate(((a*b^3*f(b*y+a*x)+a^2*b^2)*'integrate(pderivop(f,1)(b*y+a*x)/(b^2*f(b*y+a*x)^2+2*a*b*f(b*y+a*x)+a^2),x)+b)/(b*f(b*y+a*x)+a),y)=%c];
594 /* 86 infinite run time */
595 /* 87 infinite run time */
598 (pn_(88),ans:contrib_ode(eqn:2*'diff(y,x)-3*y^2-4*a*y-b-c*exp(-2*a*x),y,x));
599 [[y=-2*'diff(%u,x,1)/(3*%u),9*%u*(c*%e^-(2*a*x)/2+b/2)/4-3*'diff(%u,x,1)*a+3*'diff(%u,x,2)/2=0]];
606 (pn_(89),ans:contrib_ode(eqn: x*'diff(y,x)-sqrt(a^2-x^2),y,x));
607 [y = -a*log(2*a*sqrt(a^2-x^2)/abs(x)+2*a^2/abs(x))+sqrt(a^2-x^2)+%c];
608 [method,ode_check(eqn,%[1])];
614 (pn_(90),ans:contrib_ode(eqn:x*'diff(y,x)+y-x*sin(x),y,x));
615 [y=(sin(x)-x*cos(x)+%c)/x];
616 [method,ode_check(eqn,ans[1])];
620 (pn_(91),ans:contrib_ode(eqn:x*'diff(y,x)-y-x/log(x),y,x));
621 [y=x*(log(log(x))+%c)];
622 [method,ode_check(eqn,ans[1])];
626 (pn_(92),ans:contrib_ode(eqn:x*'diff(y,x)-y-x^2*sin(x),y,x));
628 [method,ode_check(eqn,ans[1])];
632 (pn_(93),ans:contrib_ode(eqn:x*'diff(y,x)-y-x*cos(log(log(x)))/log(x),y,x));
633 [y=x*(sin(log(log(x)))+%c)];
634 [method,ode_check(eqn,ans[1])];
638 (pn_(94),ans:contrib_ode(eqn:x*'diff(y,x)+a*y+b*x^n,y,x));
639 [y=%e^-(a*log(x))*(%c-b*%e^(n*log(x)+a*log(x))/(n+a))];
640 [method,radcan(ode_check(eqn,ans[1]))];
644 (pn_(95),ans:contrib_ode(eqn:x*'diff(y,x)+y^2+x^2,y,x));
645 [y=-((bessel_y(1,x)*%c+bessel_j(1,x))*x/(bessel_y(0,x)*%c+bessel_j(0,x)))];
646 [method,ode_check(eqn,ans[1])];
650 (pn_(96),ans:contrib_ode(eqn:x*'diff(y,x)-y^2+1,y,x));
651 [-((log(y+1)-log(y-1))/2)=log(x)+%c];
652 solve(map(exp,-2*ans[1]),y);
653 [y=-((%e^(2*%c)*x^2+1)/(%e^(2*%c)*x^2-1))];
654 [method,ode_check(eqn,%[1])];
660 (pn_(97),ans:contrib_ode(eqn:x*'diff(y,x)+a*y^2-y+b*x^2,y,x));
661 [y=-sqrt(b)*x*tan(sqrt(a)*sqrt(b)*x-%c)/sqrt(a)];
662 [method,ode_check(eqn,ans[1])];
670 (pn_(98),ans:contrib_ode(eqn:x*'diff(y,x)+a*y^2-b*y+c*x^(2*b),y,x));
671 [y=-sqrt(c)*x^b*tan(sqrt(a)*sqrt(c)*x^b/b-%c)/sqrt(a)];
672 [method,ode_check(eqn,ans[1])];
677 /* 99 Requires specific values of beta and b */
678 (beta:4,b:3,assume(a>0,c>0),done);
680 (pn_(99),ans:contrib_ode(eqn:x*'diff(y,x)+a*y^2-b*y-c*x^beta,y,x));
681 [y = -((((bessel_k(7/4,sqrt(a)*sqrt(c)*x^2/2)+bessel_k(1/4,sqrt(a)*sqrt(c)*x^2/2))*%c
682 -bessel_i(7/4,sqrt(a)*sqrt(c)*x^2/2)-bessel_i(-(1/4),sqrt(a)*sqrt(c)*x^2/2))*sqrt(a)*sqrt(c)*x^2
683 -3*bessel_k(3/4,sqrt(a)*sqrt(c)*x^2/2)*%c-3*bessel_i(3/4,sqrt(a)*sqrt(c)*x^2/2))
684 /((2*'bessel_k(3/4,sqrt(a)*sqrt(c)*x^2/2)*%c+2*'bessel_i(3/4,sqrt(a)*sqrt(c)*x^2/2))*a))];
685 [method,ode_check(eqn,ans[1])];
687 (kill(beta,b),forget(a>0,c>0),done);
693 (pn_(100),ans:contrib_ode(eqn:x*'diff(y,x)+x*y^2+a,y,x));
694 [y = -((((bessel_y(2,2*sqrt(a)*sqrt(x))-bessel_y(0,2*sqrt(a)*sqrt(x)))*%c
695 +bessel_j(2,2*sqrt(a)*sqrt(x))-bessel_j(0,2*sqrt(a)*sqrt(x)))*sqrt(a)*sqrt(x)
696 -bessel_y(1,2*sqrt(a)*sqrt(x))*%c-bessel_j(1,2*sqrt(a)*sqrt(x)))
697 /((2*bessel_y(1,2*sqrt(a)*sqrt(x))*%c+2*bessel_j(1,2*sqrt(a)*sqrt(x)))*x))];
698 [method,ode_check(eqn,ans[1])];