ORDINARY DIFFERENTIAL EQUATIONS POWERTOOLLesson 21 -- Nonlinear EquationsProf. Douglas B. MeadeIndustrial Mathematics InstituteDepartment of MathematicsUniversity of South CarolinaColumbia, SC 29208
URL: http://www.math.sc.edu/~meade/E-mail: meade@math.sc.eduCopyright \251 2001 by Douglas B. MeadeAll rights reserved-------------------------------------------------------------------<Text-field layout="_pstyle5" style="_cstyle3">Outline of Lesson 21</Text-field>21.A Missing Dependent Variable21.A-1 Example 121.B Missing Independent Variable21.B-1 Example 221.C Linearization and Qualitative Analysis21.C-1 Example 321.C-2 Example 4<Text-field layout="_pstyle5" style="_cstyle3">Initialization</Text-field>restart;with( DEtools ):with( plots ):with( student ):with( plottools ):with( VectorCalculus ):with( LinearAlgebra ):CLRS := [ BLUE, GREEN, CYAN, AQUAMARINE ]:<Text-field bookmark="21.A" layout="_pstyle5" style="ParagraphStyle2"><Font style="_cstyle3">21.A Missing Dependent Variable: </Font><Equation input-equation="Diff( y, x$2 ) = f(x,Diff(y,x))" style="2D Comment">NiMvLSUlRGlmZkc2JCUieUctJSIkRzYkJSJ4RyIiIy0lImZHNiRGKy1GJTYkRidGKw==</Equation><Font style="_cstyle3"> </Font></Text-field>To solve a nonlinear second-order ODE of the formODE := diff( y(x), x$2 ) = F( x, diff( y(x), x ) );introduce a second dependent functionnew_dep_var := w(x) = diff( y(x), x );Then NiMtJSVkaWZmRzYkLSUid0c2IyUieEdGKQ== = NiMtJSVkaWZmRzYkLSUieUc2IyUieEctJSIkRzYkRikiIiM= = NiMtJSJmRzYkJSJ4RyUid0c= and the ODE can be rewritten as a first-order systemsys_ode1 := isolate( new_dep_var, diff( y(x), x ) );sys_ode2 := eval( ODE, sys_ode1 );The second-order ODE for NiMtJSJ5RzYjJSJ4Rw== has become a first-order ODE for NiMtJSJ3RzYjJSJ4Rw==. Assuming this ODE can be solved (for NiMtJSJ3RzYjJSJ4Rw==) by one of the first-order methods discussed previously, integration of the first-order ODE for NiMtJSJ5RzYjJSJ4Rw==, i.e., NiMvLSUlZGlmZkc2JC0lInlHNiMlInhHRiotJSJ3R0Yp, provides a solution to the second-order ODE.<Text-field bookmark="21.A-1" layout="_pstyle7" style="_cstyle9">21.A-1 Example 1</Text-field>Consider the second-order nonlinear ODEode1 := 2*x*diff(y(x),x$2) - diff(y(x),x) + 1/diff(y(x),x) = 0;for NiMqKCUieEciIiIlIj5HRiUiIiFGJQ== with initial conditionsic1 := y(1) = 2, D(y)(1) = -2; Since this equation does not contain the dependent variable, NiMtJSJ5RzYjJSJ4Rw==, re-write it as the first-order systemsys1 := [ sys_ode1, eval( ode1, sys_ode1 ) ];with initial conditionssys_ic1 := eval( ic1, D(y)=w );Maple classifies the ODE for NiMtJSJ3RzYjJSJ4Rw== as a separable equation via the deviceodeadvisor( sys1[2] );and finds the solution to besol_w := dsolve( { sys1[2], sys_ic1[2] }, w(x), [separable] );Now, the remaining first-order ODE isq1 := eval( sys1[1], sol_w );which can be solved by direct integration, leading tosol1 := dsolve( { q1, sys_ic1[1] }, y(x), [quadrature] );A check that this function does solve the second-order ODE consists inodetest( sol1, ode1 );and a test that it satisfied the initial conditions consists in the calculationssimplify( eval( sol1, x=1 ) );simplify( eval( q1, x=1 ) );Also, Maple reports the same solution when dsolve is used to solve the second-order IVP, as is seen withinfolevel[dsolve] := 3:dsolve( { ode1, ic1 }, y(x) );infolevel[dsolve] := 0:<Text-field bookmark="21.B" layout="_pstyle5" style="ParagraphStyle2"><Font style="_cstyle3">21.B Missing Independent Variable: </Font><Equation input-equation="Diff( y, x$2 ) = f( y, Diff(y,x) )" style="2D Comment">NiMvLSUlRGlmZkc2JCUieUctJSIkRzYkJSJ4RyIiIy0lImZHNiRGJy1GJTYkRidGKw==</Equation><Font style="_cstyle3"> </Font></Text-field>The solution procedure for a second-order ODE that does not depend explicitly on the independent variable, an equation of the formODE2 := diff( y(x), x$2 ) = f( y(x), diff( y(x), x ) );begins with the introduction of the new dependent variablenew_dep_var;which allows the second-order ODE to be written as the two equationssys_ode1;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 NiMvJSJ5Ry1GJDYjJSJ4Rw== and the inverse computed as NiMvJSJ4Ry1GJDYjJSJ5Rw==. Then, NiMvJSJ3Ry1GJDYjJSJ4Rw== = NiMvLSUid0c2Iy0lInhHNiMlInlHLSUiV0dGKQ== = NiMvLSUiV0c2Iy0lInlHNiMlInhHLSUid0dGKQ==where the function NiMlIldH is a different function of NiMlInlH than NiMtJSJ3RzYjJSJ4Rw== is of NiMlInhH. Hence, the new name NiMlIldH. In any event, the Chain Rule is applied toNiMvLSUid0c2IyUieEctJSJXRzYjLSUieUdGJg==to giveNiMvKiYlI2R3RyIiIiUjZHhHISIiKiYlI2RXR0YmJSNkeUdGKA==NiMvKiYlI2R5RyIiIiUjZHhHISIiKiYlI2RXR0YmRiVGKA==NiMlIndH = NiMqJiUjZHdHIiIiJSNkeUchIiI=NiMtJSJ3RzYjJSJ5Rw==where NiMlIldH is allowed to collapse back notationally to NiMlIndH.The Maple form of the change-of-variables would benew_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 NiMlIndH with independent variable NiMlInlH can now be written asODE2_w := eval( q2, { new_indep_var2, new_dep_var2 } );Assuming this first-order ODE can be solved explicitly, the solution to the first-order ODE, namely,ODE2_y := eval( sys_ode1, { new_dep_var2[2] } );is the solution to the original second-order ODE.<Text-field bookmark="21.B-1" layout="_pstyle7" style="_cstyle9">21.B-1 Example 2</Text-field>Consider the nonlinear second-order ODEode2 := 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 NiMqJiUjZHlHIiIiJSNkeEchIiI= to NiMtJSJ3RzYjJSJ4Rw==, obtainingode2_wx := eval( ode2, sys_ode1 );then change from NiMlInhH as the independent variable, to NiMlInlH, obtainingode2_wy := eval( ode2_wx, { new_indep_var2, new_dep_var2 } );This separable ODE for NiMtJSJ3RzYjJSJ5Rw== has general solutionsol2_wy := dsolve( ode2_wy, w(y), [separable] );To complete the solution process, change the independent variable from NiMlInlH back to NiMlInhH by writing NiMlInlH as NiMtJSJ5RzYjJSJ4Rw== and NiMtJSJ3RzYjJSJ5Rw== as NiMvLSUiV0c2Iy0lInlHNiMlInhHLSUid0dGKQ==. This can be done in Maple with the substitutionssol2_wx := subs( [ w(y)=w(x), y=y(x) ], sol2_wy );which lead to the ODE for NiMtJSJ5RzYjJSJ4Rw==, 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 second-order ODE. The test is implemented in Maple byodetest( sol2, ode2 );<Text-field bookmark="21.C" layout="_pstyle5" style="_cstyle3">21.C Linearization and Qualitative Analysis</Text-field>Recall that in Lesson 13 the qualitative analysis of solutions to the nonlinear autonomous systemNiMvKiYlI2R4RyIiIiUjeHRHISIiLSUiRkc2JCUieEclInlHNiMvKiYlI2R5RyIiIiUjZHRHISIiLSUiR0c2JCUieEclInlHincluded 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, second-order ODE NiMvLSUkeScnRzYjJSJ0Ry0lImZHNiQtJSJ5R0YmLSUjeSdHRiY=can be determined by the same analysis, provided the ODE is expressed as a first-order system via the change of varaiblesNiMvLSUidUc2IyUidEctJSJ5R0YmNiMvLSUidkc2IyUidEctJSN5J0dGJg==The system results from the equationsNiMvLSUjdSdHNiMlInRHLSUjeSdHRiY= = NiMtJSJ2RzYjJSJ0Rw==NiMvLSUjdidHNiMlInRHLSUkeScnR0Ym = NiMvLSUiZkc2JC0lInlHNiMlInRHLSUjeSdHRiktRiU2JC0lInVHRiktJSJ2R0YpIn preparation for Examples 3 and 4, make the following definitions.X := [ x(t), y(t) ]:U := [ u(t), v(t) ]:<Text-field bookmark="21.C-1" layout="_pstyle7" style="_cstyle9">21.C-1 Example 3</Text-field>Consider the nonlinear systemf := (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 beequil := 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 commandsfor i from 1 to nops([equil]) do X0 := equil[i]; 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 ) ); Plin||i := 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], dirgrid=[7,7] ), op(eval([x0,y0],X0)) ); print( `-------------------------------------------------------------` ); print( `Linearization at [x0,y0]`=eval([x0,y0],X0) ); print( Plin||i ); print( nprintf( "%s %{xc,}f", `Eigenvalues:`, Eigenvalues( A ) ) ); print( `-------------------------------------------------------------` );end do:Thus, the equilibrium solution NiMvLSUhRzYkJSJ4RyUieUctRiU2JCIiIiIiIQ== is a saddle point (hence unstable), whereas NiMvLSUhRzYkJSJ4RyUieUctRiU2JCIiIkYr 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" );<Text-field bookmark="21.C-2" layout="_pstyle7" style="_cstyle9">21.C-2 Example 4</Text-field>Consider the nonlinear systemf := (x,y) -> (2-x)*x + x*y/2:g := (x,y) -> (3-y)*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 commandsfor i from 1 to nops([equil]) do X0 := equil[i]; 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 ) ); Plin||i := 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], dirgrid=[7,7] ), op(eval([x0,y0],X0)) ); print( `-------------------------------------------------------------` ); print( `Linearization at [x0,y0]`=eval([x0,y0],X0) ); print( Plin||i ); print( nprintf( "%s %{xc,}f", `Eigenvalues:`, evalf(Eigenvalues( A )) ) ); print( `-------------------------------------------------------------` );end do:Thus, the equilibrium solution NiMvLSUhRzYkJSJ4RyUieUctRiU2JCIiIUYr is an unstable node (source); NiMvLSUhRzYkJSJ4RyUieUctRiU2JCIiIyIiIQ== is a saddle point (and hence unstable); NiMvLSUhRzYkJSJ4RyUieUctRiU2JCIiISIiJA== is a saddle point (and again unstable); andNiMvLSUhRzYkJSJ4RyUieUctRiU2JComIiM5IiIiIiIkISIiKiYiIztGLUYuRi8= 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]