<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="1"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout alignment="centred" name="_pstyle272"/><Layout alignment="centred" name="_pstyle271"/><Layout alignment="centred" name="_pstyle270"/><Layout alignment="centred" name="_pstyle269"/><Layout alignment="left" firstindent="0.0" name="Heading 1" spaceabove="8.0" spacebelow="4.0"/><Layout alignment="centred" name="_pstyle268"/><Layout alignment="centred" name="_pstyle267"/><Layout alignment="centred" name="_pstyle266"/><Layout alignment="centred" name="_pstyle265"/><Layout alignment="centred" name="_pstyle264"/><Layout alignment="centred" name="_pstyle263"/><Layout alignment="centred" name="_pstyle262"/><Layout alignment="centred" name="_pstyle261"/><Layout alignment="centred" name="_pstyle260"/><Layout bullet="indent" name="List Item" spaceabove="3.0" spacebelow="3.0"/><Layout name="Normal"/><Layout alignment="centred" name="_pstyle259"/><Layout alignment="centred" name="_pstyle258"/><Layout alignment="centred" name="_pstyle257"/><Font background="[0,0,0]" name="List Item"/><Font background="[0,0,0]" bold="true" name="Heading 1" size="18"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input"/><Font background="[0,0,0]" family="Times New Roman" name="Page Number" underline="false"/><Font background="[0,0,0]" name="Normal"/><Font background="[0,0,0]" italic="true" name="_cstyle271"/><Font background="[0,0,0]" italic="true" name="_cstyle270"/><Font background="[0,0,0]" foreground="[0,128,128]" italic="false" name="Hyperlink" underline="true"/><Font background="[0,0,0]" name="_pstyle272"/><Font background="[0,0,0]" name="_pstyle271"/><Font background="[0,0,0]" name="_pstyle270"/><Font background="[0,0,0]" italic="true" name="_cstyle269"/><Font background="[0,0,0]" italic="true" name="_cstyle268"/><Font background="[0,0,0]" italic="true" name="_cstyle267"/><Font background="[0,0,0]" italic="true" name="_cstyle266"/><Font background="[0,0,0]" italic="true" name="_cstyle265"/><Font background="[0,0,0]" italic="true" name="_cstyle264"/><Font background="[0,0,0]" italic="true" name="_cstyle263"/><Font background="[0,0,0]" italic="true" name="_cstyle262"/><Font background="[0,0,0]" italic="true" name="_cstyle261"/><Font background="[0,0,0]" italic="true" name="_cstyle260"/><Font background="[0,0,0]" name="_pstyle269"/><Font background="[0,0,0]" name="_pstyle268"/><Font background="[0,0,0]" name="_pstyle267"/><Font background="[0,0,0]" name="_pstyle266"/><Font background="[0,0,0]" name="_pstyle264"/><Font background="[0,0,0]" name="_pstyle263"/><Font background="[0,0,0]" name="_pstyle262"/><Font background="[0,0,0]" name="_pstyle261"/><Font background="[0,0,0]" italic="true" name="_cstyle259"/><Font background="[0,0,0]" italic="true" name="_cstyle258"/><Font background="[0,0,0]" italic="true" name="_cstyle257"/><Font background="[0,0,0]" italic="true" name="_cstyle256"/><Font background="[0,0,0]" family="Times New Roman" name="2D Comment" underline="false"/><Font background="[0,0,0]" name="_pstyle257"/></Styles><Page-Numbers enabled="false" first-number="1" first-numbered-page="1" horizontal-location="right" style="Page Number" vertical-location="bottom"/><Group><Input><Text-field layout="_pstyle269" style="_pstyle269"/><Text-field layout="_pstyle257" style="_pstyle257"><Font family="Times New Roman">ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="_pstyle270" style="_pstyle270"><Font family="Times New Roman">Lesson 10 -- Substitution and Change of Variables</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="_pstyle265" style="Hyperlink"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/~meade/" style="Hyperlink">Prof. Douglas B. Meade</Hyperlink></Text-field><Text-field layout="_pstyle258" style="Hyperlink"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/~IMI/" style="Hyperlink">Industrial Mathematics Institute</Hyperlink></Text-field><Text-field layout="_pstyle259" style="Hyperlink"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/" style="Hyperlink">Department of Mathematics</Hyperlink></Text-field><Text-field layout="_pstyle260" style="Hyperlink"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="http://www.sc.edu/" style="Hyperlink">University of South Carolina</Hyperlink></Text-field><Text-field layout="_pstyle261" style="_pstyle261"><Font family="Times New Roman">Columbia, SC 29208
</Font></Text-field><Text-field layout="_pstyle263" style="_pstyle263"><Font family="Times New Roman">URL:   </Font><Hyperlink family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/~meade/" style="Hyperlink">http://www.math.sc.edu/~meade/</Hyperlink></Text-field><Text-field layout="_pstyle264" style="_pstyle264"><Font family="Times New Roman">E-mail: </Font><Hyperlink family="Times New Roman" hyperlink="true" linktarget="mailto:meade@math.sc.edu" style="Hyperlink">meade@math.sc.edu</Hyperlink><Font family="Times New Roman"> </Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="_pstyle262" style="_pstyle262"><Font encoding="ISO8859-1" family="Times New Roman">Copyright \251  2001  by Douglas B. Meade</Font></Text-field><Text-field layout="_pstyle266" style="_pstyle266"><Font family="Times New Roman">All rights reserved</Font></Text-field><Text-field layout="_pstyle268" style="_pstyle268"/><Text-field layout="_pstyle267" style="_pstyle267"><Font family="Times New Roman">-------------------------------------------------------------------</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1"><Font family="Times New Roman">Outline of Lesson 10</Font></Text-field></Title><Group><Input><Text-field layout="List Item" style="List Item"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Wks:#10.A" style="Hyperlink">10.A</Hyperlink><Font family="Times New Roman"> Example 1: Homogeneous Equations</Font></Text-field><Text-field layout="List Item" style="List Item"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Wks:#10.B" style="Hyperlink">10.B</Hyperlink><Font family="Times New Roman"> Example 2: Bernoulli Equations</Font></Text-field><Text-field layout="List Item" style="List Item"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Wks:#10.C" style="Hyperlink">10.C</Hyperlink><Font family="Times New Roman"> Example 3: Reduction to Separation of Variables</Font></Text-field><Text-field layout="List Item" style="List Item"><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Wks:#10.D" style="Hyperlink">10.D</Hyperlink><Font family="Times New Roman"> Example 4: Riccati Equations</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1"><Font family="Times New Roman">Initialization</Font></Text-field></Title><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">restart;</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">with( DEtools ):</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">with( plots ):</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">with( PDEtools ):</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="10.A" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.A Example 1: Homogeneous Equations</Font></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">A function </Font><Equation input-equation="f(x,y);" style="2D Comment">NiMtJSJmRzYkJSJ4RyUieUc=</Equation><Font family="Times New Roman"> is said to be <Font style="_cstyle262">homogeneous</Font> <Font style="_cstyle263">of</Font> <Font style="_cstyle264">degree</Font> </Font><Equation input-equation="k;" style="2D Comment">NiMlImtH</Equation><Font family="Times New Roman"> if </Font><Equation input-equation="f(t*x,t*y) = t^k*f(x,y);" style="2D Comment">NiMvLSUiZkc2JComJSJ0RyIiIiUieEdGKSomRihGKSUieUdGKSomKUYoJSJrR0YpLUYlNiRGKkYsRik=</Equation><Font family="Times New Roman">.  Thus, if the variables </Font><Equation input-equation="x;" style="2D Comment">NiMlInhH</Equation><Font family="Times New Roman"> and </Font><Equation input-equation="y;" style="2D Comment">NiMlInlH</Equation><Font family="Times New Roman"> are replaced by </Font><Equation input-equation="t*x;" style="2D Comment">NiMqJiUidEciIiIlInhHRiU=</Equation><Font family="Times New Roman"> and </Font><Equation input-equation="t*y;" style="2D Comment">NiMqJiUidEciIiIlInlHRiU=</Equation><Font family="Times New Roman">, respectively, a factor of </Font><Equation input-equation="t^k;" style="2D Comment">NiMpJSJ0RyUia0c=</Equation><Font family="Times New Roman"> can be extracted, and the remaining factor is just </Font><Equation input-equation="f(x,y);" style="2D Comment">NiMtJSJmRzYkJSJ4RyUieUc=</Equation><Font family="Times New Roman">. </Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">A <Font style="_cstyle256">homogeneous</Font> differential equation has the general form</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ode1 := M(x,y(x)) + N(x,y(x)) * diff( y(x),x ) = 0;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">where the functions M and N are both <Font style="_cstyle257">homogeneous</Font> <Font style="_cstyle258">of</Font> <Font style="_cstyle259">the</Font> <Font style="_cstyle260">same</Font> <Font style="_cstyle261">degree</Font>.  Thus, there exists a constant </Font><Equation input-equation="alpha" style="2D Comment">NiMlJmFscGhhRw==</Equation><Font family="Times New Roman"> such that</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="_pstyle271" style="_pstyle271"><Font family="Times New Roman"> </Font><Equation input-equation="M(t*x,t*y)=t^alpha * M(x,y)" style="2D Comment">NiMvLSUiTUc2JComJSJ0RyIiIiUieEdGKSomRihGKSUieUdGKSomKUYoJSZhbHBoYUdGKS1GJTYkRipGLEYp</Equation><Font family="Times New Roman"> </Font></Text-field><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">and </Font></Text-field><Text-field layout="_pstyle272" style="_pstyle272"><Equation input-equation="N(t*x,t*y) = t^alpha * N(x,y)" style="2D Comment">NiMvLSUiTkc2JComJSJ0RyIiIiUieEdGKSomRihGKSUieUdGKSomKUYoJSZhbHBoYUdGKS1GJTYkRipGLEYp</Equation><Font family="Times New Roman"> </Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">For example, consider the functions</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">M := (x,y) -&gt; x^2+y^2:
N := (x,y) -&gt; x^2-x*y:
'M'(x,y) = M(x,y);
'N'(x,y) = N(x,y);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">which produce the differential equation</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ode1;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">To check that this is a homogeneous ODE, observe that </Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">'M'(tx,ty) = simplify( M(t*x,t*y) / M(x,y) ) * 'M'(x,y);</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">'N'(tx,ty) = simplify( N(t*x,t*y) / N(x,y) ) * 'N'(x,y);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">To find the general solution to this ODE, introduce the change of variables</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ch_of_var := y(x) = x * u(x);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The ODE becomes</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">q1 := dchange( ch_of_var, ode1, [u(x)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">This simplifies to</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sep_ode1 := simplify( isolate( q1, diff(u(x),x) ) );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">which is easily seen to be a separable equation</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odeadvisor( sep_ode1 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The (implicit) solution to this equation is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol_u := dsolve( sep_ode1, u(x), [separable], implicit );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Reversing the change of variables, the solution to the original ODE is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol_y := dchange( isolate(ch_of_var,u(x)), sol_u, [y(x)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">That this equation defines a solution is confirmed with</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odetest( sol_y, ode1 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Note that Maple's built-in commands can be used, first to classify this ODE as homogeneous:</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odeadvisor( ode1 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">then to find the general solution in the <Font style="_cstyle266">explicit</Font> form</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">expl_sol := genhomosol( ode1 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">However, people are not familiar with the </Font><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Help:LambertW" style="Hyperlink">Lambert W</Hyperlink><Font family="Times New Roman"> function. To obtain the solution of this homogeneous ODE in an <Font style="_cstyle265">implicit</Font> form, use</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dsolve( ode1, y(x), [homogeneous], implicit );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">which is seen to be equivalent to the previous solution.</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="10.B" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.B Example 2: Bernoulli Equations</Font></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">A Bernoulli equation has the form</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">diff( x(t), t ) = f(t) * x(t) + g(t) * x(t)^alpha;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">for known functions <Font style="_cstyle267">f</Font> and <Font style="_cstyle268">g</Font> and a constant </Font><Equation input-equation="alpha" style="2D Comment">NiMlJmFscGhhRw==</Equation><Font family="Times New Roman"> (not equal to 0 or 1).</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">For example, consider the differential equation</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ode2 := diff( x(t), t ) = a * x(t) - b * x(t)^3;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">where </Font><Equation input-equation="a" style="2D Comment">NiMlImFH</Equation><Font family="Times New Roman"> and </Font><Equation input-equation="b" style="2D Comment">NiMlImJH</Equation><Font family="Times New Roman"> are real constants with </Font><Equation input-equation="a&lt;&gt;0" style="2D Comment">NiMwJSJhRyIiIQ==</Equation><Font family="Times New Roman">. This is a Bernoulli equation with</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">alpha := 3;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">To convert the Bernoulli equation into a first-order linear ODE, consider the substitution</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ch_of_var := x(t) = u(t)^(1/(1-alpha));</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The ODE for the new function </Font><Equation input-equation="u(t)" style="2D Comment">NiMtJSJ1RzYjJSJ0Rw==</Equation><Font family="Times New Roman"> is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">q1 := dchange( ch_of_var, ode2, [u(t)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">which simplifies to</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">lin_ode := simplify( isolate( q1, diff(u(t),t) ));</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The solution to this linear ODE is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">lin_sol := dsolve( lin_ode, u(t), [linear] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">and the corresponding implicit solution for the original function </Font><Equation input-equation="x(t);" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font family="Times New Roman"> is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol2 := dchange( isolate(ch_of_var,u(t)), lin_sol, [x(t)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">To verify that this is a solution of the original ODE, use</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odetest( sol2, ode2 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The solution might be a little more useful in the form</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol2a := map( u-&gt;simplify(1/u), sol2 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Immediate access to the solution of this Bernoulli equations can be obtained with the single command</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dsolve( ode2, x(t), [Bernoulli], implicit );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">from which either of the above implicit solutions, or the explicit solution, can be derived.</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The </Font><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Help:DEtools,bernoullisol" style="Hyperlink">bernoullisol</Hyperlink><Font family="Times New Roman"> command yields the two branches of the square root that are solutions.  The result is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">bernoullisol( ode2 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The choice of branch depends on the signs of </Font><Equation input-equation="a" style="2D Comment">NiMlImFH</Equation><Font family="Times New Roman">, </Font><Equation input-equation="b" style="2D Comment">NiMlImJH</Equation><Font family="Times New Roman">, and the initial condition.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="10.C" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.C Example 3: Reduction to Separation of Variables</Font></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Any ODE of the form</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">Diff( y, x ) = F( a*x + b*y + c );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">with </Font><Equation input-equation="b&lt;&gt;0" style="2D Comment">NiMwJSJiRyIiIQ==</Equation><Font family="Times New Roman"> can be reduced to a separable ODE via the substitution </Font><Equation input-equation="u = a*x+b*y(x) + c" style="2D Comment">NiMvJSJ1RywoKiYlImFHIiIiJSJ4R0YoRigqJiUiYkdGKC0lInlHNiNGKUYoRiglImNHRig=</Equation><Font family="Times New Roman">.</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">For example, the ODE</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ode3 := diff( y(x), x ) = ( x+y(x)+2 )^2;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">is of the appropriate form with </Font><Equation input-equation="a=1" style="2D Comment">NiMvJSJhRyIiIg==</Equation><Font family="Times New Roman">, </Font><Equation input-equation="b=1" style="2D Comment">NiMvJSJiRyIiIg==</Equation><Font family="Times New Roman">, </Font><Equation input-equation="c=2" style="2D Comment">NiMvJSJjRyIiIw==</Equation><Font family="Times New Roman">, and </Font><Equation input-equation="F(z) = z^2" style="2D Comment">NiMvLSUiRkc2IyUiekcqJEYnIiIj</Equation><Font family="Times New Roman">. Thus, the substitution</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ch_of_var := u(x) = x + y(x) + 2;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">leads to a differential equation for </Font><Equation input-equation="u(x)" style="2D Comment">NiMtJSJ1RzYjJSJ4Rw==</Equation><Font family="Times New Roman">.  This equation is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">u_ode := dchange( isolate(ch_of_var,y(x)), ode3, [u(x)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">which is easily seen to be separable via the syntax</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odeadvisor( u_ode, [separable] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The implicit general solution to this separable differential equation is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">u_sol := dsolve( u_ode, u(x), [separable], implicit );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The corresponding explicit solution is</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">u_sol_expl := dsolve( u_ode, u(x), [separable] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Reversing the substitution to obtain the implicit general solution to the differential equation for </Font><Equation input-equation="y(x)" style="2D Comment">NiMtJSJ5RzYjJSJ4Rw==</Equation><Font family="Times New Roman"> gives</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol3 := dchange( ch_of_var, u_sol, [y(x)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">The corresponding explicit solution can be obtained from</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol3_expl := isolate( sol3, y(x) );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Note that simply using</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dchange( ch_of_var, u_sol_expl, [y(x)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">does not produce an explicit formula for the general solution. It is still necessary to use </Font><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Help:isolate" style="Hyperlink">isolate</Hyperlink><Font family="Times New Roman">, or something similar, as is seen from</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">isolate( dchange( ch_of_var, u_sol_expl, [y(x)] ), y(x) );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">That these functions are solutions to the original ODE is seen from either of</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odetest( sol3, ode3 );</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odetest( sol3_expl, ode3 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Immediate access to the implicit and explicit solutions can be obtained using</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dsolve( ode3, y(x), implicit );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">and</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dsolve( ode3, y(x) );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="10.D" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.D Example 4: Riccati Equations</Font></Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">A Riccati equation has the form</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">diff( x(t), t ) = f(t) * x(t)^2 + g(t) * x(t) + h(t);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">for given functions <Font style="_cstyle269">f</Font>, <Font style="_cstyle270">g</Font>, and <Font style="_cstyle271">h</Font>. The solution of a Ricatti equation requires knowledge of a particular solution to the ODE.</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">For example, consider the equation</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ode4 := diff( x(t), t ) = -x(t)^2 + 2*t*x(t) - t^2+5;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">which has as one of its solutions the function</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">X := t-2;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">That this is a solution is confirmed by</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odetest( x(t)=X, ode4 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">To solve a Riccati equation, define a new function </Font><Equation input-equation="u(t)" style="2D Comment">NiMtJSJ1RzYjJSJ0Rw==</Equation><Font family="Times New Roman"> such that,</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ch_of_var := u(t) = x(t) - X;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">This substitution translates the ODE for </Font><Equation input-equation="x(t)" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font family="Times New Roman"> into one for the new function </Font><Equation input-equation="u(t)" style="2D Comment">NiMtJSJ1RzYjJSJ0Rw==</Equation><Font family="Times New Roman">, and results in the equation</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ode_u := dchange( isolate(ch_of_var,x(t)), ode4, [u(t)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">which simplifies to</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">bern_ode := collect( isolate( ode_u, diff(u(t),t) ), u(t) );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Upon inspection, this ODE is seen to be a Bernoulli equation via the syntax</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odeadvisor( bern_ode, [Bernoulli] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Its solution us</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">bern_sol := dsolve( bern_ode, u(t), [Bernoulli] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Reversing the substitution gives</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol4 := dchange( ch_of_var, bern_sol, [x(t)] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">To check that this is a solution to the original ODE, use</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odetest( sol4, ode4 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">Note that the original equation can be classified as a Riccati equation using</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odeadvisor( ode4, [Riccati] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">and solved in one step using either</Font></Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">riccatisol( ode4 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">or</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dsolve( ode4, x(t), [Riccati] );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Group><Input><Text-field layout="Normal" style="Normal"><Font family="Times New Roman">[Back to </Font><Hyperlink family="Times New Roman" hyperlink="true" linktarget="Wks:Lesson00.mw" style="Hyperlink">ODE Powertool Table of Contents</Hyperlink><Font family="Times New Roman">]</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field/><Text-field/><Text-field/><Text-field/><Text-field/></Worksheet>