File: rtestode_murphy_1_3.mac

package info (click to toggle)
maxima-sage 5.45.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 113,788 kB
  • sloc: lisp: 440,833; fortran: 14,665; perl: 14,369; tcl: 10,997; sh: 4,475; makefile: 2,520; ansic: 447; python: 262; xml: 59; awk: 37; sed: 17
file content (107 lines) | stat: -rw-r--r-- 3,065 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
(load("contrib_ode"),0);
0$

/* ODE tests - Murphy equations 1.201 - 1.300

  Reference: 
    G M Murphy, Ordinary Differential Equations and Their 
    Solutions, Van Nostrand, 1960

  First Order and of First Degree, p 224 ff

*/
/* Don't kill(all); It messes up trigsimp */

/* Print ode number*/
(pn_(n_):=print("Murphy ODE 1.",n_),true);
true;

/* 201 */
assume(b>0);
[b>0];
(pn_(201),ans:contrib_ode(eqn:x*'diff(y,x)=y+a*sqrt(y^2+b*x^2),y,x));
[x=%c*%e^(x*asinh(y/(sqrt(b)*x))/(a*abs(x)))];
assume(x>0);
[x>0];
ratsimp(ans[1]);
x = %c*%e^(asinh(y/(sqrt(b)*x))/a);
map(log,%/%c);
log(x/%c) = asinh(y/(sqrt(b)*x))/a;
map(sinh,a*%);
sinh(a*log(x/%c)) = y/(sqrt(b)*x);
solve(%,y);
[y = sqrt(b)*x*sinh(a*log(x/%c))];
[method,ode_check(eqn,%[1])];
[genhom,0];
forget(b>0,x>0);
[b>0,x>0];

/* 240 riccati */

/* 249 */
ans:contrib_ode(eqn:3*x*'diff(y,x)=3*x^(2/3)+(1-3*y)*y,y,x);
[y=tanh(3*x^(1/3)+%c)*x^(1/3)];
[method,ode_check(eqn,ans[1])];
[riccati,0];

/* 266 */
(pn_(266),ans:contrib_ode(eqn:x^2*'diff(y,x)=a+b*x^n+x^2*y^2,y,x));
[[y=-'diff(%u,x,1)/%u,%u*(b*x^(n-2)+a/x^2)+'diff(%u,x,2)=0]];
method;
riccati;

/* 267 Riccati */
(pn_(267),ans:contrib_ode(eqn:x^2*'diff(y,x)+2+x*y*(4+x*y)=0,y,x));
[x=%c*(x*y+2)/(x*y+1)];
method;
genhom;

/* 268 */
(pn_(268),ans:contrib_ode(eqn:x^2*'diff(y,x)+2+a*x*(1-x*y)-x^2*y^2=0,y,x));
 [y = -((%c*a^3*x^3*%e^(a*x)-%c*a^2*x^2*%e^(a*x)+2*%c*a*x*%e^(a*x)
                                 -2*%c*%e^(a*x)-1)
          /(x*(2*%c*%e^(a*x)+1)+%c*a^2*x^3*%e^(a*x)-2*%c*a*x^2*%e^(a*x)))];
[method,ode_check(eqn,ans[1])];
[riccati,0];

/* 270 */
(pn_(270),ans:contrib_ode(eqn:x^2*'diff(y,x)=a+b*x^n+c*x^2*y^2,y,x));
[[y=-'diff(%u,x,1)/(%u*c),%u*c^2*(b*x^(n-2)+a/x^2)+'diff(%u,x,2)*c=0]];
method;
riccati;

/* 271 Riccati */
(pn_(271),assume(4*a*c-b^2-2*b-1>0),ans:contrib_ode(eqn:x^2*'diff(y,x)=a+b*x*y+c*x^2*y^2,y,x),forget(4*a*c-b^2-2*b-1>0),ans);
[x=%c*%e^(2*atan((2*c*x*y+b+1)/sqrt(4*a*c-b^2-2*b-1))/sqrt(4*a*c-b^2-2*b-1))];
method;
genhom;

/* 272 */
(pn_(272),ans:contrib_ode(eqn:x^2*'diff(y,x)=a+b*x*y+c*x^4*y^2,y,x));
[y = (sqrt(a)*(%c*bessel_y(-((b+5)/2),-sqrt(a)*sqrt(c)*x)
                    +bessel_j(-((b+5)/2),-sqrt(a)*sqrt(c)*x)
                    -%c*bessel_y(-((b+1)/2),-sqrt(a)*sqrt(c)*x)
                    -bessel_j(-((b+1)/2),-sqrt(a)*sqrt(c)*x))*sqrt(c)*x
         +b*(-%c*bessel_y(-((b+3)/2),-sqrt(a)*sqrt(c)*x)
            -bessel_j(-((b+3)/2),-sqrt(a)*sqrt(c)*x))
         -3*%c*bessel_y(-((b+3)/2),-sqrt(a)*sqrt(c)*x)
         -3*bessel_j(-((b+3)/2),-sqrt(a)*sqrt(c)*x))
         /((2*%c*bessel_y(-((b+3)/2),-sqrt(a)*sqrt(c)*x)
          +2*bessel_j(-((b+3)/2),-sqrt(a)*sqrt(c)*x))
          *c*x^3)];
[method,ode_check(eqn,ans[1])];
[riccati,0];

/* 275 - Abel eqn of 1st kind */
(pn_(275),ans:contrib_ode(eqn:x^2*'diff(y,x)=a*x^2*y^2-a*y^3,y,x));
false;

/* 276 - Abel eqn of 1st kind */
(pn_(276),ans:contrib_ode(eqn:x^2*'diff(y,x)+a*y^2+b*x^2*y^3=0,y,x));
false;

/* 300 Riccati */
(pn_(300),ans:contrib_ode(eqn:(1-x^2)*'diff(y,x)=1-(2*x-y)*y,y,x),0);
0$
[method,ode_check(eqn,ans[1])];
[riccati,0];