<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="1"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout leftmargin="0.0" name="_pstyle9" rightmargin="0.0"/><Layout alignment="left" bullet="dot" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle8" rightmargin="0.0" spaceabove="3.0" spacebelow="3.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle7" rightmargin="0.0" spaceabove="8.0" spacebelow="2.0"/><Layout alignment="left" bullet="indent" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle6" rightmargin="0.0" spaceabove="3.0" spacebelow="3.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle5" rightmargin="0.0" spaceabove="8.0" spacebelow="4.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle4" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="centred" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle3" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle2" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="centred" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="_pstyle1" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Font background="[0,0,0]" executable="false" family="Times New Roman" name="Page Number" readonly="false" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,128,128]" italic="false" name="Hyperlink" readonly="false" size="12" subscript="false" superscript="false" underline="true"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="ParagraphStyle2" readonly="false" size="18" underline="false"/><Font background="[0,0,0]" executable="false" family="Times New Roman" foreground="[255,0,0]" name="2D Input" readonly="false" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="ParagraphStyle1" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Verdana" foreground="[0,0,0]" italic="false" name="_cstyle19" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,255,0]" italic="false" name="_cstyle18" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" name="_cstyle17" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" executable="false" name="_pstyle9" readonly="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle16" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle15" readonly="false" size="12" underline="true"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[255,0,0]" italic="false" name="_cstyle14" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" name="_cstyle13" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle12" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="_pstyle4" readonly="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle11" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle10" readonly="false" size="14" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_pstyle2" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_pstyle1" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[255,0,0]" italic="false" name="_cstyle9" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" executable="false" family="Times New Roman" name="2D Comment" readonly="false" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" name="_cstyle8" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle7" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="_cstyle6" readonly="false"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" name="_cstyle5" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle4" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle3" readonly="false" size="18" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,128,128]" italic="false" name="_cstyle2" readonly="false" size="12" underline="true"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="_cstyle1" readonly="false" size="12" underline="false"/></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="_pstyle1" style="_pstyle1"/><Text-field layout="_pstyle1" style="_cstyle1">DIFFERENTIAL EQUATIONS POWERTOOL</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle1" style="_cstyle1">Lesson 1 -- Introduction to Differential Equations in Maple</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle3" style="_cstyle2"><Hyperlink hyperlink="true" linktarget="http://www.math.sc.edu/~meade/" style="_cstyle2">Prof. Douglas B. Meade</Hyperlink></Text-field><Text-field layout="_pstyle3" style="_cstyle2"><Hyperlink hyperlink="true" linktarget="http://www.math.sc.edu/~IMI/" style="_cstyle2">Industrial Mathematics Institute</Hyperlink></Text-field><Text-field layout="_pstyle3" style="_cstyle2"><Hyperlink hyperlink="true" linktarget="http://www.math.sc.edu/" style="_cstyle2">Department of Mathematics</Hyperlink></Text-field><Text-field layout="_pstyle3" style="_cstyle2"><Hyperlink hyperlink="true" linktarget="http://www.sc.edu/" style="_cstyle2">University of South Carolina</Hyperlink></Text-field><Text-field layout="_pstyle1" style="_cstyle1">Columbia, SC 29208
</Text-field><Text-field layout="_pstyle1" style="ParagraphStyle1"><Font style="_cstyle1">URL:   </Font><Hyperlink hyperlink="true" linktarget="http://www.math.sc.edu/~meade/" style="_cstyle2">http://www.math.sc.edu/~meade/</Hyperlink></Text-field><Text-field layout="_pstyle1" style="_cstyle1">E-mail:  <Hyperlink hyperlink="true" linktarget="mailto:meade@math.sc.edu" style="Hyperlink">meade@math.sc.edu</Hyperlink> 
</Text-field><Text-field layout="_pstyle1" style="_cstyle1"><Font encoding="ISO8859-1">Copyright \251  2001  by Douglas B. Meade</Font></Text-field><Text-field layout="_pstyle1" style="_cstyle1">All rights reserved</Text-field><Text-field layout="_pstyle1" style="_pstyle1"/><Text-field layout="_pstyle1" style="_cstyle1">-------------------------------------------------------------------</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Section collapsed="true"><Title><Text-field layout="_pstyle5" style="_cstyle3">Outline for Lesson 1</Text-field></Title><Text-field layout="_pstyle2" style="_pstyle2"/><Group><Input><Text-field layout="_pstyle6" style="ParagraphStyle1"><Hyperlink hyperlink="true" linktarget="Wks:#1.A" style="_cstyle2">1.A</Hyperlink><Font style="_cstyle4">     Entering differential equations in Maple</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Font style="_cstyle4">                 </Font><Hyperlink hyperlink="true" linktarget="Wks:#1.A-1" style="_cstyle2">1.A-1</Hyperlink><Font style="_cstyle4">    First-order differential equations</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Font style="_cstyle4">                 </Font><Hyperlink hyperlink="true" linktarget="Wks:#1.A-2" style="_cstyle2">1.A-2</Hyperlink><Font style="_cstyle4">    Higher-order differential equations</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Font style="_cstyle4">                 </Font><Hyperlink hyperlink="true" linktarget="Wks:#1.A-3" style="_cstyle2">1.A-3</Hyperlink><Font style="_cstyle4">    Systems of differential equations</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Hyperlink hyperlink="true" linktarget="Wks:#1.B" style="_cstyle2">1.B</Hyperlink><Font style="_cstyle4">     Explicit solutions to differential equations</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Font style="_cstyle4">                 </Font><Hyperlink hyperlink="true" linktarget="Wks:#1.B-1" style="_cstyle2">1.B-1</Hyperlink><Font style="_cstyle4">    General solutions</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Font style="_cstyle4">                 </Font><Hyperlink hyperlink="true" linktarget="Wks:#1.B-2" style="_cstyle2">1.B-2</Hyperlink><Font style="_cstyle4">    Solutions to initial value problems (IVPs)</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Hyperlink hyperlink="true" linktarget="Wks:#1.C" style="_cstyle2">1.C</Hyperlink><Font style="_cstyle4">     Numerical Solution to an IVP</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Hyperlink hyperlink="true" linktarget="Wks:#1.D" style="_cstyle2">1.D</Hyperlink><Font style="_cstyle4">     Graphical Solution to an IVP</Font></Text-field><Text-field layout="_pstyle6" style="ParagraphStyle1"><Hyperlink hyperlink="true" linktarget="Wks:#1.E" style="_cstyle2">1.E</Hyperlink><Font style="_cstyle4">     Using </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools,odeadvisor" style="Hyperlink">odeadvisor</Hyperlink><Font style="_cstyle4"> to classify an ODE</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Section collapsed="true"><Title><Text-field layout="_pstyle5" style="_cstyle3">Initialization</Text-field></Title><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">restart;</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">with( DEtools ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">with( plots ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">with( LinearAlgebra ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle6">interface( rtablesize=30 );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="1.A" layout="_pstyle5" style="_cstyle3">1.A Entering differential equations in Maple</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">A differential equation can be entered in Maple using any of the methods for constructing algebraic, transcendental, or any other </Font><Hyperlink hyperlink="true" linktarget="Help:equation" style="_cstyle2">equation</Hyperlink><Font style="_cstyle7"> in Maple. It is a good idea to assign each differential equation to a unique, and descriptive, Maple name. Such assignments are typically done using an </Font><Hyperlink hyperlink="true" linktarget="Help:assignment" style="_cstyle2">assignment statement</Hyperlink><Font style="_cstyle7">.  For example, the ordinary differential equation (ODE)</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle1" style="ParagraphStyle1"><Equation input-equation="dx/dt = k*x;" style="2D Comment">NiMvKiYlI2R4RyIiIiUjZHRHISIiKiYlImtHRiYlInhHRiY=</Equation><Font style="_cstyle1"> </Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="_cstyle7">would be entered into Maple as</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode := diff( x(t), t ) = k * x(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Hyperlink hyperlink="true" linktarget="Help:assign" style="_cstyle2">assign</Hyperlink><Font style="_cstyle7"> command will not be of too much use in creating differential equations. Note that if </Font><Hyperlink hyperlink="true" linktarget="Help:assign" style="_cstyle2">assign</Hyperlink><Font style="_cstyle7"> is used to convert an equality into an assignment, the result of the assignment will not have an equal sign,</Font><Font style="_cstyle8"> i.e.</Font><Font style="_cstyle7">, it will not be an </Font><Hyperlink hyperlink="true" linktarget="Help:equation" style="_cstyle2">equation</Hyperlink><Font style="_cstyle7">. When Maple expects an equation and receives an expression, the expression is assumed to be the left-hand side of an equation whose right-hand side is zero. For example, when working with Newton's second law of motion, one might write</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">eq_of_motion := F = m*a;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">for the equation of motion, then set </Font><Equation input-equation="a;" style="2D Comment">NiMlImFH</Equation><Font style="_cstyle7">, the acceleration, as </Font><Equation input-equation="`x''`(t);" style="2D Comment">NiMtJSR4JydHNiMlInRH</Equation><Font style="_cstyle7"> to obtain</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">eq_of_motion2 := eval( eq_of_motion, a=diff(x(t),t,t) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">When the </Font><Hyperlink hyperlink="true" linktarget="Help:assign" style="_cstyle2">assign</Hyperlink><Font style="_cstyle7"> command is applied to </Font><Font style="_cstyle9">eq_of_motion2</Font><Font style="_cstyle7">,</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">assign(eq_of_motion2);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">the result is that the Maple name </Font><Font style="_cstyle9">F</Font><Font style="_cstyle7"> has been assigned a value,</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">F;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Note that </Font><Font style="_cstyle9">F</Font><Font style="_cstyle7"> is only an expression, not an equation. In most instances, when Maple receives an expression when an equation is expected, it is assumed that the expression is the left-hand side of the equation and the right-hand side is zero. Thus, the following two commands are equivalent:</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">dsolve( F, x(t) );
dsolve( F=0, x(t) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Section collapsed="true"><Title><Text-field bookmark="1.A-1" layout="_pstyle7" style="_cstyle10">1.A-1 First-order differential equations</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">A first-order differential equation is an equation that expresses a relationship between a function, </Font><Equation input-equation="x;" style="2D Comment">NiMlInhH</Equation><Font style="_cstyle7">, its independent variable, </Font><Equation input-equation="t" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle7">, and </Font><Equation input-equation="diff(x(t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSUieEc2IyUidEdGKQ==</Equation><Font style="_cstyle7">, the first derivative.  Other numeric or symbolic parameters can also appear in the equation. </Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Hyperlink hyperlink="true" linktarget="Help:diff" style="_cstyle2">diff</Hyperlink><Font style="_cstyle7"> and </Font><Hyperlink hyperlink="true" linktarget="Help:D" style="_cstyle2">D</Hyperlink><Font style="_cstyle7"> commands are used to represent derivatives in Maple, the first appearing as</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">q1 := `x'` = diff (x(t), t ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">q1;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and the second, as</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">convert( q1, D );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">The general form for a first-order differential equation is</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle1" style="ParagraphStyle1"><Font style="_cstyle1"> </Font><Equation input-equation="F(t,x(t),diff(x(t),t))=0" style="2D Comment">NiMvLSUiRkc2JSUidEctJSJ4RzYjRictJSVkaWZmRzYkRihGJyIiIQ==</Equation><Font style="_cstyle1">. </Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">In most cases it will be possible to solve for the derivative, </Font><Font style="_cstyle8">i.e,</Font><Font style="_cstyle7"> </Font><Equation input-equation="diff(x(t),t) = G(t,x(t))" style="2D Comment">NiMvLSUlZGlmZkc2JC0lInhHNiMlInRHRiotJSJHRzYkRipGJw==</Equation><Font style="_cstyle7">.  While </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7"> can generally work with ODEs specified in either form, the graphical command </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools[DEplot]" style="Hyperlink">DEplot</Hyperlink><Font style="_cstyle7"> requires the explicit format (or its equivalent for a system).</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="1.A-2" layout="_pstyle7" style="_cstyle10">1.A-2 Higher-order differential equations</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">A second-order derivative of a function </Font><Equation input-equation="x;" style="2D Comment">NiMlInhH</Equation><Font style="_cstyle7"> can be entered using </Font><Hyperlink hyperlink="true" linktarget="Help:diff" style="_cstyle2">diff</Hyperlink><Font style="_cstyle7"> as</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">q2 := `x''` = diff( x(t), t,t ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">q2;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The corresponding derivative expressed in terms of </Font><Hyperlink hyperlink="true" linktarget="Help:D" style="_cstyle2">D</Hyperlink><Font style="_cstyle7"> is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">convert( q2, D );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">If the right-hand side of this expression were entered explicitly, the syntax would be one of</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">(D@D)(x)(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">or</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">(D@@2)(x)(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The second form is functionally equivalent to the </Font><Hyperlink hyperlink="true" linktarget="Help:@" style="_cstyle2">composition</Hyperlink><Font style="_cstyle7"> of D with itself, that is,</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">D( D(x) )(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">To represent higher-order derivatives, it is sometimes more convenient to use the dollar operator, </Font><Hyperlink hyperlink="true" linktarget="Help:dollar" style="_cstyle2">$</Hyperlink><Font style="_cstyle7">, instead of explicitly listing the independent variable in the </Font><Hyperlink hyperlink="true" linktarget="Help:diff" style="_cstyle2">diff</Hyperlink><Font style="_cstyle7"> command once for each derivative.  Thus, </Font><Equation input-equation="`x'''`;" style="2D Comment">NiMlJXgnJydH</Equation><Font style="_cstyle7">, the third derivative, would be entered as</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">`x'''` := diff( x(t), t$3 );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The equivalent expressions in terms of the </Font><Hyperlink hyperlink="true" linktarget="Help:D" style="_cstyle2">D</Hyperlink><Font style="_cstyle7"> command are</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">(D@D@D)(x)(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">(D@@3)(x)(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Section><Title><Text-field bookmark="1.A-3" layout="_pstyle7" style="_cstyle10">1.A-3 Systems of differential equations</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The general form for a system of </Font><Equation input-equation="m" style="2D Comment">NiMlIm1H</Equation><Font style="_cstyle7"> first-order differential equations for the </Font><Equation input-equation="n" style="2D Comment">NiMlIm5H</Equation><Font style="_cstyle7"> functions </Font><Equation input-equation="x[1],x[2],`...`,x[n];" style="2D Comment">NiYmJSJ4RzYjIiIiJkYkNiMiIiMlJC4uLkcmRiQ2IyUibkc=</Equation><Font style="_cstyle7"> with independent variable </Font><Equation input-equation="t" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle7"> is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle1" style="ParagraphStyle1"><Equation input-equation="F[1]" style="2D Comment">NiMmJSJGRzYjIiIi</Equation><Font style="_cstyle1">(</Font><Equation input-equation="t" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[1](t)" style="2D Comment">NiMtJiUieEc2IyIiIjYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[2](t)" style="2D Comment">NiMtJiUieEc2IyIiIzYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[n](t)" style="2D Comment">NiMtJiUieEc2IyUibkc2IyUidEc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[1](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMiIiI2IyUidEdGLA==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[2](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMiIiM2IyUidEdGLA==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[n](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMlIm5HNiMlInRHRiw=</Equation><Font style="_cstyle1"> ) = 0</Font></Text-field><Text-field layout="_pstyle1" style="ParagraphStyle1"><Equation input-equation="F[2]" style="2D Comment">NiMmJSJGRzYjIiIj</Equation><Font style="_cstyle1">(</Font><Equation input-equation="t" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[1](t)" style="2D Comment">NiMtJiUieEc2IyIiIjYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[2](t)" style="2D Comment">NiMtJiUieEc2IyIiIzYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[n](t)" style="2D Comment">NiMtJiUieEc2IyUibkc2IyUidEc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[1](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMiIiI2IyUidEdGLA==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[2](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMiIiM2IyUidEdGLA==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[n](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMlIm5HNiMlInRHRiw=</Equation><Font style="_cstyle1"> ) = 0</Font></Text-field><Text-field layout="_pstyle1" style="_cstyle1">.</Text-field><Text-field layout="_pstyle1" style="_cstyle1">.</Text-field><Text-field layout="_pstyle1" style="_cstyle1">.</Text-field><Text-field layout="_pstyle1" style="ParagraphStyle1"><Equation input-equation="F[m]" style="2D Comment">NiMmJSJGRzYjJSJtRw==</Equation><Font style="_cstyle1">(</Font><Equation input-equation="t" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[1](t)" style="2D Comment">NiMtJiUieEc2IyIiIjYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[2](t)" style="2D Comment">NiMtJiUieEc2IyIiIzYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[n](t)" style="2D Comment">NiMtJiUieEc2IyUibkc2IyUidEc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[1](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMiIiI2IyUidEdGLA==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[2](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMiIiM2IyUidEdGLA==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="diff(x[n](t),t)" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMlIm5HNiMlInRHRiw=</Equation><Font style="_cstyle1"> ) = 0.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">In most cases of interest, it will be possible to solve explicitly for each of the </Font><Equation input-equation="n" style="2D Comment">NiMlIm5H</Equation><Font style="_cstyle7"> first derivatives in terms of </Font><Equation input-equation="t" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle7"> and the </Font><Equation input-equation="n" style="2D Comment">NiMlIm5H</Equation><Font style="_cstyle7"> function values so that the ODEs can be put into the form</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle1" style="ParagraphStyle1"><Font style="_cstyle1"> </Font><Equation input-equation="diff( x[i](t), t )" style="2D Comment">NiMtJSVkaWZmRzYkLSYlInhHNiMlImlHNiMlInRHRiw=</Equation><Font style="_cstyle1"> = </Font><Equation input-equation="G[i]" style="2D Comment">NiMmJSJHRzYjJSJpRw==</Equation><Font style="_cstyle1">(</Font><Equation input-equation="t" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[1](t)" style="2D Comment">NiMtJiUieEc2IyIiIjYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[2](t)" style="2D Comment">NiMtJiUieEc2IyIiIzYjJSJ0Rw==</Equation><Font style="_cstyle1">, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="x[n](t)" style="2D Comment">NiMtJiUieEc2IyUibkc2IyUidEc=</Equation><Font style="_cstyle1"> )  for </Font><Equation input-equation="i" style="2D Comment">NiMlImlH</Equation><Font style="_cstyle1"> = 1, 2, </Font><Equation input-equation="`...`;" style="2D Comment">NiMlJC4uLkc=</Equation><Font style="_cstyle1">, </Font><Equation input-equation="n" style="2D Comment">NiMlIm5H</Equation><Font style="_cstyle1">.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">While it is possible to express a system of differential equations in terms of Maple vectors, it is generally preferable to express the system as a list (or set) of </Font><Equation input-equation="m" style="2D Comment">NiMlIm1H</Equation><Font style="_cstyle7"> equations. For example, the second-order differential equation</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode2 := diff( x(t), t,t ) + sin( x(t) ) = 0;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">can be represented as a system in terms of </Font><Equation input-equation="x(t)" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font style="_cstyle7"> and </Font><Equation input-equation="v(t)=diff(x(t),t)" style="2D Comment">NiMvLSUidkc2IyUidEctJSVkaWZmRzYkLSUieEdGJkYn</Equation><Font style="_cstyle7">, that is, as</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle1" style="ParagraphStyle1"><Equation input-equation="`x'`(t) = v(t);" style="2D Comment">NiMvLSUjeCdHNiMlInRHLSUidkdGJg==</Equation><Font style="_cstyle1">           </Font></Text-field><Text-field layout="_pstyle1" style="ParagraphStyle1"><Equation input-equation="`v'`(t) = -sin(x(t));" style="2D Comment">NiMvLSUjdidHNiMlInRHLCQtJSRzaW5HNiMtJSJ4R0YmISIi</Equation><Font style="_cstyle1"> </Font></Text-field><Text-field layout="_pstyle2" style="_cstyle7"> </Text-field><Text-field layout="_pstyle2" style="_cstyle7">which would appear in Maple as</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys := [ diff( x(t), t ) = v(t),</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">         diff( v(t), t ) = -sin(x(t)) ];</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">For a linear system, the set of explicit differential equations can be constructed from a coefficient matrix such as</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">A := &lt; &lt;a|b&gt;, &lt;c|d&gt; &gt;;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">The vector of unknowns would appear in Maple as</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">X := &lt; x[1](t), x[2](t) &gt;;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and the derivative of this vector of unknowns would appear as</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">`X'` := map( diff, X, t );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">The individual ODEs of the system can be generated in Maple via</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys1 := eval( GenerateEquations( A, [_x1,_x2], `X'`),</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">              {_x1=X[1],_x2=X[2]} );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and then put into the more standard form</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys2 := map( isolate, sys1, diff );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section></Section><Section collapsed="true"><Title><Text-field bookmark="1.B" layout="_pstyle5" style="_cstyle3">1.B Explicit solutions to differential equations</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7"> command is used to obtain a solution to a differential equation. If initial and/or boundary conditions are specified, Maple attempts to find a particular solution to the specified initial or boundary value problem. Otherwise, the result is a </Font><Font style="_cstyle8">general solution</Font><Font style="_cstyle7"> to the differential equation. </Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The terms </Font><Font style="_cstyle8">general</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">solution</Font><Font style="_cstyle7">, and </Font><Font style="_cstyle8">initial</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">value</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">problem</Font><Font style="_cstyle7"> (IVP) will be clarified below.  The terms </Font><Font style="_cstyle8">particular</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">solution</Font><Font style="_cstyle7"> and </Font><Font style="_cstyle8">boundary</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">value</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">problem</Font><Font style="_cstyle7"> (BVP) will be explained at appropriate places in the sequal.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Section><Title><Text-field bookmark="1.B-1" layout="_pstyle7" style="_cstyle10">1.B-1 General solutions</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">In its simplest form, the </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7"> command accepts the differential equation and the unknown function.  If the differential equation is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode := diff( x(t), t ) = k*x(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and the unknown function is</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">fn  := x(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">then the solution is found in Maple with</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sol := dsolve( ode, fn );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The methods considered and executed by Maple to obtain a solution to an ODE or IVP can be observed by increasing the </Font><Hyperlink hyperlink="true" linktarget="Help:infolevel" style="_cstyle2">infolevel</Hyperlink><Font style="_cstyle7"> for </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7"> to 3 :</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">infolevel[dsolve] := 3:</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">Then, re-executing the previous example yields :</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">dsolve( ode, fn );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">To suppress the additional information, reset the </Font><Hyperlink hyperlink="true" linktarget="Help:infolevel" style="_cstyle2">infolevel</Hyperlink><Font style="_cstyle7"> for </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7"> to 0 :</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">infolevel[dsolve] := 0:</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle11">Notes</Font><Font style="_cstyle7">:</Font></Text-field><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle12">all occurrences of the dependent variable must appear with the independent variable, so the usage is </Font><Equation input-equation="x(t);" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font style="_cstyle12">, not just </Font><Equation input-equation="x;" style="2D Comment">NiMlInhH</Equation><Font style="_cstyle12">;</Font></Text-field><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle12">the general solution of this first-order ODE is a </Font><Font style="_cstyle13">one</Font><Font style="_cstyle12"> </Font><Font style="_cstyle13">parameter</Font><Font style="_cstyle12"> </Font><Font style="_cstyle13">family</Font><Font style="_cstyle12"> of solutions where the default name of the parameter is  </Font><Font style="_cstyle14">_C1</Font><Font style="_cstyle12">;</Font></Text-field><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle12">the result of </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle12"> is an equation; to access the right-hand side of this equation use the </Font><Font style="_cstyle13">right</Font><Font style="_cstyle12">-</Font><Font style="_cstyle13">hand</Font><Font style="_cstyle12"> </Font><Font style="_cstyle13">side</Font><Font style="_cstyle12"> command, namely, </Font><Hyperlink hyperlink="true" linktarget="Help:rhs" style="_cstyle2">rhs</Hyperlink><Font style="_cstyle12">:</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">X := rhs(sol);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle12">applying the </Font><Hyperlink hyperlink="true" linktarget="Help:assign" style="_cstyle2">assign</Hyperlink><Font style="_cstyle12"> command to the result of </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle12"> does </Font><Font style="_cstyle15">not</Font><Font style="_cstyle12"> convert the solution to a Maple function of the independent variable; to obtain the solution as a </Font><Font style="_cstyle13">function</Font><Font style="_cstyle12"> of the independent variable, use </Font><Hyperlink hyperlink="true" linktarget="Help:unapply" style="_cstyle2">unapply</Hyperlink><Font style="_cstyle12">:</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">X := unapply( rhs(sol), t );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Maple's </Font><Font style="_cstyle11">unapply</Font><Font style="_cstyle7"> command converts an </Font><Font style="_cstyle8">existing</Font><Font style="_cstyle7"> expression into a function.  Since </Font><Equation executable="true" input-equation="X;" style="2D Input">NiMlIlhH</Equation><Font style="_cstyle7"> is now a function, Maple can correctly interpret the symbols </Font><Equation executable="true" input-equation="X(0);" style="2D Input">NiMtJSJYRzYjIiIh</Equation><Font style="_cstyle7"> as</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">X(0);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">The syntax for obtaining the general solution for a system of ODEs is similar.  If the system is given by</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys := diff( x(t), t ) =          v(t),</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">       diff( v(t), t ) = 2*x(t) - v(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">wherein the dependent variables are</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">fns := x(t), v(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">the solution can be obtained via</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sol := dsolve( {sys}, {fns} );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">Notes:</Text-field><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle12">the first argument to </Font><Font style="_cstyle16">dsolve</Font><Font style="_cstyle12"> must be either a single ODE or a set or list of ODEs; the second argument, the dependent function(s), follows a similar format</Font></Text-field><Text-field layout="_pstyle8" style="ParagraphStyle1"><Font style="_cstyle12">because the result returned by </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle12"> is a set of equations, use </Font><Hyperlink hyperlink="true" linktarget="Help:subs" style="_cstyle2">subs</Hyperlink><Font style="_cstyle12"> or </Font><Hyperlink hyperlink="true" linktarget="Help:eval" style="_cstyle2">eval</Hyperlink><Font style="_cstyle12"> to extract the individual components of the solution. (This approach can also be used in place of </Font><Hyperlink hyperlink="true" linktarget="Help:rhs" style="_cstyle2">rhs</Hyperlink><Font style="_cstyle12"> for single equations.  In fact, it is the more efficient strategy for extracting expressions from Maple computations.)</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">X := subs( sol, x(t) );
V := eval( v(t), sol );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Section><Title><Text-field bookmark="1.B-2" layout="_pstyle7" style="_cstyle10">1.B-2 Solutions to initial value problems (IVPs)</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">An initial value problem is an ODE together with an appropriate set of initial conditions. To find the solution of an IVP with </Font><Font style="_cstyle11">dsolve</Font><Font style="_cstyle7">, the first argument must be a set consisting of the ODE and the initial conditions.  If the ODE is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">unassign('A');
ode;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and the initial condition is</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ic := x(0)=A;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">the </Font><Font style="_cstyle11">dsolve</Font><Font style="_cstyle7"> solution is obtained via</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">dsolve( {ode,ic}, fn );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">An IVP for a system of ODEs requires one initial condition for each ODE.  Thus, if the system is</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and the initial conditions are</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys_ic := x(0)=X0, v(0)=0;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">the </Font><Font style="_cstyle11">dsolve</Font><Font style="_cstyle7"> solution is obtained via</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys_soln := dsolve( {sys, sys_ic}, {fns} );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">If the IVP contains a differential equation of order </Font><Equation input-equation="n;" style="2D Comment">NiMlIm5H</Equation><Font style="_cstyle7">, that is, the highest-ordered derivative in the ODE is an </Font><Equation input-equation="n;" style="2D Comment">NiMlIm5H</Equation><Font style="_cstyle7">th derivative, then there must be </Font><Equation input-equation="n;" style="2D Comment">NiMlIm5H</Equation><Font style="_cstyle7"> initial conditions.  These conditions will be prescribed values for the dependent variable and its first </Font><Equation input-equation="n-1;" style="2D Comment">NiMsJiUibkciIiJGJSEiIg==</Equation><Font style="_cstyle7"> derivatives all prescribed at a single point.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The following example is the </Font><Font style="_cstyle8">second</Font><Font style="_cstyle7">-</Font><Font style="_cstyle8">order</Font><Font style="_cstyle7"> IVP equivalent to the first-order system just solved.  The differential equation is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode2 := diff( x(t), t,t ) + diff( x(t), t ) - 2*x(t) = 0;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and the two initial conditions are</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ic2 := x(0)=X0, D(x)(0)=0;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Font style="_cstyle11">dsolve</Font><Font style="_cstyle7"> solution for </Font><Equation input-equation="x(t);" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font style="_cstyle7"> is then</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sol2 := dsolve( {ode2,ic2}, x(t) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Hyperlink hyperlink="true" linktarget="Help:odetest" style="_cstyle2">odetest</Hyperlink><Font style="_cstyle7"> command can be used to verify the equivalence of the second-order ODE and the system of first-order ODEs. First, verify that the function </Font><Equation input-equation="x(t)" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font style="_cstyle7"> returned as part of the system's solution, namely,</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys_solnX := op(select(has,sys_soln,x(t)));</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">satisfies the second-order ODE</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odetest( sys_solnX, ode2 );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Alternatively, the function </Font><Equation input-equation="v(t)" style="2D Comment">NiMtJSJ2RzYjJSJ0Rw==</Equation><Font style="_cstyle7"> satisfying the system of ODEs should satisfy </Font><Equation input-equation="v(t) = `x'`(t);" style="2D Comment">NiMvLSUidkc2IyUidEctJSN4J0dGJg==</Equation><Font style="_cstyle7">.  Hence, we compute </Font><Equation input-equation="`x'`(t);" style="2D Comment">NiMtJSN4J0c2IyUidEc=</Equation><Font style="_cstyle7">, obtaining</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sol2v := v(t) = diff(rhs(sol2),t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The check that the functions </Font><Equation input-equation="x(t)" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font style="_cstyle7">, </Font><Equation input-equation="v(t)" style="2D Comment">NiMtJSJ2RzYjJSJ0Rw==</Equation><Font style="_cstyle7"> satisfy the system of ODEs is completed with the command</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odetest( {sol2,sol2v}, {sys} );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Note that Maple's </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7"> command is not savvy enough to know what to do with a differential equation that does not explicitly identify the independent variable.  For example, if the incorrect notation is used, </Font><Font style="_cstyle11">dsolve</Font><Font style="_cstyle7"> returns an error, as we see with</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">dsolve( D(x)=k*x, x(t) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">The correct syntax for this example would be</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">dsolve( D(x)(t)=k*x(t), x(t) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Maple supports different notation for an initial condition of the form </Font><Equation input-equation="`x'`(0) = 2;" style="2D Comment">NiMvLSUjeCdHNiMiIiEiIiM=</Equation><Font style="_cstyle7">.  The best notation to use in the context of differential equations is the </Font><Hyperlink hyperlink="true" linktarget="Help:D" style="_cstyle2">D</Hyperlink><Font style="_cstyle7"> operator, the syntax for which is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">D(x)(0) = 2;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The  </Font><Hyperlink hyperlink="true" linktarget="Help:D" style="_cstyle2">D</Hyperlink><Font style="_cstyle7"> operator can be replaced by the </Font><Equation input-equation="d/dt;" style="2D Comment">NiMqJiUiZEciIiIlI2R0RyEiIg==</Equation><Font style="_cstyle7"> operator by using the Maple command</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">convert(D(x)(0)=2,diff);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">but it is not practical to use an expression of this type as an initial condition in the dsolve command.  That it works is clear from </Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">dsolve( {diff(x(t),t)=k*x(t), convert(D(x)(0),diff)=1}, x(t) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">but most users prefer to use </Font><Hyperlink hyperlink="true" linktarget="Help:diff" style="_cstyle2">diff</Hyperlink><Font style="_cstyle7"> when </Font><Font style="_cstyle8">creating</Font><Font style="_cstyle7"> a differential equation and </Font><Hyperlink hyperlink="true" linktarget="Help:D" style="_cstyle2">D</Hyperlink><Font style="_cstyle7"> when creating initial (or boundary) conditions.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section></Section><Section collapsed="true"><Title><Text-field bookmark="1.C" layout="_pstyle5" style="_cstyle3">1.C Numerical solutions to an IVP</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">It is not possible to find an explicit solution for many IVPs. And, even when it is possible to find an explicit solution, the solution might be so complicated as to be of little or no practical use. In either event, Maple can be instructed to return a </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve,numeric" style="_cstyle2">numerical solution</Hyperlink><Font style="_cstyle7"> to the IVP by including </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve,numeric" style="_cstyle2">type=numeric</Hyperlink><Font style="_cstyle7"> as an optional argument to </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7">.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="_cstyle7">Note that values must be assigned to all parameters in the IVP before asking Maple for a numerical solution.  Thus if the IVP is given by</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode2;
ic3 := eval(ic2,X0=3);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">a numeric solution in Maple begins with</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">nsol := dsolve( {ode2,ic3}, x(t), type=numeric );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Maple has created a </Font><Font style="_cstyle8">procedure</Font><Font style="_cstyle7"> (subroutine) whose invocation, or call, will cause numbers to be generated.  The procedure </Font><Font style="_cstyle17">nsol</Font><Font style="_cstyle7"> is invoked at a value of the independent variable, here, </Font><Equation input-equation="t;" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle7">.  For example, at </Font><Equation input-equation="t = 1;" style="2D Comment">NiMvJSJ0RyIiIg==</Equation><Font style="_cstyle7">, the call would be</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">nsol(1);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The valued returned by this procedure is a list of equations. The first equation specifies the value of the independent variable, subsequent equations display the value of each of the functions (including derivatives) for which an initial condition is specified.  Note that each appearance of the dependent variable and its derivatives is </Font><Equation input-equation="x(t);" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font style="_cstyle7"> and not </Font><Equation input-equation="x(1);" style="2D Comment">NiMtJSJ4RzYjIiIi</Equation><Font style="_cstyle7">.  This allows values of </Font><Equation input-equation="x;" style="2D Comment">NiMlInhH</Equation><Font style="_cstyle7"> to be extracted with the substitution-device illustrated earlier, so that </Font><Equation input-equation="x(1);" style="2D Comment">NiMtJSJ4RzYjIiIi</Equation><Font style="_cstyle7"> could be referenced as</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">eval(x(t), nsol(1));</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Again, note the use of the generic </Font><Equation input-equation="x(t);" style="2D Comment">NiMtJSJ4RzYjJSJ0Rw==</Equation><Font style="_cstyle7"> to obtain the specific value of </Font><Equation input-equation="x(1);" style="2D Comment">NiMtJSJ4RzYjIiIi</Equation><Font style="_cstyle7">.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Hyperlink hyperlink="true" linktarget="Help:plots,odeplot" style="_cstyle2">odeplot</Hyperlink><Font style="_cstyle7"> command, found in the </Font><Hyperlink hyperlink="true" linktarget="Help:plots" style="_cstyle2">plots</Hyperlink><Font style="_cstyle7"> package, can be used to produce one or more plots of the numeric solution to an IVP. In Figure 1.1 below, the graphs of the (approximate) solution (</Font><Font style="_cstyle9">red</Font><Font style="_cstyle7">) and its first derivative (</Font><Font style="_cstyle18">green</Font><Font style="_cstyle7">) are displayed on the interval [0, 1].</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeplot( nsol, [[t,x(t)],[t,diff(x(t),t)]], 0..1, legend=[`x(t)`,`x'(t)`], title="Figure 1.1" );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">A powerful feature of </Font><Hyperlink hyperlink="true" linktarget="Help:plots,odeplot" style="_cstyle2">odeplot</Hyperlink><Font style="_cstyle7"> is its ability to plot </Font><Font style="_cstyle8">functions</Font><Font style="_cstyle7"> of the dependent variable. For example, the graph of </Font><Equation input-equation="x(t) - diff(x(t),t)" style="2D Comment">NiMsJi0lInhHNiMlInRHIiIiLSUlZGlmZkc2JEYkRichIiI=</Equation><Font style="_cstyle7"> on [0, 10], shown in Figure 1.2, provides strong evidence that </Font><Equation input-equation="limit( x(t)-diff(x(t),t), t=infinity ) = 0" style="2D Comment">NiMvLSUmbGltaXRHNiQsJi0lInhHNiMlInRHIiIiLSUlZGlmZkc2JEYoRishIiIvRislKWluZmluaXR5RyIiIQ==</Equation><Font style="_cstyle7">.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeplot( nsol, [t,x(t)-diff(x(t),t)], 0..10, title="Figure 1.2" );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The default numerical integration algorithm is a Fehlberg fourth-fifth Runge-Kutta method (</Font><Hyperlink hyperlink="true" linktarget="Help:dsolve,rkf45" style="_cstyle2">RKF45</Hyperlink><Font style="_cstyle7">). Both higher-order and classical methods are specified with the </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve,numeric" style="_cstyle2">method=</Hyperlink><Font style="_cstyle7"> optional argument. For example, the approximate solution using Euler's method, with stepsize </Font><Equation input-equation="h=0.1" style="2D Comment">NiMvJSJoRy0lJkZsb2F0RzYkIiIiISIi</Equation><Font style="_cstyle7">, is obtained with</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">Xeuler := dsolve( {ode2,ic3}, x(t), type=numeric, method=classical, stepsize=0.1 );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">On the interval </Font><Equation input-equation="[0, 2];" style="2D Comment">NiM3JCIiISIiIw==</Equation><Font style="_cstyle7">, Figure 1.3, a plot comparing the RKF45 solution (in red) and Euler's method solution (in blue), is obtained with</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">p1 := odeplot( nsol, [t,x(t)], 0..2, color=red ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">p2 := odeplot( Xeuler, [t,x(t)], 0..2, color=blue ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">display( [p1,p2], title="Figure 1.3" );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Font style="_cstyle11">dsolve</Font><Font style="_cstyle7"> command can also create a table of values for the solution of an IVP using any of the available methods. For example, the table of values of the solution (and its derivative) using the forward Euler method at the times in the list</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">times := Array( [i/10$i=0..10, $2..10] );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">is created with the command</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">t1 := dsolve( {ode2,ic3}, x(t), type=numeric, method=classical[foreuler], output=Array([i/10$i=0..10, $2..10]) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Note that this structure is a 2 </Font><Font style="_cstyle19">x</Font><Font style="_cstyle7"> 1 matrix in which the (2,1) entry is itself a matrix. Thus, for example, the approximate value of the solution at </Font><Equation input-equation="t;" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle7"> = 0.5 is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">t1[2,1][6,2];</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">A more interesting use of a table of values is to compare the solutions for two different numerical methods (or for one method with different stepsize). To illustrate, the table computed using the Adams-Bashforth-Moulton predictor-corrector method is computed with</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">t2 := dsolve( {ode2,ic3}, x(t), type=numeric, method=classical[abmoulton], output=Array([i/10$i=0..10, $2..10]) ):</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">The columns of approximations from the forward Euler and predictor-corrector methods can be compared in a table created via</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">header1 := &lt;` t `| `Forward Euler`| `Predictor-Corrector`&gt;:</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">header2 := &lt;`---`| `-------------`| `-------------------`&gt;:</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">&lt; header1, header2, &lt;Column(t1[2,1],1..2) | Column(t2[2,1],2) &gt; &gt;;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="1.D" layout="_pstyle5" style="_cstyle3">1.D Graphical solutions to an IVP</Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">One of the graphical tools for analyzing the solution of an IVP, </Font><Hyperlink hyperlink="true" linktarget="Help:plots,odeplot" style="_cstyle2">odeplot</Hyperlink><Font style="_cstyle7">, was discussed in </Font><Hyperlink hyperlink="true" linktarget="Wks:#1.C" style="Hyperlink">Section 1.C</Hyperlink><Font style="_cstyle7"> . The </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools,DEplot" style="_cstyle2">DEplot</Hyperlink><Font style="_cstyle7"> command, from the </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools" style="_cstyle2">DEtools</Hyperlink><Font style="_cstyle7"> package, provides graphical information </Font><Font style="_cstyle8">directly</Font><Font style="_cstyle7"> from the differential equation(s). In it's simplest form, </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools,DEplot" style="_cstyle2">DEplot</Hyperlink><Font style="_cstyle7"> can create a plot of the solution to an IVP.  If the IVP is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode2;ic3;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">then DEplot graphs its solution in Figure 1.4 via the syntax</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">DEplot( ode2, x(t), t=-1..2, [[ic3]], title="Figure 1.4" );</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The extra set of square brackets around the initial condition are needed because </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools,DEplot" style="_cstyle2">DEplot</Hyperlink><Font style="_cstyle7"> facilitates the display of the solution to several different initial conditions in a single plot. For example, the plot of the solution for two additional sets of initial conditions can be added with one simple change to the </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools,DEplot" style="_cstyle2">DEplot</Hyperlink><Font style="_cstyle7"> command.  If the additional initial conditions are entered as</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ic4 := x(0)=0, D(x)(0)=3;</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ic5 := x(0)=-3, D(x)(0)=0;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">then graphs of solutions of three different IVPs posed for the same ODE appear in Figure 1.5 via the syatax</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">DEplot( ode2, x(t), t=-1..2, [[ic3],[ic4],[ic5]], linecolor=[black,red,blue], title="Figure 1.5" );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Note how the individual solution curves are rendered in different colors by listing separate colors for the parameter </Font><Font style="_cstyle8">linecolor</Font><Font style="_cstyle7">.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">To illustrate the capabilities of </Font><Font style="_cstyle11">DEplot</Font><Font style="_cstyle7"> for a system of ODEs, consider the classical Lotka-Volterra model for a predator-prey interaction between a rabbit population, </Font><Equation input-equation="r(t)" style="2D Comment">NiMtJSJyRzYjJSJ0Rw==</Equation><Font style="_cstyle7">, and a fox population, </Font><Equation input-equation="f(t)" style="2D Comment">NiMtJSJmRzYjJSJ0Rw==</Equation><Font style="_cstyle7"> (see also, </Font><Hyperlink hyperlink="true" linktarget="Wks:Lesson26.mws" style="_cstyle2">Lesson 26</Hyperlink><Font style="_cstyle7">).  The ODEs for the system are</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys_PP := diff(r(t),t)=r(t)*(2-f(t)),</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">          diff(f(t),t)=.3*f(t)*(r(t)-1);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">and the dependent variables are</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">fns_PP := r(t), f(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">A direction field for this system is a graph of the </Font><Equation input-equation="rf;" style="2D Comment">NiMlI3JmRw==</Equation><Font style="_cstyle7">-plane in which are displayed arrows whose slopes are given by </Font><Equation input-equation="df/dr = .3*f*(r-1)/r/(2-f);" style="2D Comment">NiMvKiYlI2RmRyIiIiUjZHJHISIiKiwtJSZGbG9hdEc2JCIiJEYoRiYlImZHRiYsJiUickdGJkYmRihGJkYwRigsJiIiI0YmRi5GKEYo</Equation><Font style="_cstyle7"> and whose directions are  determined by the increasing value of </Font><Equation input-equation="t;" style="2D Comment">NiMlInRH</Equation><Font style="_cstyle7">, the independent variable.  Thus, the arrows are tangent to solution curves and therefore give a sense how a collection of such curves would "flow."</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="_cstyle7">The direction field for this system can be obtained with the command:</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">DEplot( [sys_PP], [fns_PP], t=0..1, r=0..3, f=0..3, arrows=medium,</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">        title="Direction Field for Predator-Prey System" );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Note that no initial conditions have been specified and that, because the system is </Font><Font style="_cstyle8">autonomous</Font><Font style="_cstyle7"> (the independent variable does not appear explicitly in the ODEs), the range for the independent variable is immaterial to the appearance of the direction field (but is required by </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools,DEplot" style="_cstyle2">DEplot</Hyperlink><Font style="_cstyle7">). </Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">A </Font><Font style="_cstyle8">phase</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">portrait</Font><Font style="_cstyle7"> is a graph in the phase plane (here, the </Font><Equation input-equation="rf;" style="2D Comment">NiMlI3JmRw==</Equation><Font style="_cstyle7">-plane) that shows multiple solution solution curves, usually called </Font><Font style="_cstyle8">orbits</Font><Font style="_cstyle7">, </Font><Font style="_cstyle8">trajectories</Font><Font style="_cstyle7">, or </Font><Font style="_cstyle8">paths</Font><Font style="_cstyle7">.  It is customary to include arrows showing, along these curves, the direction of increasing values of the independent variable.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/><Text-field layout="_pstyle2" style="_cstyle7">Solutions that are to pass through the following initial points</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ic_PP := [r(0)=2.5,f(0)=i] $ i=1..5;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">are incorporated into a single graph with the command</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">DEplot( [sys_PP], [fns_PP], t=0..30, [ic_PP], arrows=SMALL,</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">        stepsize=0.1, linecolor=BLUE,</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">        title=`Phase Portrait for Predator-Prey System` );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">In the time-domain, solution curves for rabbit and fox populations passing through the first of these initial points can be obtained by specifying the optional argument </Font><Font style="_cstyle8">scene</Font><Font style="_cstyle7">.  In Figure 1.6, the rabbit population </Font><Equation input-equation="r(t);" style="2D Comment">NiMtJSJyRzYjJSJ0Rw==</Equation><Font style="_cstyle7"> is shown in blue, whereas the fox population </Font><Equation input-equation="f(t);" style="2D Comment">NiMtJSJmRzYjJSJ0Rw==</Equation><Font style="_cstyle7"> is shown in red.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">pR := DEplot( [sys_PP], [fns_PP], t=0..30, [ic_PP[1]],</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">              stepsize=0.1, linecolor=BLUE, scene=[t,r] ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">pF := DEplot( [sys_PP], [fns_PP], t=0..30, [ic_PP[1]],</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">              stepsize=0.1, linecolor=RED, scene=[t,f] ):</Text-field><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">display( [pR,pF], scaling=constrained, title="Figure 1.6" );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Additional optional arguments to </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools,DEplot" style="_cstyle2">DEplot</Hyperlink><Font style="_cstyle7"> allow for the specification of the numeical method to be used (the default is a fourth-order Runge-Kutta method, </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve,classical" style="_cstyle2">method=classical[rk4]</Hyperlink><Font style="_cstyle7">), the color, number, and size of arrows in a direction field, and many other features beyond the needs for this course.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="1.E" layout="_pstyle5" style="ParagraphStyle2"><Font style="_cstyle3">1.E Using </Font><Hyperlink bold="true" hyperlink="true" linktarget="Help:DEtools,odeadvisor" size="18" style="Hyperlink">odeadvisor</Hyperlink><Font style="_cstyle3"> to classify an ODE</Font></Text-field></Title><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">The </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools[odeadvisor]" style="Hyperlink">odeadvisor</Hyperlink><Font style="_cstyle7"> command, part of the </Font><Hyperlink hyperlink="true" linktarget="Help:DEtools" style="Hyperlink">DEtools</Hyperlink><Font style="_cstyle7"> package, provides a method for checking the classification of an ODE prior to obtaining a solution. The basic syntax for </Font><Hyperlink hyperlink="true" linktarget="Help:odeadvisor" style="_cstyle2">odeadvisor</Hyperlink><Font style="_cstyle7"> is very simple.  If the differential equation is</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode := diff( y(t), t ) = a*y(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">then its classification is obtained with</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode, y(t) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">This result is a little surprising. Most users, including the author himself, generally classify this ODE as either </Font><Font style="_cstyle8">separable</Font><Font style="_cstyle7"> or </Font><Font style="_cstyle8">first</Font><Font style="_cstyle7">-</Font><Font style="_cstyle8">order</Font><Font style="_cstyle7"> </Font><Font style="_cstyle8">linear</Font><Font style="_cstyle7">. When </Font><Font style="_cstyle9">odeadvisor</Font><Font style="_cstyle7"> returns an unexpected, or unfamiliar, response it can be useful to include </Font><Font style="_cstyle9">help</Font><Font style="_cstyle7"> as the final argument to </Font><Font style="_cstyle9">odeadvisor</Font><Font style="_cstyle7">, as shown by the following usage.</Font></Text-field><Text-field layout="_pstyle2" style="_cstyle7"> </Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode, y(t), help );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">To check if an ODE is solvable by one or more specific methods, a list of methods can be included as an optional argument.  Hence, to determine if the ODE is separable, use</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode, y(t), [separable] );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">whereas to show that the ODE is not exact, use</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode, y(t), [exact] );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">A (seemingly) simple modification to the ODE can significantly alter the nature, and hence, the classification of the ODE. For example, modifying the simple ODE above to</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode2 := diff( y(t), t ) = a*y(t) + f(t);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">means its type changes to </Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode2 );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">a form that is no longer separable, as seen with</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode2, [separable] );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">Second-, and higher-, order ODEs can be handled in a similar manner.  For example, the second-order ODE</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode3 := x^2*diff(y(x),x$2) + 2*x*diff(y(x),x) + y(x) = f(x);</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">is classified as</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode3, y(x) );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">The following usage will yield a help-page full of additional information.</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode3, help );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Unfortunately, </Font><Font style="_cstyle9">odeadvisor</Font><Font style="_cstyle7"> is not able to provide any assistance for a system of ODEs.  For example, if the system </Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">sys1 := { diff(v(t),t) + x(t) = 0, diff(x(t),t)=v(t) };</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">is given to </Font><Font style="_cstyle9">odeadvisor</Font><Font style="_cstyle7">, an error results, as seen from </Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( sys1, {x(t),v(t)} );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">Of course, if the system is converted to an equivalent higher-order ODE, </Font><Font style="_cstyle9">odeadvisor</Font><Font style="_cstyle7"> might be able to provide some useful information.  When the system is written as the second-order ODE</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode4 := diff(x(t),t$2) + x(t) = 0;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">Maple returns</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode4 );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">It is not a surprise to have </Font><Font style="_cstyle9">odeadvisor</Font><Font style="_cstyle7"> return results that are beyond the scope of a first course, or any undergraduate course, in differential equations.  For example, the ODE</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">ode5 := (2*y(x)-x)*diff(y(x),x)-y(x)-2*x;</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="_cstyle7">provokes the response</Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_cstyle5">odeadvisor( ode5 );</Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">This means that we will expect Maple to be able to solve many ODEs and IVPs that we won't be able to solve by hand at the end of this course. It also means that when we can solve an equation by hand, our results may appear different than Maple's because of the different methods used to obtain the solution. Recall that </Font><Hyperlink hyperlink="true" linktarget="Help:infolevel" style="_cstyle2">infolevel[dsolve]:=3:</Hyperlink><Font style="_cstyle7"> causes Maple to display information about the methods used by the </Font><Hyperlink hyperlink="true" linktarget="Help:dsolve" style="_cstyle2">dsolve</Hyperlink><Font style="_cstyle7"> command; </Font><Hyperlink hyperlink="true" linktarget="Help:infolevel" style="_cstyle2">infolevel[dsolve]:=0:</Hyperlink><Font style="_cstyle7"> turns off these messages.</Font></Text-field><Text-field layout="_pstyle2" style="_pstyle2"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group></Section><Group><Input><Text-field layout="_pstyle2" style="ParagraphStyle1"><Font style="_cstyle7">[Back to </Font><Hyperlink hyperlink="true" linktarget="Wks:Lesson00.mw" style="Hyperlink">ODE Powertool Table of Contents</Hyperlink><Font style="_cstyle7">]</Font></Text-field></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Group><Input><Text-field layout="_pstyle4" prompt="&gt; " style="_pstyle4"/></Input></Group><Text-field layout="_pstyle9" style="_pstyle9"/><Text-field/><Text-field/><Text-field/><Text-field/><Text-field/><Text-field/><Text-field/></Worksheet>