Fix typo in display-html-help
[maxima.git] / share / contrib / diffequations / tests / rtestode_murphy_1_1.mac
bloba3acbc3de35ebf74c1d01ad69c17a3a4a982fb4a
1 (load("contrib_ode"),0);
2 0$
4 /* ODE tests - Murphy equations 1.1 - 1.100
6   Reference: 
7     G M Murphy, Ordinary Differential Equations and Their 
8     Solutions, Van Nostrand, 1960
10   First Order and of First Degree, p 224 ff
13 /* Don't kill(all); It messes up trigsimp */
15 /* Print ode number*/
16 (pn_(n_):=print("Murphy ODE 1.",n_),true);
17 true;
19 /*   1 */
20 (pn_(1),ans:contrib_ode(eqn:'diff(y,x)=a*f(x),y,x));
21  [y=a*'integrate(f(x),x)+%c];
22 [method,ode_check(eqn,ans[1])];
23 [linear,0];
25 /*   2 */
26 (pn_(2),ans:contrib_ode(eqn:'diff(y,x)=x+sin(x)+y,y,x));
27 [y = %e^x*(%e^-x*(-sin(x)-cos(x))/2+(-x-1)*%e^-x+%c)];
28 [method,ode_check(eqn,ans[1])];
29 [linear,0];
31 /*   3 */
32 (pn_(3),ans:contrib_ode(eqn:'diff(y,x)=x^2+3*cosh(x)+2*y,y,x),0);
34 ans:expand(ans[1]);
35 y = %c*%e^(2*x)-3*%e^x/2-%e^-x/2-x^2/2-x/2-1/4;
36 [method,ode_check(eqn,ans)];
37 [linear,0];
39 /* 4 */
40 (pn_(4),ans:contrib_ode(eqn:'diff(y,x)=a+b*x+c*y,y,x));
41 [y=(-b*(c*x+1)*%e^-(c*x)/c^2-a*%e^-(c*x)/c+%c)*%e^(c*x)];
42 [method,ode_check(eqn,ans[1])];
43 [linear,0];
45 /* 5 */
46 (pn_(5),ans:contrib_ode(eqn:'diff(y,x)=a*cos(b*x+c)+k*y,y,x));
47 [y=%e^(k*x)*(a*%e^-(k*x)*(b*sin(b*x+c)-k*cos(b*x+c))/(k^2+b^2)+%c)];
48 [method,ode_check(eqn,ans[1])];
49 [linear,0];
51 /* 6 */
52 (pn_(6),ans:contrib_ode(eqn:'diff(y,x)=a*sin(b*x+c)+k*y,y,x));
53 [y=%e^(k*x)*(a*%e^-(k*x)*(-k*sin(b*x+c)-b*cos(b*x+c))/(k^2+b^2)+%c)];
54 [method,ode_check(eqn,ans[1])];
55 [linear,0];
57 /* 7 */
58 (pn_(7),assume(c>0,k>c),ans:contrib_ode(eqn:'diff(y,x)=a+b*exp(k*x)+c*y,y,x),forget(c>0,k>c),0);
60 expand(ans[1]);
61 y = (-(b*%e^(k*x))/(c-k))+%c*%e^(c*x)-a/c$
62 [method,ode_check(eqn,ans[1])];
63 [linear,0];
65 /* 8 */
66 (pn_(8),ans:contrib_ode(eqn:'diff(y,x)=x*(x^2-2*y),y,x));
67 [y = %e^-x^2*((x^2-1)*%e^x^2/2+%c)];
68 [method,ode_check(eqn,ans[1])];
69 [linear,0];
71 /* 9 NOTE: Case a=2 is special */
72 (pn_(9),ans:contrib_ode(eqn:'diff(y,x)=x*(exp(-x^2)-a*y),y,x));
73 [y = %e^-(a*x^2/2)*(%e^(a*x^2/2-x^2)/(a-2)+%c)];
74 [method,ode_check(eqn,ans[1])];
75 [linear,0];
77 ans:contrib_ode(eqn:'diff(y,x)=x*(exp(-x^2)-2*y),y,x);
78 [y=(x^2/2+%c)*%e^-x^2];
79 [method,ode_check(eqn,ans[1])];
80 [linear,0];
82 /* 10 */
83 (pn_(10),ans:contrib_ode(eqn:'diff(y,x)=x^2*(a*x^3+b*y),y,x));
84 [y = (%c-a*(3*b*x^3+9)*%e^-(b*x^3/3)/(3*b^2))*%e^(b*x^3/3)];
85 [method,ode_check(eqn,ans[1])];
86 [linear,0];
88 /* 11(i)  n#-1*/
89 (pn_(11),assume(not equal(n,-1)),ans:contrib_ode(eqn:'diff(y,x)=a*x^n*y,y,x),forget(not equal(n,-1)),ans);
90 [y = %c*%e^(a*x^(n+1)/(n+1))];
91 [method,ode_check(eqn,ans[1])];
92 [linear,0];
94 /* 11(ii) n=-1*/
95 ans:contrib_ode(eqn:'diff(y,x)=a*x^-1*y,y,x);
96 [y = %c*%e^(a*log(x))];
97 [method,ode_check(eqn,ans[1])];
98 [linear,0];
100 /* 12 */
101 (pn_(12),ans:contrib_ode(eqn:'diff(y,x)=cos(x)*sin(x)+y*cos(x),y,x));
102 [y = (%e^-sin(x)*(-sin(x)-1)+%c)*%e^sin(x)];
103 ans:expand(ans[1]);
104 y = %c*%e^sin(x)-sin(x)-1;
105 [method,ode_check(eqn,ans)];
106 [linear,0];
108 /* 13 */
109 (pn_(13),ans:contrib_ode(eqn:'diff(y,x)=exp(sin(x))+y*cos(x),y,x));
110 [y = (x+%c)*%e^sin(x)];
111 [method,ode_check(eqn,ans[1])];
112 [linear,0];
114 /* 14 */
115 (pn_(14),ans:contrib_ode(eqn:'diff(y,x)=y*cot(x),y,x));
116 [y = %c*sin(x)];
117 [method,ode_check(eqn,ans[1])];
118 [linear,0];
120 /* 15 */
121 (pn_(15),ans:contrib_ode(eqn:'diff(y,x)=1-y*cot(x),y,x));
122 [y = (%c-cos(x))/sin(x)];
123 [method,ode_check(eqn,ans[1])];
124 [linear,0];
126 /* 16 */
127 (pn_(16),ans:contrib_ode(eqn:'diff(y,x)=x*csc(x)-y*cot(x),y,x));
128 [y = (x^2/2+%c)/sin(x)];
129 [method,ode_check(eqn,ans[1])];
130 [linear,0];
132 /* 17 */
133 (pn_(17),ans:contrib_ode(eqn:'diff(y,x)=(2*csc(2*x)+cot(x))*y,y,x));
134 [y = %c*sin(x)/(csc(2*x)+cot(2*x))];
135 [method,ode_check(eqn,ans[1])];
136 [linear,0];
138 /* 18 */
139 (pn_(18),ans:contrib_ode(eqn:'diff(y,x)=sec(x)-y*cot(x),y,x));
140 [y = (%c-log(1-sin(x)^2)/2)/sin(x)];
141 ans:subst(cos(x)^2,1-sin(x)^2,ans[1]);
142 y = (%c-log(cos(x)))/sin(x);
143 [method,ode_check(eqn,ans)];
144 [linear,0];
146 /* 19 */
147 (pn_(19),ans:contrib_ode(eqn:'diff(y,x)=exp(x)*sin(x)+y*cot(x),y,x));
148 [y = (%e^x+%c)*sin(x)];
149 [method,ode_check(eqn,ans[1])];
150 [linear,0];
152 /* 20 */
153 (pn_(20),ans:contrib_ode(eqn:'diff(y,x)+csc(x)+2*y*cot(x)=0,y,x));
154 [y = (cos(x)+%c)/sin(x)^2];
155 [method,ode_check(eqn,ans[1])];
156 [linear,0];
158 /* 21 */
159 (pn_(21),ans:contrib_ode(eqn:'diff(y,x)=2*csc(2*x)*sec(x)^2-2*y*cot(2*x),y,x));
160 [y=(4*sin(2*x)/(sin(2*x)^2+cos(2*x)^2+2*cos(2*x)+1)+%c)/sin(2*x)];
161 [method,ode_check(eqn,ans[1])];
162 [linear,0];
164 /* 22 */
165 (pn_(22),ans:contrib_ode(eqn:'diff(y,x)=2*(cot(x)^2*cos(2*x)-y*csc(2*x)),y,x));
166 [y = (csc(2*x)+cot(2*x))*(log(sin(x)^2+cos(x)^2+2*cos(x)+1)
167        +log(sin(x)^2+cos(x)^2-2*cos(x)+1)+cos(2*x)+%c)];
168 [method,ode_check(eqn,ans[1])];
169 [linear,0];
171 /* 23 */
172 (pn_(23),ans:contrib_ode(eqn:'diff(y,x)=2*csc(2*x)*(sin(x)^3+y),y,x),ans:map(lambda([e],map(trigrat,e)),ans));
173 [y=-((sin(2*x)-2*%c*sin(x))/(2*cos(x)))];
174 [method,ode_check(eqn,ans[1])];
175 [linear,0];
177 /* 24 */
178 (pn_(24),ans:contrib_ode(eqn:'diff(y,x)=2*csc(2*x)*(1-tan(x)^2+y),y,x),ans:map(lambda([e],map(trigrat,e)),ans));
179 [y=(%c*sin(2*x)-2)/(cos(2*x)+1)];
180 [method,ode_check(eqn,ans[1])];
181 [linear,0];
183 /* 25 */
184 (pn_(25),ans:contrib_ode(eqn:'diff(y,x)=y*sec(x),y,x));
185 [y = %c*(tan(x)+sec(x))];
186 [method,ode_check(eqn,ans[1])];
187 [linear,0];
189 /* 26 */
190 (pn_(26),ans:contrib_ode(eqn:'diff(y,x)+tan(x)=(1-y)*sec(x),y,x));
191 [y=(x+%c)/(tan(x)+sec(x))];
192 [method,ode_check(eqn,ans[1])];
193 [linear,0];
195 /* 27 */
196 (pn_(27),ans:contrib_ode(eqn:'diff(y,x)=y*tan(x),y,x));
197 [y=%c*sec(x)];
198 [method,ode_check(eqn,ans[1])];
199 [linear,0];
201 /* 28 */
202 (pn_(28),ans:contrib_ode(eqn:'diff(y,x)=cos(x)+y*tan(x),y,x));
203 [y=sec(x)*((sin(2*x)/2+x)/2+%c)];
204 [method,ode_check(eqn,ans[1])];
205 [linear,0];
207 /* 29 */
208 (pn_(29),ans:contrib_ode(eqn:'diff(y,x)=cos(x)-y*tan(x),y,x));
209 [y=(x+%c)/sec(x)];
210 [method,ode_check(eqn,ans[1])];
211 [linear,0];
213 /* 30 */
214 (pn_(30),ans:contrib_ode(eqn:'diff(y,x)=sec(x)-y*tan(x),y,x));
215 [y=(tan(x)+%c)/sec(x)];
216 [method,ode_check(eqn,ans[1])];
217 [linear,0];
219 /* 31 */
220 (pn_(31),ans:contrib_ode(eqn:'diff(y,x)=sin(2*x)+y*tan(x),y,x));
221 [y=(%c-2*cos(x)^3/3)*sec(x)];
222 [method,ode_check(eqn,ans[1])];
223 [linear,0];
225 /* 32 */
226 (pn_(32),ans:contrib_ode(eqn:'diff(y,x)=sin(2*x)-y*tan(x),y,x));
227 [y=(%c-2*cos(x))/sec(x)];
228 [method,ode_check(eqn,ans[1])];
229 [linear,0];
231 /* 33 */
232 (pn_(33),ans:contrib_ode(eqn:'diff(y,x)=sin(x)+2*y*tan(x),y,x));
233 [y=(%c-cos(x)^3/3)*sec(x)^2];
234 [method,ode_check(eqn,ans[1])];
235 [linear,0];
237 /* 34 */
238 (pn_(34),ans:contrib_ode(eqn:'diff(y,x)=2*(1+sec(2*x)+y*tan(2*x)),y,x));
239 [y=sec(2*x)*(sin(2*x)+2*x+%c)];
240 [method,ode_check(eqn,ans[1])];
241 [linear,0];
243 /* 35 */
244 (pn_(35),ans:contrib_ode(eqn:'diff(y,x)=csc(x)+3*y*tan(x),y,x));
245 [y=sec(x)^3*(log(sin(x))-sin(x)^2/2+%c)];
246 [method,ode_check(eqn,ans[1])];
247 [linear,0];
249 /* 36 */
250 (pn_(36),ans:contrib_ode(eqn:'diff(y,x)=(a+cos(log(x))+sin(log(x)))*y,y,x));
251 [y=%c*%e^(x*(sin(log(x))+cos(log(x)))/2+x*(sin(log(x))-cos(log(x)))/2+a*x)];
252 (assume(x>0),ans:map(trigrat,ans[1]),forget(x>0),ans);
253 y=%c*%e^(x*sin(log(x))+a*x);
254 [method,ode_check(eqn,ans)];
255 [linear,0];
257 /* 37 */
258 (pn_(37),ans:contrib_ode(eqn:'diff(y,x)=6*exp(2*x)-y*tanh(x),y,x),0);
260 expand(ans[1]);
261 y=%e^(3*x)/cosh(x)+(3*%e^x)/cosh(x)+%c/cosh(x)$
262 [method,ode_check(eqn,ans[1])];
263 [linear,0];
265 /* 38 - too general*/
266 /* 39 - too general */
268 /* 41  Riccati */
270 /* 42  Riccati */
271 (pn_(42),ans:contrib_ode(eqn:'diff(y,x)+1-x=(x+y)*y,y,x),0);
273 [method,ode_check(eqn,ans[1])];
274 [riccati,0];
276 /* 43  Riccati */
277 (pn_(43),ans:contrib_ode(eqn:'diff(y,x)=(x+y)^2,y,x));
278 [[x=%c-atan(sqrt(%t)),y=-x-sqrt(%t)],[x=atan(sqrt(%t))+%c,y=sqrt(%t)-x]];
279 solve(ans[1][1],sqrt(%t));
280 [sqrt(%t)=-tan(x-%c)];
281 ans[1]:ev(ans[1][2],%[1]);
282 y=tan(x-%c)-x;
283 solve(ans[2][1],sqrt(%t));
284 [sqrt(%t)=tan(x-%c)];
285 ans[2]:ev(ans[2][2],%[1]);
286 y=tan(x-%c)-x;
287 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
288 [lagrange,0,0];
290 /* 44  Riccati */
291 (pn_(44),ans:contrib_ode(eqn:'diff(y,x)=(x-y)^2,y,x));
292 [[x = log(sqrt(%t)+1)/2-log(sqrt(%t)-1)/2+%c,y = x-sqrt(%t)],[x=-log(sqrt(%t)+1)/2+log(sqrt(%t)-1)/2+%c,y=x+sqrt(%t)]];
293 solve(ans[1][2],sqrt(%t));
294 [sqrt(%t) = x-y];
295 ans[1][1],%[1];
296 x=log(-y+x+1)/2-log(-y+x-1)/2+%c;
297 expand(2*(%-%c));
298 2*x-2*%c = log(-y+x+1)-log(-y+x-1);
299 map(exp,%);
300 %e^(2*x-2*%c) = (-y+x+1)/(-y+x-1);
301 ans[1]:first(solve(%,y));
302 y=((x-1)*%e^(2*x-2*%c)-x-1)/(%e^(2*x-2*%c)-1);
303 solve(ans[2][2],sqrt(%t));
304 [sqrt(%t) = y-x];
305 ans[2][1],%[1];
306 x=-log(y-x+1)/2+log(y-x-1)/2+%c;
307 expand(2*(%-%c));
308 2*x-2*%c = log(y-x-1)-log(y-x+1);
309 map(exp,%);
310 %e^(2*x-2*%c)=(y-x-1)/(y-x+1);
311 ans[2]:first(solve(%,y));
312 y=((x-1)*%e^(2*x-2*%c)-x-1)/(%e^(2*x-2*%c)-1);
313 [method,ode_check(eqn,ans[1]),ode_check(eqn,ans[2])];
314 [lagrange,0,0];
316 /* 45 */
317 (pn_(45),ans:contrib_ode(eqn:'diff(y,x)=3*(1-x+y)+(x-y)^2,y,x));
318 [y = (x*(%c*%e^x+1)-2*%c*%e^x-1)/(%c*%e^x+1) ];
319 [method,ode_check(eqn,ans[1])];
320 [riccati,0];
322 /* 46 riccati */
323 (pn_(46),ans:contrib_ode(eqn:'diff(y,x)=2*x-(1+x^2)*y+y^2,y,x));
324 [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)];
325 [method,ode_check(eqn,ans[1])];
326 [riccati,0];
328 /* 47 Riccati */
329 (pn_(47),ans:contrib_ode(eqn:'diff(y,x)=x*(2+x^3)-(2*x^2-y)*y,y,x));
330 [y=(%c*x^3+x^2-%c)/(%c*x+1)];
331 [method,ode_check(eqn,ans[1])];
332 [riccati,0];
334 /* 48 Riccati */
335 (pn_(48),ans:contrib_ode(eqn:'diff(y,x)=1+x*(2-x^3)+(2*x^2-y)*y,y,x));
336 [y = (x^2*(%c*%e^(2*x)+1)+%c*%e^(2*x)-1)/(%c*%e^(2*x)+1) ];
337 [method,ode_check(eqn,ans[1])];
338 [riccati,0];
340 /* 49 Riccati */
341 (pn_(49),ans:contrib_ode(eqn:'diff(y,x)=cos(x)-(sin(x)-y)*y,y,x));
342 [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))];
343 [method,ode_check(eqn,ans[1])];
344 [riccati,0];
346 /* 50 Riccati 
347    Fails as can't solve 'diff(z,x,2) - sin(2*x)*'diff(z,x) + cos(2*x)*z = 0
349 (pn_(50),ans:contrib_ode(eqn:'diff(y,x)=cos(2*x)+(sin(2*x)+y)*y,y,x));
350 [[y=-'diff(%u,x,1)/%u,-'diff(%u,x,1)*sin(2*x)+%u*cos(2*x)+'diff(%u,x,2) = 0]];
352 /* 51 Riccati */
354 /* 52 Riccati */
355 (pn_(52),ans:contrib_ode(eqn:'diff(y,x)=(3+x-4*y)^2,y,x));
356 [y = (x*(2*%c*%e^(4*x)+2)+5*%c*%e^(4*x)+7)/(8*%c*%e^(4*x)+8) ];
357 [method,ode_check(eqn,ans[1])];
358 [riccati,0];
360 /* 53 Riccati */
361 (pn_(53),ans:contrib_ode(eqn:'diff(y,x)=(1+4*x+9*y)^2,y,x));
362  [y = -((x*(12*%c*%e^(12*%i*x)+12)+(2*%i*%c+3*%c)*%e^(12*%i*x)-2*%i+3)
363           /(27*%c*%e^(12*%i*x)+27))];
364 [method,ode_check(eqn,ans[1])];
365 [riccati,0];
367 /* 54 Riccati */
369 /* 55 Riccati and separable*/
370 assume(a>0,b>0);
371 [a>0,b>0];
372 (pn_(55.1),ans:contrib_ode(eqn:'diff(y,x)=a+b*y^2,y,x));
373 [atan(sqrt(b)*y/sqrt(a))/(sqrt(a)*sqrt(b)) = x+%c];
374 solve(ans[1],y);
375 [y = sqrt(a)*tan(sqrt(a)*sqrt(b)*x+%c*sqrt(a)*sqrt(b))/sqrt(b)];
376 [method,ode_check(eqn,%[1])];
377 [separable,0];
378 forget(a>0,b>0);
379 [a>0,b>0];
381 assume(a>0,b<0);
382 [a>0,b<0];
383 (pn_(55.2),ans:contrib_ode(eqn:'diff(y,x)=a+b*y^2,y,x));
384 [log(-((sqrt(a)*sqrt(-b)-b*y)/(b*y+sqrt(a)*sqrt(-b))))/(2*sqrt(a)*sqrt(-b))=x+%c];
385 solve(%[1],y);
386 [y=-((sqrt(a)*sqrt(-b)*%e^(2*sqrt(a)*sqrt(-b)*x+2*%c*sqrt(a)*sqrt(-b))+sqrt(a)*sqrt(-b))/(b*%e^(2*sqrt(a)*sqrt(-b)*x+2*%c*sqrt(a)*sqrt(-b))-b))];
387 [method,ode_check(eqn,%[1])];
388 [separable,0];
389 forget(a>0,b<0);
390 [a>0,b<0];
392 /* 57 Riccati */
394 /* 58 Riccati */
396 /* 61 Riccati */
398 /* 62 Riccati - See Kamke 1.27 */
399 /* (pn_(62),ans:contrib_ode(eqn:'diff(y,x)=1+a*(x-y)*y,y,x)); */
401 /* 63 Riccati */
403 /* 64 */
404 (pn_(64),ans:contrib_ode(eqn:'diff(y,x)=x*y*(3+y),y,x));
405 [-((log(y+3)-log(y))/3)=x^2/2+%c];
406 map(exp,3*ans[1]);
407 y/(y+3) = %e^(3*(x^2/2+%c));
408 ans:first(solve(%,y));
409 y=-3*%e^(3*x^2/2+3*%c)/(%e^(3*x^2/2+3*%c)-1);
410 [method,ode_check(eqn,%)];
411 [separable,0];
413 /* 65 Riccati */
414 (pn_(65),ans:contrib_ode(eqn:'diff(y,x)=1-x-x^3+(1+2*x^2)*y-x*y^2,y,x));
415 [y = (x^2*%e^x+%e^x+x*(%c-%e^x))/(x*%e^x-%e^x+%c) ];
416 [method,ode_check(eqn,ans[1])];
417 [riccati,0];
419 /* 66 Riccati */
420 (pn_(66),ans:contrib_ode(eqn:'diff(y,x)=x*(2+x^2*y-y^2),y,x));
421 [y = %e^-(x^4/4)*(x^2*%e^(x^4/4)*(sqrt(%pi)*%c*erf(x^2/2)+sqrt(%pi))
422      +2*%c)/(sqrt(%pi)*%c*erf(x^2/2)+sqrt(%pi))];
423 [method,ode_check(eqn,ans[1])];
424 [riccati,0];
426 /* 67 Riccati */
427 (pn_(67),ans:contrib_ode(eqn:'diff(y,x)=x+(1-2*x)*y-(1-x)*y^2,y,x));
428 [y = (%e^x+%c*x+%c)/(%e^x+%c*x)];
429 [method,ode_check(eqn,ans[1])];
430 [riccati,0];
432 /* 68 */
433 (pn_(68),ans:contrib_ode(eqn:'diff(y,x)=a*x*y^2,y,x));
434 [-1/(a*y)=x^2/2+%c];
435 ans:first(solve(ans[1],y));
436 y=-2/(a*x^2+2*%c*a);
437 [method,ode_check(eqn,ans)];
438 [separable,0];
440 /* 70 Riccati */
442 /* 72 Riccati */
443 (pn_(72),ans:contrib_ode(eqn:'diff(y,x)=sin(x)*(2*sec(x)^2-y^2),y,x));
444 [[y='diff(%u,x,1)/(%u*sin(x)),2*%u*sec(x)^2*sin(x)^3-'diff(%u,x,2)*sin(x)+'diff(%u,x,1)*cos(x)=0]];
446 /* 73 Riccati - FIXME 2006-12-11 - Runs forever */
447 /* (pn_(73),ans:contrib_ode(eqn:'diff(y,x)+4*csc(x)=(3-cot(x))*y+sin(x)*y^2,y,x));
448 [[y=-'diff(%u,x,1)/(%u*sin(x)),-4*%u*csc(x)*sin(x)^2-'diff(%u,x,1)*((3-cot(x))*sin(x)+cos(x))+'diff(%u,x,2)*sin(x)=0]]; */
450 /* 74 */
451 (pn_(74),ans:contrib_ode(eqn:'diff(y,x)=y*sec(x)+(sin(x)-1)^2,y,x));
452 [y = (tan(x)+sec(x))*(-8*(log(sin(x)^2/(cos(x)+1)^2+1)/4
453                                -log(sin(x)/(cos(x)+1)+1)/2
454                                +sin(x)/((cos(x)+1)
455                                        *(2*sin(x)^2/(cos(x)+1)^2+2)))
456                            +8*(-log(sin(x)^2/(cos(x)+1)^2+1)/8
457                               +log(sin(x)/(cos(x)+1)+1)/4
458                               -((sin(x)^3/(cos(x)+1)^3-sin(x)^2/(cos(x)+1)^2
459                                                      +sin(x)/(cos(x)+1))
460                                /(4*sin(x)^4/(cos(x)+1)^4
461                                 +8*sin(x)^2/(cos(x)+1)^2+4)))
462                            +2*(log(sin(x)/(cos(x)+1)+1)
463                               -log(sin(x)^2/(cos(x)+1)^2+1)/2)+%c)];
464 /* y = (tan(x)+sec(x))/(%c+sin(x)) ??? */
465 [method,ode_check(eqn,ans[1])];
466 [linear,0];
468 /* 75 */
469 (pn_(75),ans:contrib_ode(eqn:'diff(y,x)+tan(x)*(1-y^2)=0,y,x));
470 [-((log(y+1)-log(y-1))/2) = log(sec(x))+%c];
471 map(exp,2*ans[1]);
472 (y-1)/(y+1)=%e^(2*(log(sec(x))+%c));
473 ans:first(solve(%,y));
474 y=-((%e^(2*%c)*sec(x)^2+1)/(%e^(2*%c)*sec(x)^2-1));
475 [method,ode_check(eqn,ans)];
476 [separable,0];
478 /* 76 Riccati */
480 /* 78 Abel */
481 (pn_(78),ans:contrib_ode(eqn:'diff(y,x)+(a*x+y)*y^2=0,y,x));
482 false;
484 /* 79 Abel */
485 (pn_(79),ans:contrib_ode(eqn:'diff(y,x)+(a*exp(x)+y)*y^2=0,y,x));
486 false;
488 /* 88 */
489 (pn_(88),ans:contrib_ode(eqn:'diff(y,x)+2*x*y*(1+a*x^2*y^2)=0,y,x));
490 [y=%e^-x^2/sqrt(%c-a*(2*x^2+1)*%e^-(2*x^2)/2)];
491 [method,ode_check(eqn,ans[1])];
492 [bernoulli,0];
494 /* 91 */
495 (pn_(91),ans:contrib_ode(eqn:'diff(y,x)+(tan(x)+y^2*sec(x))*y=0,y,x));
496 [y=1/(sec(x)*sqrt(2*sin(x)+%c))];
497 [method,ode_check(eqn,ans[1])];
498 [bernoulli,0];
500 /* 92 */
501 (pn_(92),ans:contrib_ode(eqn:'diff(y,x)+y^3*sec(x)*tan(x)=0,y,x));
502 [1/(2*y^2)=1/cos(x)+%c];
503 ans:first(solve(ans[1],y));
504 y=-sqrt(cos(x)/(%c*cos(x)+1))/sqrt(2);
505 [method,ode_check(eqn,ans)];
506 [separable,0];
508 /* 93 - Generic Abel equation */
510 /* 94 */
511 (pn_(94),ans:contrib_ode(eqn:'diff(y,x)=(tan(x)+y^3*sec(x))*y,y,x));
512 [y=sec(x)/(%c-3*(tan(x)^3/3+tan(x)))^(1/3)];
513 [method,ode_check(eqn,ans[1])];
514 [bernoulli,0];
516 /* 95 */
517 /* (pn_(95),ans:contrib_ode(eqn:'diff(y,x)=a*x^(n/(1-n))+b*y^n,y,x)); */
519 /* 96 - Too general */
520 /* 97 - Too general */
521 /* 98 - Too general */
523 /* 99 */
524 (pn_(99),ans:contrib_ode(eqn:'diff(y,x)=sqrt(y),y,x));
525 [2*sqrt(y)=x+%c];
526 [method,ode_check(eqn,ans[1])];
527 [separable,0];
529 /* 100 */
530 (pn_(100),ans:contrib_ode(eqn:'diff(y,x)=a+by+sqrt(c+d*y),y,x));
531 [((-2*by-2*a)*log(sqrt(d*y+c)+by+a)+2*sqrt(d*y+c))/d = x+%c];
532 [method,ode_check(eqn,ans[1])];
533 [separable,0];