Solving First Order ODEs using Symmetries
April 26, 2012
NAS Research Cluster Spring 2012:
Hannah Gilmore (gilmorehf@appstate.edu)
Michael Kelley (kelleyma1@appstate.edu)
Hadi Morrow (alsoqih@appstate.edu)
Huy Tu (tuhq@appstate.edu)
Mentor:
Dr. Bill Cook (cookwj@appstate.edu)
We looked at solving first order differential equations using symmetry methods. This maple worksheet
contains a few illustrative examples.
Initialize:
> | restart;
with(DEtools,DEplot): with(plots): |
We studied only first order equations which can be solved explicitly for . Any such equation can be
written in the following form: . We then write as a fraction /. (There are
many ways to do this. We usually choose and .)
> | DEqn := diff(y(x),x)=B(x,y(x))/A(x,y(x)):
DEqn; |
(1) |
In Pfaffian form we have:
> | -B(x,y)*dx+A(x,y)*dy=0; |
(2) |
Example 1: Our first example comes from Peter Hydon's Symmetry Methods for Differential Equations:
A Beginner's Guide. In fact, it is Equation 1.16 (page 15).
> | B := (x,y) -> (y^3+x^2*y-y-x)/(x^3+x*y^2+y-x):
A := (x,y) -> 1: DEqn; |
(3) |
This is equation is of the form: which is found in Table 6.1 (page 158) in Brian Cantwell's
Introduction to Symmetry Analysis. Such equation's solutions have rotational symmetry. The corresponding
tangent vectors are...
> | xi := y;
eta := -x; |
(4) |
So we get the following integrating factor which allows one to solve the DE:
> | M := 1/(A(x,y)*eta-B(x,y)*xi); |
(5) |
> | Int(simplify(-B(x,y)*M),x)=int(-B(x,y)*M,x);
Int(simplify(A(x,y)*M),y)=int(A(x,y)*M,y); |
(6) |
Notice that this is what Maple is doing internally.
> | infolevel[dsolve]:= 3:
dsolve(DEqn,implicit); infolevel[dsolve]:= 1: |
Methods for first order ODEs: |
--- Trying classification methods ---
trying a quadrature trying 1st order linear trying Bernoulli trying separable trying inverse linear trying homogeneous types: trying Chini differential order: 1; looking for linear symmetries 1st order, trying the canonical coordinates of the invariance group -> Computing canonical coordinates for the symmetry [y, -x] -> Calling odsolve with the ODE diff(y(x) x) = -x/y(x) y(x) *** Sublevel 2 *** Methods for first order ODEs: --- Trying classification methods --- trying a quadrature trying 1st order linear trying Bernoulli <- Bernoulli successful |
-> Computing canonical coordinates for the symmetry [0, (-y^4+(-2*x^2+1)*y^2-x^4+x^2)/(x^3+x*y^2+y-x)] |
<- 1st order, canonical coordinates successful | |
(7) |
The following plot shows displays the rotational symmetry of the solutions.
> | p[1] := dsolve({y(0) = 1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1 .. 1):
p[2] := dsolve({y(0) = -1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1 .. 1): p[3] := dsolve({y(0) = 2.7/5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.95500121 .. 0.19882047): p[4] := dsolve({y(0) = -2.7/5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.19882047 .. 0.95500121): p[5] := dsolve({y(0.19) = 0.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.0090753013 .. 0.20164819): p[6] := dsolve({y(-0.19) = -0.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.20164819 .. 0.0090753013): p[7] := dsolve({y(-0.95500121) = -0.085, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.95500121 .. 0.19882047): p[8] := dsolve({y(0.95500121) = 0.085, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.19882047..0.95500121): p[9] := dsolve({y(0) = 2, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.0172241 .. 0.1): p[10] := dsolve({y(0) = -2, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.1 .. 1.0172241): p[11] := dsolve({y(0) = 0.15, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.6786012 .. 0.048796631): p[12] := dsolve({y(0) = -0.15, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.048796631 .. 0.6786012): p[13] := dsolve({y(-0.6786012) = -0.31, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.6786012 .. 0.99825818): p[14] := dsolve({y(0.6786012) = 0.31, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.99825818 .. 0.6786012): p[15] := dsolve({y(0.048796631) = 0.0475, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.0021139841 .. 0.048796631): p[16] := dsolve({y(-0.048796631) = -0.0475, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -0.048796631 .. 0.0021139841): p[17] := dsolve({y(0) = 1.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1 .. 2.25): p[18] := dsolve({y(0) = -1.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -2 .. 1): p[19] := dsolve({y(1.2) = 0.2, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1 .. 2.25): p[20] := dsolve({y(-1.2) = -0.2, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -2.25 .. 1): display(seq(odeplot(p[i]),i=1..20),scaling=constrained); |
Example 2:
> | B := (x,y) -> y/(x+(y/x)):
A := (x,y) -> 1: DEqn := diff(y(x),x)=B(x,y(x))/A(x,y(x)): DEqn; |
(8) |
Of the form:
The table gives us the following:
> | xi := x*y;
eta := y^2; |
(9) |
> | M := 1/(A(x,y)*eta-B(x,y)*xi); |
(10) |
> | Int(simplify(-B(x,y)*M),x)=int(-B(x,y)*M,x);
Int(simplify(A(x,y)*M),y)=int(A(x,y)*M,y); |
(11) |
Solution:
> | C = -1/2*x^2/y^2-1/y; |
(12) |
Maple's solution:
> | infolevel[dsolve]:= 3:
dsolve(DEqn); infolevel[dsolve]:= 1: |
Methods for first order ODEs: |
--- Trying classification methods ---
trying a quadrature trying 1st order linear trying Bernoulli trying separable trying inverse linear trying homogeneous types: trying homogeneous G |
<- homogeneous successful | |
(13) |
Example 3:
> | B := (x,y) -> y/(x+(y/x)^2+1):
A := (x,y) -> 1: DEqn := diff(y(x),x)=B(x,y(x))/A(x,y(x)): DEqn; |
(14) |
Of the form:
The table gives us the following:
> | xi := x*y;
eta := y^2; |
(15) |
> | M := 1/(A(x,y)*eta-B(x,y)*xi); |
(16) |
> | Int(simplify(-B(x,y)*M),x)=int(-B(x,y)*M,x);
Int(simplify(A(x,y)*M),y)=int(A(x,y)*M,y); |
(17) |
Solution:
> | C = -x/y+arctan(x/y)-1/y; |
(18) |
Maple's solution:
> | infolevel[dsolve]:= 3:
dsolve(DEqn,implicit); infolevel[dsolve]:= 1: |
Methods for first order ODEs: |
--- Trying classification methods ---
trying a quadrature trying 1st order linear trying Bernoulli trying separable trying inverse linear trying homogeneous types: trying Chini differential order: 1; looking for linear symmetries trying exact Looking for potential symmetries trying inverse_Riccati trying an equivalence to an Abel ODE trying 1st order ODE linearizable_by_differentiation |
--- Trying Lie symmetry methods, 1st order ---
-> Computing symmetries using: way = 2 |
|
<- successful computation of symmetries.
trying an integrating factor from the invariance group <- integrating factor successful |
|
(19) |
A couple of plots of some solutions:
> | p[1] := dsolve({y(-2) = 0.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -2 .. 2):
p[2] := dsolve({y(-1.5) = 0.5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -2 .. 2): p[3] := dsolve({y(-1.05) = 0.5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.08229 .. 2): p[4] := dsolve({y(-1.05) = 0.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.100457 .. 2): p[5] := dsolve({y(-1.01) = 0.01, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.392886 .. 2): p[6] := dsolve({y(-1.4) = 1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.4056867 .. 2): p[7] := dsolve({y(.5) = 3/5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.014050 .. 2): p[8] := dsolve({y(-2) = -0.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -2 .. 2): p[9] := dsolve({y(-1.5) = -0.5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -2 .. 2): p[10] := dsolve({y(-1.05) = -0.5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.08229 .. 2): p[11] := dsolve({y(-1.05) = -0.1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.100457 .. 2): p[12] := dsolve({y(-1.01) = -0.01, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.392886 .. 2): p[13] := dsolve({y(-1.4) = -1, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.4056867 .. 2): p[14] := dsolve({y(.5) = -3/5, (D(y))(x) = rhs(DEqn)}, type = numeric, range = -1.014050 .. 2): display(seq(odeplot(p[i]),i=1..14),scaling=constrained); |
> | S := dsolve(DEqn,implicit); |
(20) |
> | contourplot(lhs(subs(_C1=0,S)),x=-1.8..2,y=-2.5..2.5,contours=[-0.1,-0.5,-0.7,-1,-2,-5,0.1,0.5,0.7,1,2,5],numpoints=5000,color=red); |
Example 4:
> | B := (x,y) -> (y/x)+x*((y/x)^2+1):
A := (x,y) -> 1: DEqn := diff(y(x),x)=B(x,y(x))/A(x,y(x)): DEqn; |
(21) |
This is of the form
The table then gives us...
> | xi := 1;
eta := y/x; |
(22) |
> | M := 1/(A(x,y)*eta-B(x,y)*xi); |
(23) |
> | Int(simplify(-B(x,y)*M),x)=int(-B(x,y)*M,x);
Int(simplify(A(x,y)*M),y)=int(A(x,y)*M,y); |
(24) |
Solution:
> | C=x+arctan(x/y); |
(25) |
Maple's solution:
> | infolevel[dsolve]:= 3:
dsolve(DEqn,implicit); infolevel[dsolve]:= 1: |
Methods for first order ODEs: |
--- Trying classification methods ---
trying a quadrature trying 1st order linear trying Bernoulli trying separable trying inverse linear trying homogeneous types: trying homogeneous D |
<- homogeneous successful | |
(26) |
Example 5:
> | B := (x,y) -> y/(x*(ln(x)+ln(y))):
A := (x,y) -> 1: DEqn := diff(y(x),x)=B(x,y(x))/A(x,y(x)): DEqn; |
(27) |
This equation is of the form
The table then gives us...
> | xi := x*y;
eta := 0; |
(28) |
> | M := 1/(A(x,y)*eta-B(x,y)*xi); |
(29) |
> | Int(simplify(-B(x,y)*M),x)=int(-B(x,y)*M,x);
Int(simplify(A(x,y)*M),y)=int(A(x,y)*M,y); |
(30) |
Solution:
> | C=ln(x)/y+ln(y)/y+1/y; |
(31) |
Maple's solution:
> | infolevel[dsolve]:= 3:
dsolve(DEqn,implicit); infolevel[dsolve]:= 1: |
Methods for first order ODEs: |
--- Trying classification methods ---
trying a quadrature trying 1st order linear trying Bernoulli trying separable trying inverse linear trying homogeneous types: trying homogeneous G 1st order, trying the canonical coordinates of the invariance group -> Computing canonical coordinates for the symmetry [0, -(ln(x)+ln(y)+1)/(ln(x)+ln(y))*y] <- 1st order, canonical coordinates successful <- homogeneous successful |
|
(32) |
Example 6:
> | B := (x,y) -> y*(ln(y)-x):
A := (x,y) -> 1: DEqn := diff(y(x),x)=B(x,y(x))/A(x,y(x)): DEqn; |
(33) |
This equation is of the form
The table then gives us...
> | xi := 1;
eta := y; |
(34) |
> | M := 1/(A(x,y)*eta-B(x,y)*xi); |
(35) |
> | Int(simplify(-B(x,y)*M),x)=int(-B(x,y)*M,x);
Int(simplify(A(x,y)*M),y)=int(A(x,y)*M,y); |
(36) |
Solution:
> | C=x-ln(ln(y)-x-1); |
(37) |
Maple's solution:
> | infolevel[dsolve]:= 3:
dsolve(DEqn,implicit); infolevel[dsolve]:= 1: |
Methods for first order ODEs:
--- Trying classification methods --- trying a quadrature trying 1st order linear trying Bernoulli trying separable trying inverse linear trying homogeneous types: trying Chini differential order: 1; looking for linear symmetries |
1st order, trying the canonical coordinates of the invariance group
-> Computing canonical coordinates for the symmetry [1, y] -> Calling odsolve with the ODE diff(y(x) x) = y(x) y(x) *** Sublevel 2 *** Methods for first order ODEs: --- Trying classification methods --- trying a quadrature trying 1st order linear <- 1st order linear successful -> Computing canonical coordinates for the symmetry [0, (x+1-ln(y))*y] <- 1st order, canonical coordinates successful |
|
(38) |