Fix typo in display-html-help
[maxima.git] / share / contrib / diffequations / tests / rtestode_kamke_1_4.mac
blob2501e9da942fcc543a35e706cf3a53719be46314
1 (load("contrib_ode"),0);
2 0$
4 /* ODE tests - Equations 1.301-1.400
6   Reference:
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)
16 /* Don't kill(all); It messes up trigsimp */
18 /* Print ode number*/
19 (pn_(n_):=print("Kamke ODE 1.",n_),true);
20 true;
22 /*  301  */ 
23 (pn_(301),ans:contrib_ode(eqn:(6*x*y^2+x^2)*'diff(y,x,1)-y*(3*y^2-x),y,x));
24 [x=%c*%e^-((2*x*log(y/sqrt(x))+6*y^2)/(3*x))];
25 method;
26 genhom;
28 /*  302  */ 
29 (pn_(302),ans:contrib_ode(eqn:(x^2*y^2+x)*'diff(y,x,1)+y,y,x));
30 [x=%c*(x*y^2-1)^2/(x*y^2)];
31 method;
32 genhom;
34 /*  303  */ 
35 (pn_(303),ans:contrib_ode(eqn:x*(x*y-1)^2*'diff(y,x,1)+y*(x^2*y^2+1),y,x));
36 [x=%c*%e^((2*x*y*log(x*y)-x^2*y^2+1)/(2*x*y))];
37 method;
38 genhom;
40 /*  304  */ 
41 (pn_(304),ans:contrib_ode(eqn:(10*x^3*y^2+x^2*y+2*x)*'diff(y,x,1)+5*x^2*y^3+x*y^2,y,x));
42 [x=%c*%e^((sqrt(10)*log(5*x^2*y^2+2)+2*atan(5*x*y/sqrt(10))+2*sqrt(10)*log(x*y))/(2*sqrt(10)))];
43 method;
44 genhom;
46 /*  305  */ 
47 (pn_(305),ans:contrib_ode(eqn:(y^3-3*x)*'diff(y,x,1)-3*y+x^2,y,x));
48 [(3*y^4-36*x*y+4*x^3)/12=%c];
49 [method,ode_check(eqn,ans[1])];
50 [exact,0];
52 /*  306  */ 
53 (pn_(306),ans:contrib_ode(eqn:(y^3-x^3)*'diff(y,x,1)-x^2*y,y,x));
54 [(y^6-2*x^3*y^3)/6=%c];
55 [method,ode_check(eqn,ans[1])];
56 [exact,0];
58 /*  307  */ 
59 (pn_(307),ans:contrib_ode(eqn:y*(y^2+x^2+a)*'diff(y,x,1)+x*(y^2+x^2-a),y,x));
60 [(y^4+(2*x^2+2*a)*y^2+x^4-2*a*x^2)/4=%c];
61 [method,ode_check(eqn,ans[1])];
62 [exact,0];
64 /*  308  */ 
65 (pn_(308),ans:contrib_ode(eqn:2*y^3*'diff(y,x,1)+x*y^2,y,x));
66 [-y^2=x^2/2+%c];
67 [method,ode_check(eqn,ans[1])];
68 [separable,0];
70 /*  309  */ 
71 (pn_(309),ans:contrib_ode(eqn:(2*y^3+y)*'diff(y,x,1)-2*x^3-x,y,x));
72 [(4*y^4+4*y^2+1)/8=(4*x^4+4*x^2+1)/8+%c];
73 [method,ode_check(eqn,ans[1])];
74 [separable,0];
76 /*  310  */ 
77 (pn_(310),ans:contrib_ode(eqn:(2*y^3+5*x^2*y)*'diff(y,x,1)+5*x*y^2+x^3,y,x));
78 [(2*y^4+10*x^2*y^2+x^4)/4=%c];
79 [method,ode_check(eqn,ans[1])];
80 [exact,0];
82 /*  311  */ 
83 (pn_(311),ans:contrib_ode(eqn:(20*y^3-3*x*y^2+6*x^2*y+3*x^3)*'diff(y,x,1)-y^3+6*x*y^2+9*x^2*y+4*x^3,y,x));
84 [5*y^4-x*y^3+3*x^2*y^2+3*x^3*y+x^4=%c];
85 [method,ode_check(eqn,ans[1])];
86 [exact,0];
88 /*  312  */ 
89 /* This equation presents a problem - runs forever */ 
90 /* (pn_( 312 ),ans:contrib_ode(eqn: (y^2/b+x^2/a)*(y*'diff(y,x,1)+x)+(a-b)*(y*'diff(y,x,1)-x)/(b+a) ,y,x)); */ 
92 /*  313  */ 
93 /* This equation presents a problem - runs forever */ 
94 /* (pn_( 313 ),ans:contrib_ode(eqn: (2*a*y^3+3*a*x*y^2-b*x^3+c*x^2)*'diff(y,x,1)-a*y^3+c*y^2+3*b*x^2*y+2*b*x^3 ,y,x)); */ 
96 /*  314  */ 
97 (pn_(314),ans:contrib_ode(eqn:x*y^3*'diff(y,x,1)+y^4-x*sin(x),y,x));
98 [(x^4*y^4+(96*x-16*x^3)*sin(x)+(4*x^4-48*x^2+96)*cos(x))/4=%c];
99 [method,ode_check(eqn,ans[1])];
100 [exact,0];
102 /*  315  */ 
103 (pn_(315),ans:contrib_ode(eqn:(2*x*y^3-x^4)*'diff(y,x,1)-y^4+2*x^3*y,y,x));
104 [%c*x=x^2*y/((y+x)*(y^2-x*y+x^2))];
105 method;
106 homogeneous;
108 /*  316  */ 
109 (pn_(316),ans:contrib_ode(eqn:(2*x*y^3+y)*'diff(y,x,1)+2*y^2,y,x));
110 [(4*x*%e^(y^2/2)-gamma_incomplete(0,-y^2/2))/2=%c];
111 [method,ode_check(eqn,ans[1])];
112 [exact,0];
114 /*  317  */ 
115 /* This equation presents a problem - runs forever */ 
116 /* (pn_( 317 ),ans:contrib_ode(eqn: (2*x*y^3+x*y+x^2)*'diff(y,x,1)+y^2-x*y ,y,x)); */ 
118 /*  318  */ 
119 (pn_(318),ans:contrib_ode(eqn:(3*x*y^3-4*x*y+y)*'diff(y,x,1)+y^2*(y^2-2),y,x));
120 [(x*y^4+(1-2*x)*y^2-2)/sqrt(y^2-2)=%c];
121 [method,ode_check(eqn,ans[1])];
122 [exact,0];
124 /*  319  */ 
125 (pn_(319),ans:contrib_ode(eqn:(7*x*y^3+y-5*x)*'diff(y,x,1)+y^4-5*y,y,x));
126 [(10*x*y^7+2*y^5-100*x*y^4-25*y^2+250*x*y)/10=%c];
127 [method,ode_check(eqn,ans[1])];
128 [exact,0];
130 /*  320  */ 
131 (pn_(320),ans:contrib_ode(eqn:(x^2*y^3+x*y)*'diff(y,x,1)-1,y,x));
132 false;
134 /*  321  */ 
135 /* This equation presents a problem - runs forever */ 
136 /* (pn_( 321 ),ans:contrib_ode(eqn: (2*x^2*y^3+x^2*y^2-2*x)*'diff(y,x,1)-2*y-1 ,y,x)); */ 
138 /*  322  */ 
139 (pn_(322),ans:contrib_ode(eqn:(10*x^2*y^3-3*y^2-2)*'diff(y,x,1)+5*x*y^4+x,y,x));
140 [(5*x^2*y^4-2*y^3-4*y+x^2)/2=%c];
141 [method,ode_check(eqn,ans[1])];
142 [exact,0];
144 /*  323  */ 
145 /* This equation presents a problem - runs forever */ 
146 /* (pn_( 323 ),ans:contrib_ode(eqn: x*(a*x*y^3+c)*'diff(y,x,1)+y*(b*x^3*y+c) ,y,x)); */ 
148 /*  324  */ 
149 /* This equation presents a problem - runs forever */ 
150 /* (pn_( 324 ),ans:contrib_ode(eqn: (2*x^3*y^3-x)*'diff(y,x,1)+2*x^3*y^3-y ,y,x)); */ 
152 /*  325  */ 
153 (pn_(325),ans:contrib_ode(eqn:y*(y^3-2*x^3)*'diff(y,x,1)+x*(2*y^3-x^3),y,x));
154 [%c*x=%e^-(('integrate((8*x*y^3+9*x^2*y^2+12*x^3*y-x^4)/(y^4+x*y^3+3*x^2*y^2+x^3*y+x^4),y/x)-log((y-x)/x))/7)];
155 method;
156 homogeneous;
158 /*  326  */ 
159 (pn_(326),ans:contrib_ode(eqn:y*((a*y+b*x)^3+b*x^3)*'diff(y,x,1)+x*((a*y+b*x)^3+a*y^3),y,x));
160 [%c*x=%e^-((log((a^2*y^4+2*a*b*x*y^3+(b^2+a^2+1)*x^2*y^2+2*a*b*x^3*y+b^2*x^4)/x^4)-2*log((a*y+b*x)/x))/2)];
161 method;
162 homogeneous;
164 /*  327  */ 
165 /* This equation presents a problem - runs forever */ 
166 /* (pn_( 327 ),ans:contrib_ode(eqn: (x*y^4+2*x^2*y^3+2*y+x)*'diff(y,x,1)+y^5+y ,y,x)); */ 
168 /*  328  */ 
169 (pn_(328),ans:contrib_ode(eqn:a*x^2*y^n*'diff(y,x,1)-2*x*'diff(y,x,1)+y,y,x));
170 [x=%c*%e^((n*log((a*%e^(n*log(x^(1/n)*y))-n-2)/a)+2*n*log(x^(1/n)*y))/(n+2))];
171 method;
172 genhom;
174 /*  329  */ 
175 (pn_(329),ans:contrib_ode(eqn:x^n*y^m*(a*x*'diff(y,x,1)+b*y)+alpha*x*'diff(y,x,1)+beta*y,y,x));
176 [x=%c*%e^-(((a*beta-alpha*b)*m*log(((a*n-b*m)*%e^(m*log(x^(n/m)*y))+alpha*n-beta*m)/(a*n-b*m))+(alpha*b*m^2-a*alpha*m*n)*log(x^(n/m)*y))/(a*alpha*n^2+(-a*beta-alpha*b)*m*n+b*beta*m^2))];
177 method;
178 genhom;
180 /*  330  */ 
181 /* This equation presents a problem - runs forever */ 
182 /* (pn_( 330 ),ans:contrib_ode(eqn: 'diff(y,x,1)*(f(y+x)+1)+f(y+x) ,y,x)); */ 
184 /*  331  */ 
185 /* This equation too general - E S Cheb-Terrab and T Kolokolnikov */ 
186 /* (pn_( 331 ),ans:contrib_ode(eqn: ode[331] ,y,x)); */ 
188 /*  332  */ 
189 (pn_(332),ans:contrib_ode(eqn:x*(sqrt(x*y)-1)*'diff(y,x,1)-y*(sqrt(x*y)+1),y,x));
190 [x=%c*%e^((sqrt(x*y)*log(x*y)+2)/(2*sqrt(x*y)))];
191 method;
192 genhom;
194 /*  333  */ 
195 /* This equation presents a problem - crashes ode_contrib */ 
196 /* (pn_( 333 ),ans:contrib_ode(eqn: (2*x^(5/2)*y^(3/2)+x^2*y-x)*'diff(y,x,1)-x^(3/2)*y^(5/2)+x*y^2-y ,y,x)); */ 
198 /*  334  */ 
199 /* This equation presents a problem - runs forever */ 
200 /* (pn_( 334 ),ans:contrib_ode(eqn: (sqrt(y+x)+1)*'diff(y,x,1)+1 ,y,x)); */ 
202 /*  335  */ 
203 (pn_(335),ans:contrib_ode(eqn:sqrt(y^2-1)*'diff(y,x,1)-sqrt(x^2-1),y,x));
204 [(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];
205 [method,ode_check(eqn,ans[1])];
206 [separable,0];
208 /*  336  */ 
209 (pn_(336),ans:contrib_ode(eqn:(sqrt(y^2+1)+a*x)*'diff(y,x,1)+a*y+sqrt(x^2+1),y,x));
210 [(asinh(y)+y*sqrt(y^2+1)+2*a*x*y+asinh(x)+x*sqrt(x^2+1))/2=%c];
211 [method,ode_check(eqn,ans[1])];
212 [exact,0];
214 /*  337  */ 
215 /* This equation presents a problem - runs forever */ 
216 /* (pn_( 337 ),ans:contrib_ode(eqn: (sqrt(y^2+x^2)+x)*'diff(y,x,1)-y ,y,x)); */ 
218 /*  338  */ 
219 /* This equation presents a problem - runs forever */ 
220 /* (pn_( 338 ),ans:contrib_ode(eqn: (y*sqrt(y^2+x^2)+sin(alpha)*(y^2-x^2)-2*cos(alpha)*x*y)*'diff(y,x,1)+x*sqrt(y^2+x^2)+cos(alpha)*(y^2-x^2)+2*sin(alpha)*x*y ,y,x)); */ 
222 /*  339  */ 
223 /* This equation presents a problem - runs forever */ 
224 /* (pn_( 339 ),ans:contrib_ode(eqn: (x*sqrt(y^2+x^2+1)-y*(y^2+x^2))*'diff(y,x,1)-y*sqrt(y^2+x^2+1)-x*(y^2+x^2) ,y,x)); */ 
226 /*  340  CHECKME 
227  2008-02-24:  Now fails with "Expression too wide to be displayed */ 
228 /* (pn_(340),ans:contrib_ode(eqn:(e1*(x+a)/(y^2+(x+a)^2)^(3/2)+e2*(x-a)/(y^2+(x-a)^2)^(3/2))*'diff(y,x,1)-y*(e1/(y^2+(x+a)^2)^(3/2)+e2/(y^2+(x-a)^2)^(3/2)),y,x));
229 [-'integrate((sqrt(y^2+x^2+2*a*x+a^2)*(sqrt(y^2+x^2-2*a*x+a^2)*(y^4+(2*x^2+2*a^2)*y^2+x^4-2*a^2*x^2+a^4)*'integrate((sqrt(y^2+x^2+2*a*x+a^2)*(e2*y^7+8*a*e2*x*y^5+(-3*e2*x^4+4*a*e2*x^3+14*a^2*e2*x^2+4*a^3*e2*x-3*a^4*e2)*y^3+(-2*e2*x^6-4*a*e2*x^5+2*a^2*e2*x^4+8*a^3*e2*x^3+2*a^4*e2*x^2-4*a^5*e2*x-2*a^6*e2)*y)+sqrt(y^2+x^2-2*a*x+a^2)*(e1*y^7-8*a*e1*x*y^5+(-3*e1*x^4-4*a*e1*x^3+14*a^2*e1*x^2-4*a^3*e1*x-3*a^4*e1)*y^3+(-2*e1*x^6+4*a*e1*x^5+2*a^2*e1*x^4-8*a^3*e1*x^3+2*a^4*e1*x^2+4*a^5*e1*x-2*a^6*e1)*y))/(sqrt(y^2+x^2-2*a*x+a^2)*sqrt(y^2+x^2+2*a*x+a^2)*(y^8+(4*x^2+4*a^2)*y^6+(6*x^4+4*a^2*x^2+6*a^4)*y^4+(4*x^6-4*a^2*x^4-4*a^4*x^2+4*a^6)*y^2+x^8-4*a^2*x^6+6*a^4*x^4-4*a^6*x^2+a^8)),x)+(a*e2-e2*x)*y^3+(-e2*x^3-a*e2*x^2+a^2*e2*x+a^3*e2)*y)+sqrt(y^2+x^2-2*a*x+a^2)*((-e1*x-a*e1)*y^3+(-e1*x^3+a*e1*x^2+a^2*e1*x-a^3*e1)*y))/(sqrt(y^2+x^2-2*a*x+a^2)*sqrt(y^2+x^2+2*a*x+a^2)*(y^4+(2*x^2+2*a^2)*y^2+x^4-2*a^2*x^2+a^4)),y)-'integrate((sqrt(y^2+x^2-2*a*x+a^2)*(e2*y^6+(2*e2*x^2+4*a*e2*x+2*a^2*e2)*y^4+(e2*x^4+4*a*e2*x^3+6*a^2*e2*x^2+4*a^3*e2*x+a^4*e2)*y^2)+sqrt(y^2+x^2+2*a*x+a^2)*(e1*y^6+(2*e1*x^2-4*a*e1*x+2*a^2*e1)*y^4+(e1*x^4-4*a*e1*x^3+6*a^2*e1*x^2-4*a^3*e1*x+a^4*e1)*y^2))/(y^8+(4*x^2+4*a^2)*y^6+(6*x^4+4*a^2*x^2+6*a^4)*y^4+(4*x^6-4*a^2*x^4-4*a^4*x^2+4*a^6)*y^2+x^8-4*a^2*x^6+6*a^4*x^4-4*a^6*x^2+a^8),x)=%c];
230 method;
231 exact;
234 /*  341  */ 
235 (pn_(341),ans:contrib_ode(eqn:(x*%e^y+%e^x)*'diff(y,x,1)+%e^y+%e^x*y,y,x));
236 [x*%e^y+%e^x*y=%c];
237 [method,ode_check(eqn,ans[1])];
238 [exact,0];
240 /*  342  */ 
241 (pn_(342),ans:contrib_ode(eqn:x*(3*%e^(x*y)+2*%e^-(x*y))*(x*'diff(y,x,1)+y)+1,y,x));
242 [%e^-(x*y)*(3*%e^(2*x*y)+log(x)*%e^(x*y)-2)=%c];
243 [method,ode_check(eqn,ans[1])];
244 [exact,0];
246 /*  343  */ 
247 (pn_(343),ans:contrib_ode(eqn:(log(y)+x)*'diff(y,x,1)-1,y,x));
248 [-%e^-y*(log(y)+gamma_incomplete(0,y)*%e^y+x)=%c];
249 [method,ode_check(eqn,ans[1])];
250 [exact,0];
252 /*  344  */ 
253 (pn_(344),ans:contrib_ode(eqn:(log(y)+2*x-1)*'diff(y,x,1)-2*y,y,x));
254 [-((log(y)+2*x)/y)=%c];
255 [method,ode_check(eqn,ans[1])];
256 [exact,0];
258 /*  345  */ 
259 (pn_(345),ans:contrib_ode(eqn:x*(2*x^2*y*log(y)+1)*'diff(y,x,1)-2*y,y,x));
260 [(2*x^2*y^2*log(y)-x^2*y^2+2*y)/(2*x^2)=%c];
261 [method,ode_check(eqn,ans[1])];
262 [exact,0];
264 /*  346  */ 
265 /* This equation presents a problem - runs forever */ 
266 /* (pn_( 346 ),ans:contrib_ode(eqn: x*'diff(y,x,1)*(y*log(x*y)+y-a*x)-y*(a*x*log(x*y)-y+a*x) ,y,x)); */ 
268 /*  347  */ 
269 (pn_(347),ans:contrib_ode(eqn:(sin(x)+1)*sin(y)*'diff(y,x,1)+cos(x)*(cos(y)-1),y,x));
270 [log(cos(y)-1)=log(sin(x)+1)+%c];
271 [method,ode_check(eqn,ans[1])];
272 [separable,0];
274 /*  348  */ 
275 (pn_(348),ans:contrib_ode(eqn:(x*cos(y)+sin(x))*'diff(y,x,1)+sin(y)+cos(x)*y,y,x));
276 [x*sin(y)+sin(x)*y=%c];
277 [method,ode_check(eqn,ans[1])];
278 [exact,0];
280 /*  349  */ 
281 (pn_(349),ans:contrib_ode(eqn:2*x*sin(y/x)+x*'diff(y,x,1)*cot(y/x)-y*cot(y/x),y,x));
282 [%c*x=%e^(1/(2*sin(y/x)))];
283 solve(map(log,ans[1]),y);
284 [y=x*asin(1/(2*log(%c*x)))];
285 [method,ode_check(eqn,%[1])];
286 [homogeneous,0];
288 /*  350  */ 
289 (pn_(350),ans:contrib_ode(eqn:cos(y)*'diff(y,x,1)-cos(x)*sin(y)^2-sin(y),y,x));
290 false;
292 /*  351  */ 
293 /* This equation presents a problem - crashes ode_contrib */ 
294 /* (pn_( 351 ),ans:contrib_ode(eqn: cos(y)*'diff(y,x,1)-sin(y)^3+x*cos(y)^2*sin(y) ,y,x)); */ 
296 /*  352  */ 
297 (pn_(352),ans:contrib_ode(eqn:cos(y)*(cos(y)-sin(alpha)*sin(x))*'diff(y,x,1)+cos(x)*(cos(x)-sin(alpha)*sin(y)),y,x));
298 [(sin(2*y)-4*sin(alpha)*sin(x)*sin(y)+2*y+sin(2*x)+2*x)/4=%c];
299  [method,expand(exponentialize(ode_check(eqn,ans[1])))];
300 [exact,0];
302 /*  353  */ 
303 (pn_(353),ans:contrib_ode(eqn:x*cos(y)*'diff(y,x,1)+sin(y),y,x));
304 [-log(sin(y))=log(x)+%c];
305 [method,ode_check(eqn,ans[1])];
306 [separable,0];
308 /*  354  */ 
309 (pn_(354),ans:contrib_ode(eqn:(x*sin(y)-1)*'diff(y,x,1)+cos(y),y,x));
310 [-((cos(y)*tan(y)-x)/cos(y))=%c];
311 [method,ode_check(eqn,ans[1])];
312 [exact,0];
314 /*  355  */ 
315 (pn_(355),ans:contrib_ode(eqn:(x*cos(y)+cos(x))*'diff(y,x,1)+sin(y)-sin(x)*y,y,x));
316 [x*sin(y)+cos(x)*y=%c];
317 [method,ode_check(eqn,ans[1])];
318 [exact,0];
320 /*  356  */ 
321 (pn_(356),ans:contrib_ode(eqn:(x^2*cos(y)+2*sin(x)*y)*'diff(y,x,1)+2*x*sin(y)+cos(x)*y^2,y,x));
322 [x^2*sin(y)+sin(x)*y^2=%c];
323 [method,ode_check(eqn,ans[1])];
324 [exact,0];
326 /*  357  */ 
327 (pn_(357),ans:contrib_ode(eqn:x*log(x)*sin(y)*'diff(y,x,1)+cos(y)*(1-x*cos(y)),y,x));
328 false;
330 /*  358  */ 
331 (pn_(358),ans:contrib_ode(eqn:cos(x)*sin(y)*'diff(y,x,1)+sin(x)*cos(y),y,x));
332 [log(cos(y))=%c-log(cos(x))];
333 [method,ode_check(eqn,ans[1])];
334 [separable,0];
336 /*  359  */ 
337 (pn_(359),ans:contrib_ode(eqn:3*sin(x)*sin(y)*'diff(y,x,1)+5*cos(x)^4*y,y,x));
338  [(3*%i*gamma_incomplete(0,%i*y)-3*%i*gamma_incomplete(0,-%i*y))/10
339           = %c-(3*log(cos(x)+1)-3*log(cos(x)-1)-2*cos(x)^3-6*cos(x))/6]$
340 [method,ode_check(eqn,ans[1])];
341 [separable,0];
343 /*  360  */ 
344 (pn_(360),ans:contrib_ode(eqn:'diff(y,x,1)*cos(a*y)-b*(1-c*cos(a*y))*sqrt(cos(a*y)^2+c*cos(a*y)-1),y,x));
345 [-('integrate(cos(a*y)/((c*cos(a*y)-1)*sqrt(cos(a*y)^2+c*cos(a*y)-1)),y))/b=x+%c];
346 [method,ode_check(eqn,ans[1])];
347 [separable,0];
349 /*  361  */ 
350 (pn_(361),ans:contrib_ode(eqn:'diff(y,x,1)*(cos(y+x)+x*sin(x*y)-sin(y))+cos(y+x)+y*sin(x*y)+cos(x),y,x));
351 [sin(y+x)-cos(x*y)+cos(y)+sin(x)=%c];
352 [method,ode_check(eqn,ans[1])];
353 [exact,0];
355 /*  362  */ 
356 (pn_(362),ans:contrib_ode(eqn:'diff(y,x,1)*(x^2*y*sin(x*y)-4*x)+x*y^2*sin(x*y)-y,y,x));
357 [x=%c*%e^((4*log(x*y)+cos(x*y))/3)];
358 method;
359 genhom;
361 /*  363  */ 
362 (pn_(363),ans:contrib_ode(eqn:(x*'diff(y,x,1)-y)*cos(y/x)^2+x,y,x));
363 [(x*sin(2*y/x)+2*y+4*x*log(x))/(4*x)=%c];
364 [method,expand(exponentialize(ode_check(eqn,ans[1])))];
365 [exact,0];
367 /*  364  */ 
368 (pn_(364),ans:contrib_ode(eqn:x*'diff(y,x,1)*(y*sin(y/x)-x*cos(y/x))-y*(y*sin(y/x)+x*cos(y/x)),y,x));
369 [-x*y*cos(y/x)=%c];
370 [method,ode_check(eqn,ans[1])];
371 [exact,0];
373 /*  365  */ 
374 /* This equation presents a problem - crashes ode_contrib */ 
375 /* (pn_( 365 ),ans:contrib_ode(eqn: 'diff(y,x,1)*(y*f(y^2+x^2)-x)+x*f(y^2+x^2)+y ,y,x)); */ 
377 /*  366  */ 
378 use_pdiff:true;
379 true;
380 (pn_(366),ans:contrib_ode(eqn:(a*y*'diff(y,x,1)+x)*f(a*y^2+x^2)-x*'diff(y,x,1)-y,y,x));
381 ['integrate(a*y*f(a*y^2+x^2)-2*a*y*'integrate(x*pderivop(f,1)(a*y^2+x^2),x),y)+'integrate(x*f(a*y^2+x^2),x)-x*y=%c];
382 method;
383 exact;
384 use_pdiff:false;
385 false;
387 /*  367  */ 
388 /* This equation presents a problem - crashes ode_contrib */ 
389 /* (pn_( 367 ),ans:contrib_ode(eqn: (b*x*'diff(y,x,1)-a)*f(x^c*y)-x^a*y^b*(x*'diff(y,x,1)+c*y) ,y,x)); */ 
391 /*  368  */ 
392 /* This equation presents a problem - runs forever */ 
393 /* (pn_( 368 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2+a*y+b*x^2 ,y,x)); */ 
395 /*  369  */
396 assume(a>0);
397 [a>0]; 
398 (pn_(369),ans:contrib_ode(eqn:('diff(y,x,1))^2+y^2-a^2,y,x));
399 [[x=asin(%t/abs(a))+%c,y=-sqrt(a^2-%t^2)],[x=%c-asin(%t/abs(a)),y=sqrt(a^2-%t^2)]];
400 ans[1]:ans[1][2],solve(ans[1][1],%t);
401 y=-sqrt(a^2-a^2*sin(x-%c)^2);
402 ans[2]:ans[2][2],solve(ans[2][1],%t);
403 y=sqrt(a^2-a^2*sin(x-%c)^2);
404 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
405 [lagrange,0,0];
406 forget(a>0);
407 [a>0];
409 /*  370  */ 
410 /* This equation too general - E S Cheb-Terrab and T Kolokolnikov */ 
411 /* (pn_( 370 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2+y^2-f(x)^2 ,y,x)); */ 
413 /*  371  */ 
414 /* This equation presents a problem - crashes ode_contrib */ 
415 /* (pn_( 371 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2-y^3+y^2 ,y,x)); */ 
417 /*  372  */ 
418 /* This equation presents a problem - runs forever */ 
419 /* (pn_( 372 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2-4*y^3+a*y+b ,y,x)); */ 
421 /*  373  */ 
422 /* This equation presents a problem - crashes ode_contrib */ 
423 /* (pn_( 373 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2+a^2*y^2*(log(y)^2-1) ,y,x)); */ 
425 /*  374  */ 
426 /* This equation presents a problem - crashes ode_contrib */ 
427 /* (pn_( 374 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2-2*'diff(y,x,1)-y^2 ,y,x)); */ 
429 /*  375  */ 
430 (pn_(375),ans:contrib_ode(eqn:('diff(y,x,1))^2+a*'diff(y,x,1)+b*x,y,x));
431 [-((12*b*y+sqrt(a^2-4*b*x)*(4*b*x-a^2)+6*a*b*x)/(12*b))=%c];
432 [method,ode_check(eqn,ans[1])];
433 [lie,0];
435 /*  376  */ 
436 (pn_(376),ans:contrib_ode(eqn:('diff(y,x,1))^2+a*'diff(y,x,1)+b*y,y,x));
437 [[x=%c-((log(%t)*a+2*%t)/b),y=-((%t*a+%t^2)/b)]];
438 [method,ode_check(eqn,ans[1])];
439 [lagrange,0];
441 /*  377  */ 
442 (pn_(377),ans:contrib_ode(eqn:('diff(y,x,1))^2+(x-2)*'diff(y,x,1)-y+1,y,x));
443 [y=%c*x+%c^2-2*%c+1,y=-((x^2-4*x)/4)];
444 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
445 [clairaut,0,0];
447 /*  378  */ 
448 (pn_(378),ans:contrib_ode(eqn:('diff(y,x,1))^2+(x+a)*'diff(y,x,1)-y,y,x));
449 [y=%c*x+%c*a+%c^2,y=-((x^2+2*a*x+a^2)/4)];
450 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
451 [clairaut,0,0];
453 /*  379  */ 
454 (pn_(379),ans:contrib_ode(eqn:('diff(y,x,1))^2-(x+1)*'diff(y,x,1)+y,y,x));
455 [y=%c*x-%c^2+%c,y=(x^2+2*x+1)/4];
456 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
457 [clairaut,0,0];
459 /*  380  */ 
460 (pn_(380),ans:contrib_ode(eqn:('diff(y,x,1))^2+2*x*'diff(y,x,1)-y,y,x));
461 [4*y^3+3*x^2*y^2-18*%c*x*y-12*%c*x^3-9*%c^2=0];
462 method;
463 lagrange;
465 /*  381  */ 
466 (pn_(381),ans:contrib_ode(eqn:('diff(y,x,1))^2-2*x*'diff(y,x,1)+y,y,x));
467 [4*y^3-3*x^2*y^2-18*%c*x*y+12*%c*x^3+9*%c^2=0];
468 method;
469 lagrange;
471 /*  382  */ 
472 assume(4*b+a^2>0,c>0);
473 [4*b+a^2>0,c>0];
474 (pn_(382),ans:contrib_ode(eqn:('diff(y,x,1))^2+a*x*'diff(y,x,1)-b*x^2-c,y,x));
475 [-((sqrt(4*b+a^2)*(4*y+a*x^2)+4*c*asinh(sqrt(4*b+a^2)*x/(2*sqrt(c)))+sqrt(4*b+a^2)*x*sqrt((4*b+a^2)*x^2+4*c))/(4*sqrt(4*b+a^2)))=%c];
476 [method,ode_check(eqn,ans[1])];
477 [lie,0];
478 forget(4*b+a^2>0,c>0);
479 [4*b+a^2>0,c>0];
481 /*  383  */ 
482 /* This equation presents a problem - runs forever */ 
483 /* (pn_( 383 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2+a*x*'diff(y,x,1)+b*y+c*x^2 ,y,x)); */ 
485 /*  384  */ 
486 (pn_(384),ans:contrib_ode(eqn:('diff(y,x,1))^2+(a*x+b)*'diff(y,x,1)-a*y+c,y,x));
487 [y=(%c*a*x+c+%c*b+%c^2)/a,y=-((a^2*x^2+2*a*b*x-4*c+b^2)/(4*a))];
488 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
489 [clairaut,0,0];
491 /*  385  */ 
492 /* This equation presents a problem - runs forever */ 
493 /* (pn_( 385 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2-2*x^2*'diff(y,x,1)+2*x*y ,y,x)); */ 
495 /*  386  */ 
496 (pn_(386),ans:contrib_ode(eqn:('diff(y,x,1))^2+a*x^3*'diff(y,x,1)-2*a*x^2*y,y,x));
497 [-((sqrt(8*a*y+a^2*x^4)+a*x^2)/(sqrt(3)*sqrt(-a)))=%c];
498 [method,ode_check(eqn,ans[1])];
499 [lie,0];
501 /*  387  Not sure about this one - ode_check() chokes
502          This was "solved" by ode1_lie until Jan 2007. */
503 (pn_(387),ans:contrib_ode(eqn:('diff(y,x,1))^2+%e^x*('diff(y,x,1)-y),y,x));
504 false;
506 /*  388  */ 
507 (pn_(388),ans:contrib_ode(eqn:('diff(y,x,1))^2-2*y*'diff(y,x,1)-2*x,y,x));
508 false;
510 /*  389  */ 
511 (pn_(389),ans:contrib_ode(eqn:('diff(y,x,1))^2-(4*y+1)*'diff(y,x,1)+y*(4*y+1),y,x));
512 [[x=log(sqrt(8*%t+1)+1)+%c,y=-((sqrt(8*%t+1)-4*%t+1)/8)],[x=log(sqrt(8*%t+1)-1)+%c,y=(sqrt(8*%t+1)+4*%t-1)/8]];
513 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[1])];
514 [lagrange,0,0];
516 /*  390  */ 
517 (pn_(390),ans:contrib_ode(eqn:('diff(y,x,1))^2+a*y*'diff(y,x,1)-b*x-c,y,x));
518 false;
520 /*  391  */ 
521 (pn_(391),ans:contrib_ode(eqn:('diff(y,x,1))^2+(a*y+b*x)*'diff(y,x,1)+a*b*x*y,y,x));
522 [y=%c-b*x^2/2,y=%c*%e^-(a*x)];
523 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
524 [factor,0,0];
526 /*  392  */ 
527 (pn_(392),ans:contrib_ode(eqn:y^2*log(a*y)+('diff(y,x,1))^2-x*y*'diff(y,x,1),y,x));
528 [x-sqrt(x^2-4*log(a*y))=%c];
529 [method,ode_check(eqn,ans[1])];
530 [lie,0];
532 /*  393  */ 
533 /* This equation presents a problem - runs forever */ 
534 /* (pn_( 393 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2+2*cot(x)*y*'diff(y,x,1)-y^2 ,y,x)); */ 
536 /*  394  */ 
537 (pn_(394),ans:contrib_ode(eqn:ode[394],y,x));
538 false;
540 /*  395  */ 
541 /* This equation presents a problem - runs forever */ 
542 /* (pn_( 395 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2+2*f(x)*y*'diff(y,x,1)+g(x)*y^2+h(x) ,y,x)); */ 
544 /*  396  */ 
545 (pn_(396),ans:contrib_ode(eqn:('diff(y,x,1))^2+y*(y-x)*'diff(y,x,1)-x*y^3,y,x));
546 [y=%c*%e^(x^2/2),1/y=x+%c];
547 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
548 [factor,0,0];
550 /*  397  */ 
551 /* This equation presents a problem - runs forever */ 
552 /* (pn_( 397 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2-2*x^3*y^2*'diff(y,x,1)-4*x^2*y^3 ,y,x)); */ 
554 /*  398  */ 
555 /* This equation presents a problem - runs forever */ 
556 /* (pn_( 398 ),ans:contrib_ode(eqn: ('diff(y,x,1))^2-3*x*y^(2/3)*'diff(y,x,1)+9*y^(5/3) ,y,x)); */ 
557 /*  399  */ 
558 (pn_(399),ans:contrib_ode(eqn:2*('diff(y,x,1))^2+(x-1)*'diff(y,x,1)-y,y,x));
559 [y=%c*x+2*%c^2-%c,y=-((x^2-2*x+1)/8)];
560 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
561 [clairaut,0,0];
563 /*  400  */ 
564 (pn_(400),ans:contrib_ode(eqn:2*('diff(y,x,1))^2-2*x^2*'diff(y,x,1)+3*x*y,y,x));
565 [-((2*sqrt(x^4-6*x*y)-2*x^2)/(3*sqrt(x))) = %c];
566 /* Simplifies to [y=-(3*%c^2*x-4*%c*x^(5/2))/(8*x)] when 3*%c*sqrt(x)-2*x^2 < 0 */
567 [method,ode_check(eqn,ans[1])];
568 [lie,0];