<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="1"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Heading 2" rightmargin="0.0" spaceabove="8.0" spacebelow="2.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Heading 1" rightmargin="0.0" spaceabove="8.0" spacebelow="4.0"/><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Normal" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="centred" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Normal257" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="left" bullet="indent" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="List Item" rightmargin="0.0" spaceabove="3.0" spacebelow="3.0"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input"/><Font background="[0,0,0]" family="Times New Roman" foreground="[255,0,0]" name="2D Input" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Comment" underline="false"/><Font background="[0,0,0]" foreground="[0,128,128]" italic="false" name="Hyperlink" underline="true"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Normal257" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" italic="true" name="_cstyle259"/><Font background="[0,0,0]" italic="true" name="_cstyle258"/><Font background="[0,0,0]" italic="true" name="_cstyle257"/><Font background="[0,0,0]" italic="true" name="_cstyle256"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Heading 2" readonly="false" size="14" underline="false"/><Font background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Heading 1" readonly="false" size="18" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="List Item" 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="Normal" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="Page Number" underline="false"/><Font background="[0,0,0]" italic="true" name="_cstyle262"/><Font background="[0,0,0]" italic="true" name="_cstyle261"/><Font background="[0,0,0]" italic="true" name="_cstyle260"/></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="Normal257" style="Normal257"/><Text-field layout="Normal257" style="Normal257">ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257">Lesson 8 -- Exact Equations</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Hyperlink"><Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/~meade/" size="12" style="Hyperlink">Prof. Douglas B. Meade</Hyperlink></Text-field><Text-field layout="Normal257" style="Hyperlink"><Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/~IMI/" size="12" style="Hyperlink">Industrial Mathematics Institute</Hyperlink></Text-field><Text-field layout="Normal257" style="Hyperlink"><Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/" size="12" style="Hyperlink">Department of Mathematics</Hyperlink></Text-field><Text-field layout="Normal257" style="Hyperlink"><Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="http://www.sc.edu/" size="12" style="Hyperlink">University of South Carolina</Hyperlink></Text-field><Text-field layout="Normal257" style="Normal257">Columbia, SC 29208
</Text-field><Text-field layout="Normal257" style="Normal257">URL:   <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="http://www.math.sc.edu/~meade/" size="12" style="Hyperlink">http://www.math.sc.edu/~meade/</Hyperlink></Text-field><Text-field layout="Normal257" style="Normal257">E-mail: <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="mailto:meade@math.sc.edu" size="12" style="Hyperlink">meade@math.sc.edu</Hyperlink> </Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257"><Font encoding="ISO8859-1">Copyright \251  2001  by Douglas B. Meade</Font></Text-field><Text-field layout="Normal257" style="Normal257">All rights reserved</Text-field><Text-field layout="Normal257" style="Normal257"/><Text-field layout="Normal257" style="Normal257">-------------------------------------------------------------------</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Outline of Lesson 8</Text-field></Title><Group><Input><Text-field layout="List Item" style="List Item"><Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Wks:#8.A" size="12" style="Hyperlink">8.A</Hyperlink> Basic Theory</Text-field><Text-field layout="List Item" style="List Item">                 <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Wks:#8.A-1" size="12" style="Hyperlink">8.A-1</Hyperlink> Example 1</Text-field><Text-field layout="List Item" style="List Item"><Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Wks:#8.B" size="12" style="Hyperlink">8.B</Hyperlink> Integrating Factors</Text-field><Text-field layout="List Item" style="List Item">                 <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Wks:#8.B-1" size="12" style="Hyperlink">8.B-1</Hyperlink> Example 2</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Initialization</Text-field></Title><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">restart;</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">with( DEtools ):</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">with( plots ):</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section collapsed="true"><Title><Text-field bookmark="8.A" layout="Heading 1" style="Heading 1">8.A Basic Theory</Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">The general form for a first-order <Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle256" underline="false">exact</Font> differential equation is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">gen_exact_ode := P(x,y(x)) + Q(x,y(x))*diff(y(x),x) = 0;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">where the functions <Equation input-equation="P(x,y);" style="2D Comment">NiMtJSJQRzYkJSJ4RyUieUc=</Equation> and <Equation input-equation="Q(x,y);" style="2D Comment">NiMtJSJRRzYkJSJ4RyUieUc=</Equation> satisfy the conditions</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257"><Equation input-equation="P(x,y) = diff(F(x,y),x);" style="2D Comment">NiMvLSUiUEc2JCUieEclInlHLSUlZGlmZkc2JC0lIkZHRiZGJw==</Equation> </Text-field><Text-field layout="Normal257" style="Normal257"><Equation input-equation="Q(x,y) = diff(F(x,y),y);" style="2D Comment">NiMvLSUiUUc2JCUieEclInlHLSUlZGlmZkc2JC0lIkZHRiZGKA==</Equation> </Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">for some function <Equation input-equation="F(x,y);" style="2D Comment">NiMtJSJGRzYkJSJ4RyUieUc=</Equation>.  At any point<Font bold="false" executable="false" foreground="[0,0,0]" italic="false" size="12" style="2D Comment"> </Font><Equation input-equation="``(x,y);" style="2D Comment">NiMtJSFHNiQlInhHJSJ5Rw==</Equation> where <Equation input-equation="diff(F(x,y),y) &lt;&gt; 0;" style="2D Comment">NiMwLSUlZGlmZkc2JC0lIkZHNiQlInhHJSJ5R0YrIiIh</Equation>, the equation <Equation input-equation="F(x,y) = c;" style="2D Comment">NiMvLSUiRkc2JCUieEclInlHJSJjRw==</Equation>, where <Equation input-equation="c;" style="2D Comment">NiMlImNH</Equation> is a constant, implicitly defines the function <Equation input-equation="y(x);" style="2D Comment">NiMtJSJ5RzYjJSJ4Rw==</Equation>.  Such curves are called <Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle257" underline="false">level</Font> <Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle258" underline="false">curves</Font>, and are the curves in the <Equation input-equation="xy;" style="2D Comment">NiMlI3h5Rw==</Equation>-plane above which the surface <Equation input-equation="z = F(x,y);" style="2D Comment">NiMvJSJ6Ry0lIkZHNiQlInhHJSJ5Rw==</Equation> maintains the constant height <Equation input-equation="c;" style="2D Comment">NiMlImNH</Equation>.</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">If the function <Equation input-equation="y(x);" style="2D Comment">NiMtJSJ5RzYjJSJ4Rw==</Equation> is so defined implicitly by the equation <Equation input-equation="F(x,y) = c;" style="2D Comment">NiMvLSUiRkc2JCUieEclInlHJSJjRw==</Equation>, then implicit differentiation gives</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257"><Equation input-equation="d/dt;" style="2D Comment">NiMqJiUiZEciIiIlI2R0RyEiIg==</Equation> <Equation input-equation="F(x,y(x));" style="2D Comment">NiMtJSJGRzYkJSJ4Ry0lInlHNiNGJg==</Equation> = <Equation input-equation="F[x]+F[y];" style="2D Comment">NiMsJiYlIkZHNiMlInhHIiIiJkYlNiMlInlHRig=</Equation> <Equation input-equation="`y'`(x);" style="2D Comment">NiMtJSN5J0c2IyUieEc=</Equation></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">where subscripts denote partial derivatives.  Now this equation is clearly equivalent to the differential equation, namely,</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257"><Equation input-equation="P(x,y)+Q(x,y)*``(dy/dx) = 0;" style="2D Comment">NiMvLCYtJSJQRzYkJSJ4RyUieUciIiIqJi0lIlFHRidGKi0lIUc2IyomJSNkeUdGKiUjZHhHISIiRipGKiIiIQ==</Equation> </Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">Thus, solving this exact differential equation amounts to finding the exact "antiderivative," the function <Equation input-equation="F(x,y);" style="2D Comment">NiMtJSJGRzYkJSJ4RyUieUc=</Equation> whose exact (or total) derivative is just the ODE itself.  The level curves <Equation input-equation="y(x);" style="2D Comment">NiMtJSJ5RzYjJSJ4Rw==</Equation> defined implicitly by <Equation input-equation="F(x,y) = c;" style="2D Comment">NiMvLSUiRkc2JCUieEclInlHJSJjRw==</Equation> are the solutions of the exact differential equation.</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">To find a condition that guarantees the equation</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257"><Equation input-equation="P(x,y)+Q(x,y)*``(dy/dx) = 0;" style="2D Comment">NiMvLCYtJSJQRzYkJSJ4RyUieUciIiIqJi0lIlFHRidGKi0lIUc2IyomJSNkeUdGKiUjZHhHISIiRipGKiIiIQ==</Equation> </Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">is exact, consider an arbitrary function <Equation input-equation="F(x,y);" style="2D Comment">NiMtJSJGRzYkJSJ4RyUieUc=</Equation> whose level curves are defined by the equation</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">level_curve := F(x,y(x)) = C;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">for some constant <Equation input-equation="C" style="2D Comment">NiMlIkNH</Equation>.  If the function <Equation input-equation="F(x,y);" style="2D Comment">NiMtJSJGRzYkJSJ4RyUieUc=</Equation> satisfies the the ODE, then the difference of the total derivative of <Equation input-equation="F(x,y);" style="2D Comment">NiMtJSJGRzYkJSJ4RyUieUc=</Equation> and the ODE itself should be zero.  Thus, the condition for the equation to be exact is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">condition_to_be_exact := collect( diff( lhs(level_curve), x ) - lhs( gen_exact_ode ) = 0, diff(y(x),x) );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Careful consideration of this equation shows that it is satisfied when</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">condition1 := isolate( eval( condition_to_be_exact, diff(y(x),x)=0 ), F );</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">condition2 := isolate( coeff( lhs(condition_to_be_exact), diff(y(x),x) ) = 0, F );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">That is, when</Text-field><Text-field layout="Normal257" style="Normal257"><Equation input-equation="Diff(F,x) = P" style="2D Comment">NiMvLSUlRGlmZkc2JCUiRkclInhHJSJQRw==</Equation> and <Equation input-equation="Diff(F,y)=Q" style="2D Comment">NiMvLSUlRGlmZkc2JCUiRkclInlHJSJRRw==</Equation>.</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">For arbitrary pairs of functions P and Q, this condition will not be satisfied. However, assuming the function F has continuous second derivatives and the functions P and Q have continuous first derivatives, the equivalence of the mixed second derivatives of F, namely,</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">equiv_of_mixed_deriv := D[1](D[2](F)(x,y(x))) = D[2](D[1](F)(x,y(x)));</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">combines with the previous argument</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">q1 := D[2](condition1);</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">q2 := D[1](condition2);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">to provide necessary and sufficient conditions for an exact equation.  This condition is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">eval( equiv_of_mixed_deriv, [ D[2](condition1), D[1](condition2) ] );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">that is,</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">nec_and_suff_condition := (P,Q) -&gt; diff( Q(x,y), x ) = diff( P(x,y), y ):</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">nec_and_suff_condition(P,Q);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Section><Title><Text-field bookmark="8.A-1" layout="Heading 2" style="Heading 2">8.A-1 Example 1</Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">Consider the differential equation</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">ode := exp(y(x)) + (x*exp(y(x))+cos(y(x))) * diff(y(x),x) = 0;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">To check if this ODE is exact, identify the coefficients for the general form</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">P := unapply( eval( lhs(ode), [diff(y(x),x)=0, y(x)=y] ), (x,y) ):</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">Q := unapply( eval( coeff(lhs(ode),diff(y(x),x)), y(x)=y ), (x,y) ):
'P'(x,y) = P(x,y);
'Q'(x,y) = Q(x,y);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">and check the necessary and sufficient condition for exactness:</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">nec_and_suff_condition(P,Q);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Since this is an exact equation, we construct the solution in the form <Equation input-equation="F(x,y)=C" style="2D Comment">NiMvLSUiRkc2JCUieEclInlHJSJDRw==</Equation> where</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257">  <Equation input-equation="Diff( F(x,y), x ) = P(x,y)" style="2D Comment">NiMvLSUlRGlmZkc2JC0lIkZHNiQlInhHJSJ5R0YqLSUiUEdGKQ==</Equation> </Text-field><Text-field layout="Normal" style="Normal">and</Text-field><Text-field layout="Normal257" style="Normal257"> <Equation input-equation="Diff( F(x,y), y ) = Q(x,y)" style="2D Comment">NiMvLSUlRGlmZkc2JC0lIkZHNiQlInhHJSJ5R0YrLSUiUUdGKQ==</Equation> </Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">The first of these is satisfied when</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">q1 := F(x,y) = int( P(x,y), x ) + g(y);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">To satisfy the second condition requires</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">q2 := diff( rhs(q1), y ) - Q(x,y) = 0;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Thus, integrating both sides and isolating <Equation input-equation="g(y);" style="2D Comment">NiMtJSJnRzYjJSJ5Rw==</Equation> gives</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">q3 := isolate( map( int, q2, y ), g(y) );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">and so the function <Equation input-equation="F(x,y);" style="2D Comment">NiMtJSJGRzYkJSJ4RyUieUc=</Equation> is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">soln_F := eval( rhs(q1), q3 );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">and the implicit solution of the differential equation is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">soln := soln_F = C;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">A quick pause to check that this solution does satisfy the differential equation reveals</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">odetest( eval(soln,y=y(x)), ode );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">The function F is also called a <Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle259" underline="false">first</Font> <Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle260" underline="false">integral</Font> of the ODE. The Maple command <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Help:DEtools,firint" size="12" style="Hyperlink">firint</Hyperlink>, from the <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Help:DEtools" size="12" style="Hyperlink">DEtools</Hyperlink> package, can be used to express the solution of an exact ODE in terms of its first integral. For example,</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">firint( ode );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Note that essentially the same solution is returned with either of the following single commands</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">exactsol( ode, y(x) );</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">dsolve( ode, y(x), [exact] );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">The even simpler command</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">infolevel[dsolve] := 3:</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">dsolve( ode, y(x) );</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">infolevel[dsolve] := 0:</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">returns an equivalent, but different, solution. This is because Maple is able to find several classifications for this example</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">odeadvisor( ode );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">and uses a different solution method.</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section></Section><Section collapsed="true"><Title><Text-field bookmark="8.B" layout="Heading 1" style="Heading 1">8.B Integrating Factors</Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">Most first-order ODEs are not exact. Some of these ODEs can be made exact by multiplying the ODE by an appropriate function so that the new ODE is exact. The integrating factor, <Equation input-equation="mu(x,y)" style="2D Comment">NiMtJSNtdUc2JCUieEclInlH</Equation>, must be chosen so that the necessary and sufficient condition is satisfied by the coefficients of the ODE <Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle261" underline="false">after</Font> multiplication by <Equation input-equation="mu(x,y)" style="2D Comment">NiMtJSNtdUc2JCUieEclInlH</Equation> :</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">Applying the necessary and sufficient condition for exactness to the ODE</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal257" style="Normal257"><Equation input-equation="P(x,y(x))+Q(x,y(x))*diff(y(x),x) = 0;" style="2D Comment">NiMvLCYtJSJQRzYkJSJ4Ry0lInlHNiNGKCIiIiomLSUiUUdGJ0YsLSUlZGlmZkc2JEYpRihGLEYsIiIh</Equation> </Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">leads to </Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">unassign('P','Q','mu');</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">nec_and_suff_condition( mu*P, mu*Q );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">This is a <Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="12" style="_cstyle262" underline="false">partial</Font> differential equation, but there are numerous cases where the determination of the integrating factor can be completed under the assumption that <Equation input-equation="mu" style="2D Comment">NiMlI211Rw==</Equation> is a function of either <Equation input-equation="x" style="2D Comment">NiMlInhH</Equation> or <Equation input-equation="y" style="2D Comment">NiMlInlH</Equation>, but not both. If at least one of <Equation input-equation="Diff(Q,x)" style="2D Comment">NiMtJSVEaWZmRzYkJSJRRyUieEc=</Equation> and  <Equation input-equation="Diff(P,y)" style="2D Comment">NiMtJSVEaWZmRzYkJSJQRyUieUc=</Equation> is zero, an integrating factor for the original ODE can be found by a process illustrated in the following example.</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Section collapsed="true"><Title><Text-field bookmark="8.B-1" layout="Heading 2" style="Heading 2">8.B-1 Example 2</Text-field></Title><Group><Input><Text-field layout="Normal" style="Normal">As an example, consider the following ODE,</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">ode2 := P(x,y(x)) + Q(x,y(x)) * diff( y(x), x ) = 0;</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">for which the coefficients <Equation input-equation="P(x,y);" style="2D Comment">NiMtJSJQRzYkJSJ4RyUieUc=</Equation> and <Equation input-equation="Q(x,y);" style="2D Comment">NiMtJSJRRzYkJSJ4RyUieUc=</Equation> are</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">P := (x,y) -&gt; x*y-2:</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">Q := (x,y) -&gt; x^2-x*y:
'P'(x,y) = P(x,y);
'Q'(x,y) = Q(x,y);</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">That this equation is not exact can be seen from</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">nec_and_suff_condition( P,Q );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">or from</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">odeadvisor( ode2, [exact] );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">An integrating factor, if one exists, must satisfy the partial differential equation</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">mu_pde := nec_and_suff_condition( mu*P, mu*Q );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">With a little inspection, it can be seen that this PDE simplifies to a linear ODE when the integrating factor is assumed to be independent of <Equation input-equation="y" style="2D Comment">NiMlInlH</Equation>.  The result of this assumption is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">mu_ode := eval( mu_pde, mu(x,y)=mu(x) );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">or better still, </Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">mu_ode2 := simplify( isolate( mu_ode, diff(mu(x),x) ) );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">The general solution to this separable (and linear) ODE is found to be</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">mu_sol := dsolve( mu_ode2, mu(x) );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Since any (non-trivial) solution can be used as an integrating factor, choose <Font bold="false" executable="false" italic="false" size="12" style="2D Input">_C1</Font>=1 and define</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">mu := unapply( eval( rhs(mu_sol), _C1=1 ), x );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">To confirm that this function is an integrating factor for the ODE, apply the necessary and sufficient condition for exactness, obtaining</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">simplify( nec_and_suff_condition( mu*P, mu*Q ) );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">or use</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">odeadvisor( mu(x)*ode2, [exact] );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">The Maple command <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Help:DEtools,mutest" size="12" style="Hyperlink">mutest</Hyperlink>, in the <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Help:DEtools" size="12" style="Hyperlink">DEtools</Hyperlink> package, provides an alternate method for checking the validity of an integrating factor for a differential equation:</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">mutest( mu(x), ode2 );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">The <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Help:DEtools,intfactor" size="12" style="Hyperlink">intfactor</Hyperlink> command, also from the <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Help:DEtools" size="12" style="Hyperlink">DEtools</Hyperlink> package, can be used as a black box to find an integrating factor. An integrating factor for this ODE is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">intfactor( ode2 );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">The solution to the exact form of the original ODE is</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">dsolve( mu(x)*ode2, y(x), [exact], implicit );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">Note that without the optional argument <Font bold="false" executable="false" italic="false" size="12" style="2D Input">implicit</Font> Maple returns the pair of solutions</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">dsolve( mu(x)*ode2, y(x), [exact] );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">The specific solution obtained depends upon the specific initial condition.</Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal">The same solutions are also obtained from either of</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">exactsol( ode2 );</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">dsolve( ode2, y(x), [exact] );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">In terms of first integrals, the original ODE is not exact so does not have a first integral</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">firint( ode2 );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">But, when multiplied by the integrating factor, it has the first integral</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">q := firint( mu(x)*ode2 );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Group><Input><Text-field layout="Normal" style="Normal">which simplifies to the implicit solution found above.</Text-field><Text-field layout="Normal" style="Normal"/></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">simplify( q );</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section></Section><Group><Input><Text-field layout="Normal" style="Normal">[Back to <Hyperlink bold="false" executable="false" family="Times New Roman" hyperlink="true" linktarget="Wks:Lesson00.mw" size="12" style="Hyperlink">ODE Powertool Table of Contents</Hyperlink>]</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field/><Text-field/><Text-field/><Text-field/><Text-field/></Worksheet>