<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="0"/><View-Properties><Zoom percentage="150"/></View-Properties><Styles><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 name="Normal"/><Font background="[0,0,0]" bold="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Text" opaque="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="Heading 1" readonly="false" size="18" underline="false"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input"/><Font background="[0,0,0]" family="Times New Roman" name="Page Number" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math" underline="false"/></Styles><Page-Numbers enabled="false" first-number="1" first-numbered-page="1" horizontal-location="right" style="Page Number" vertical-location="bottom"/><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">An example of solving  differential equations and graphing their solutions.</Text-field></Title><Group><Input><Text-field layout="Normal" style="Text">The following two commands load necessary packages. The colon instead of a semi-colon suppresses the output.</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">with(DEtools):with(plots):</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Define your equation:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">eq:=diff(y(t),t)=t^2;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Find the general solution:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dsolve(eq,y(t));</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Define initial conditions:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">init:=y(1)=1;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Find the particular solution:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">dsolve({eq,init},y(t));</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">You can solve an equation numerically rather than analytically. </Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">solut:=dsolve({eq,init},y(t),numeric);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">The output you have just seen says that a procedure was created that can evaluate the solution you are looking for at any point you need. Try it:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">solut(1);solut(3);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">This is how you can draw the direction field that corresponds to your equation:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">DEplot(eq,y(t),t=-3..3,y=-3..3);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">If you want to see a specific integral curve (graph of a solution), incorporate the initial condition:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">DEplot(eq,y(t),t=-3..3,[[init]],y=-3..3,linecolor=black);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">or several initial conditions:</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">DEplot(eq,y(t),t=-3..3,[[y(1)=1],[y(2)=0]],y=-3..3<Font opaque="false">,linecolor=black</Font>);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field/></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Here you can play with explicit and implicit differentiations. Notice also the effects of a different syntax.</Text-field></Title><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">diff(sin(x),x);</Text-field></Input></Group><Group><Input><Text-field alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" prompt="&gt; " rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" size="12" underline="false">implicitdiff(x-sin(x*y)=1,y,x);</Font></Text-field></Input></Group><Group><Input><Text-field alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" prompt="&gt; " rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" size="12" underline="false">implicitdiff(x-sin(x*y)=1,y,x):</Font></Text-field></Input></Group><Group><Input><Text-field alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" prompt="&gt; " rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" size="12" underline="false">diff(y(x),x)=%;</Font></Text-field></Input></Group><Group><Input><Text-field alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" prompt="&gt; " rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" size="12" underline="false">implicitdiff(x-sin(x*y)=1,y,x): diff(y(x),x)=%;</Font></Text-field></Input></Group></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">Here you have an example of cheking whether a given function satisfies the equation: </Text-field></Title><Group><Input><Text-field alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" prompt="&gt; " rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" size="12" underline="false">deq:=diff(p(y),y)-p(y)=y^2;</Font></Text-field></Input></Group><Group><Input><Text-field alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" prompt="&gt; " rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" size="12" underline="false">p:=y-&gt;y^3-1;</Font></Text-field></Input></Group><Group><Input><Text-field alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" prompt="&gt; " rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" size="12" underline="false">simplify(deq);</Font></Text-field></Input></Group></Section><Section collapsed="true"><Title><Text-field layout="Heading 1" style="Heading 1">An example on numeric dsolve solution, including using a range, so odeplot defaults to that range: </Text-field></Title><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">de:=D(y)(x) = x*y(x);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">p:= dsolve({D(y)(x) = y(x), y(0)=1},type=numeric, range=-5..2):</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">odeplot(p);</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">An example of solving a problem from the Lab Manual, page 26, pr. 5 c: 
</Text-field></Title><Group><Input><Text-field style="Text"><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="2D Math"> dsolve.  Find  x&gt;0 where the solution has value 1 and evaluate </Font><Equation input-equation="y(pi)" style="2D Math">NiMtSSJ5RzYiNiNJI3BpR0Yl</Equation><Font bold="false" foreground="[0,0,0]" italic="false" size="12" style="2D Math">. </Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">de:=x*diff(y(x),x)+(x+1)*y(x)=x;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">sol:=dsolve({de,y(ln(2))=1},y(x)); </Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">simplify(sol);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">subs(x=Pi,rhs(sol));</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">evalf(%);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">solve(rhs(sol)=1);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group></Section><Section><Text-field/></Section><Text-field/></Worksheet>
