Lesson21.mw
ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL
Lesson 21  Nonlinear Equations
Prof. Douglas B. Meade
Industrial Mathematics Institute
Department of Mathematics
University of South Carolina
Columbia, SC 29208
URL: http://www.math.sc.edu/~meade/
Email: meade@math.sc.edu
Copyright 2001 by Douglas B. Meade
All rights reserved

Outline of Lesson 21
21.A Missing Dependent Variable
21.A1 Example 1
21.B Missing Independent Variable
21.B1 Example 2
21.C Linearization and Qualitative Analysis
21.C1 Example 3
21.C2 Example 4
Initialization
> 
with( VectorCalculus ): 
Warning, the name changecoords has been redefined
Warning, the assigned names arrow and translate now have a global binding
Warning, the assigned names `<,>` and `<>` now have a global binding
Warning, these protected names have been redefined and unprotected: `*`, `+`, `.`, D, Vector, diff, int, limit, series
Warning, the names `&x`, CrossProduct and DotProduct have been rebound
> 
CLRS := [ BLUE, GREEN, CYAN, AQUAMARINE ]: 
21.A Missing Dependent Variable:
To solve a nonlinear secondorder ODE of the form
> 
ODE := diff( y(x), x$2 ) = F( x, diff( y(x), x ) ); 
introduce a second dependent function
> 
new_dep_var := w(x) = diff( y(x), x ); 
Then
=
=
and the ODE can be rewritten as a firstorder system
> 
sys_ode1 := isolate( new_dep_var, diff( y(x), x ) ); 
> 
sys_ode2 := eval( ODE, sys_ode1 ); 
The secondorder ODE for
has become a firstorder ODE for
. Assuming this ODE can be solved (for
) by one of the firstorder methods discussed previously, integration of the firstorder ODE for
, i.e.,
, provides a solution to the secondorder ODE.
21.A1 Example 1
Consider the secondorder nonlinear ODE
> 
ode1 := 2*x*diff(y(x),x$2)  diff(y(x),x) + 1/diff(y(x),x) = 0; 
for
with initial conditions
> 
ic1 := y(1) = 2, D(y)(1) = 2; 
Since this equation does not contain the dependent variable,
, rewrite it as the firstorder system
> 
sys1 := [ sys_ode1, eval( ode1, sys_ode1 ) ]; 
with initial conditions
> 
sys_ic1 := eval( ic1, D(y)=w ); 
Maple classifies the ODE for
as a separable equation via the device
and finds the solution to be
> 
sol_w := dsolve( { sys1[2], sys_ic1[2] }, w(x), [separable] ); 
Now, the remaining firstorder ODE is
> 
q1 := eval( sys1[1], sol_w ); 
which can be solved by direct integration, leading to
> 
sol1 := dsolve( { q1, sys_ic1[1] }, y(x), [quadrature] ); 
A check that this function does solve the secondorder ODE consists in
and a test that it satisfied the initial conditions consists in the calculations
> 
simplify( eval( sol1, x=1 ) ); 
> 
simplify( eval( q1, x=1 ) ); 
Also, Maple reports the same solution when
dsolve
is used to solve the secondorder IVP, as is seen with
> 
infolevel[dsolve] := 3: 
> 
dsolve( { ode1, ic1 }, y(x) ); 
> 
infolevel[dsolve] := 0: 
`Methods for second order ODEs:`
` Trying classification methods `
`trying 2nd order Liouville`
`trying 2nd order, 2 integrating factors of the form mu(x,y)`
`trying differential order: 2; missing variables`
`> Computing canonical coordinates for the symmetry [0, 1]`
`> Rewriting ODE in canonical coordinates by means of differential inva\
riants`
`Try computing 1 more symmetries for ODE written in canonical coordinate\
s`
``, `> Computing symmetries using: way = 3`
``, `Found another symmetry:`
`Computing a convenient ordering to use the 2 symmetries available`
` *** Sublevel 2 ***`
` symmetry methods on request`
``, `1st order, trying reduction of order with given symmetries:`
` 1st order, trying the canonical coordinates of the invariance group`\
` > Computing canonical coordinates for the symmetry [_a, 0]`
` > The canonical coordinates may not have unique inverse.
Tryi\
ng gauging the symmetry to the form [0, eta(x,y)]`
` > Computing canonical coordinates for the symmetry [0, 1/2*_b+1/2/\
_b]`
` < 1st order, canonical coordinates successful`
`< differential order: 2; canonical coordinates successful`
`< differential order 2; missing variables successful`
21.B Missing Independent Variable:
The solution procedure for a secondorder ODE that does not depend explicitly on the independent variable, an equation of the form
> 
ODE2 := diff( y(x), x$2 ) = f( y(x), diff( y(x), x ) ); 
begins with the introduction of the new dependent variable
which allows the secondorder ODE to be written as the two equations
> 
q2 := eval( ODE2, sys_ode1 ); 
This form is not yet useful as the independent variable is still involved, albeit implicitly, in these equations. To complete the transformation to a useful form, change the independent variable from x to y. Assume that the first equation can be solved for
and the inverse computed as
. Then,
=
=
where the function
is a different function of
than
is of
. Hence, the new name
. In any event, the Chain Rule is applied to
to give
=
where
is allowed to collapse back notationally to
.
The Maple form of the changeofvariables would be
> 
new_indep_var2 := diff( w(x), x ) = diff( w(y), y ) * w(y); 
> 
new_dep_var2 := y(x)=y, w(x)=w(y); 
The ODE for
with independent variable
can now be written as
> 
ODE2_w := eval( q2, { new_indep_var2, new_dep_var2 } ); 
Assuming this firstorder ODE can be solved explicitly, the solution to the firstorder ODE, namely,
> 
ODE2_y := eval( sys_ode1, { new_dep_var2[2] } ); 
is the solution to the original secondorder ODE.
21.B1 Example 2
Consider the nonlinear secondorder ODE
> 
ode2 := diff( y(x), x$2 )  diff( y(x), x )^3 = 0; 
The changes of dependent and independent variable is completed in two steps. First, change
to
, obtaining
> 
ode2_wx := eval( ode2, sys_ode1 ); 
then change from
as the independent variable, to
, obtaining
> 
ode2_wy := eval( ode2_wx, { new_indep_var2, new_dep_var2 } ); 
This separable ODE for
has general solution
> 
sol2_wy := dsolve( ode2_wy, w(y), [separable] ); 
To complete the solution process, change the independent variable from
back to
by writing
as
and
as
. This can be done in Maple with the substitutions
> 
sol2_wx := subs( [ w(y)=w(x), y=y(x) ], sol2_wy ); 
which lead to the ODE for
, namely,
> 
ode2_yx := eval( sys_ode1, sol2_wx ); 
The general (implicit) solution of this separable ODE is
> 
sol2 := dsolve( ode2_yx, y(x), [separable], implicit ); 
Initial conditions are required to determine the constants _C1 and _C2. In lieu of these data values, it is easily checked that these solutions satisfy the original secondorder ODE. The test is implemented in Maple by
21.C Linearization and Qualitative Analysis
Recall that in Lesson 13 the qualitative analysis of solutions to the nonlinear autonomous system
included the steps of (1) finding all equilibrium solutions; (2) obtaining the Jacobian matrix at each of the equilibrium points; (3) calculating the eigenvalues of these matrices; and (4) classifying the nature of each equilibrium point on the basis of these eigenvalues. The geometry of the phase portrait in the neighborhood of an equilibrium point reveals if that point is asymptotically stable, or unstable. The case of orbital stability for the linearized system was left indeterminate for the nonlinear system.
The stability of an equilibrium point of the autonomous, nonlinear, secondorder ODE
can be determined by the same analysis, provided the ODE is expressed as a firstorder system via the change of varaibles
The system results from the equations
=
=
In preparation for Examples 3 and 4, make the following definitions.
21.C1 Example 3
Consider the nonlinear system
> 
f := (x,y) > 3*x + 3*x^2: 
> 
g := (x,y) > 2*x + 2*x^2 + 3*y  3: 
> 
sys := equate( diff( X, t ), [ f(x(t),y(t)), g(x(t),y(t)) ] ); 
The direction field for this nonlinear system, seen in Figure 21.1,
> 
Pdfield := DEplot( sys, [ x(t), y(t) ], t=0..1, x=2..2, y=2..2, 
> 
arrows=SLIM, color=PINK ): 
> 
display( Pdfield, title="Figure 21.1" );

suggests that there are (at least) two equilibrium points for this system. These points ae indeed found to be
> 
equil := solve( {f(x0,y0)=0,g(x0,y0)=0}, {x0,y0} ); 
Figure 21.2 superimposes the equilibrium points on the phase portrait.
> 
Pequil := pointplot( map( subs, [equil], [x0,y0] ), 
> 
symbol=CIRCLE, symbolsize=18, color=RED ): 
> 
display( Pdfield, Pequil, title="Figure 21.1" ); 
Linearizing the system about each of these equilibrium points, both the eigenvalues and a localized direction field are obtained with the Maple commands
> 
for i from 1 to nops([equil]) do 
> 
b := eval( [ f(x0,y0), g(x0,y0) ], X0 ); 
> 
A := eval( Jacobian( [f(x0,y0),g(x0,y0)], [x0,y0] ), X0 ); 
> 
linsys1 := equate( diff( U, t ), evalm( A &* U + b ) ); 
> 
Plini := translate( DEplot( linsys1, {u(t),v(t)}, t=0..1, 
> 
u=1/2..1/2, v=1/2..1/2, 
> 
arrows=SLIM, color=CLRS[i], 
> 
op(eval([x0,y0],X0)) ); 
> 
print( `` ); 
> 
print( `Linearization at [x0,y0]`=eval([x0,y0],X0) ); 
> 
print( nprintf( "%s %{xc,}f", `Eigenvalues:`, Eigenvalues( A ) ) ); 
> 
print( `` ); 
Thus, the equilibrium solution
is a saddle point (hence unstable), whereas
is an unstable node.
Superimposing the direction fields for the linearizations on the original direction field gives Figure 21.3.
> 
display( Pdfield, Pequil, Plin(1..nops([equil])), view=[1..2, 0..2 ], title="Figure 21.3" ); 
21.C2 Example 4
Consider the nonlinear system
> 
f := (x,y) > (2x)*x + x*y/2: 
> 
g := (x,y) > (3y)*y + x*y/2: 
> 
sys := equate( diff( X, t ), [ f(x(t),y(t)), g(x(t),y(t)) ] ); 
The direction field for this nonlinear system, appearing in Figure 21.4,
> 
Pdfield := DEplot( sys, [ x(t), y(t) ], t=0..1, x=1..7, y=1..7, 
> 
arrows=SLIM, color=PINK ): 
> 
display( Pdfield, title="Figure 21.4" );

suggests that there are (at least) four equilibrium points for this system, namely,
> 
equil := solve( {f(x0,y0)=0,g(x0,y0)=0}, {x0,y0} ); 
Figure 21.5 superimposes these equilibria on the direction field.
> 
Pequil := pointplot( map( subs, [equil], [x0,y0] ), 
> 
symbol=CIRCLE, symbolsize=18, color=RED ): 
> 
display( Pdfield, Pequil, title="Figure 21.5" ); 
Linearizing the system about each of these equilibrium points, both the eigenvalues and a localized direction field are obtained with the Maple commands
> 
for i from 1 to nops([equil]) do 
> 
b := eval( [ f(x0,y0), g(x0,y0) ], X0 ); 
> 
A := eval( Jacobian( [f(x0,y0),g(x0,y0)], [x0,y0] ), X0 ); 
> 
linsys1 := equate( diff( U, t ), evalm( A &* U + b ) ); 
> 
Plini := translate( DEplot( linsys1, {u(t),v(t)}, t=0..1, 
> 
u=1/2..1/2, v=1/2..1/2, 
> 
arrows=SLIM, color=CLRS[i], 
> 
op(eval([x0,y0],X0)) ); 
> 
print( `` ); 
> 
print( `Linearization at [x0,y0]`=eval([x0,y0],X0) ); 
> 
print( nprintf( "%s %{xc,}f", `Eigenvalues:`, evalf(Eigenvalues( A )) ) ); 
> 
print( `` ); 
Thus, the equilibrium solution
is an unstable node (source);
is a saddle point (and hence unstable);
is a saddle point (and again unstable); and
is a stable node (sink).
Superimposing the direction fields for the linearizations on the original direction field gives Figure 21.6.
> 
display( Pdfield, Pequil, Plin(1..nops([equil])), view=[1..7, 1..7 ], title="Figure 21.6" ); 
[Back to ODE Powertool Table of Contents]