<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Paul's Blog</title>
	<atom:link href="http://paulm0218.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulm0218.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 19 May 2009 15:43:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='paulm0218.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Paul's Blog</title>
		<link>http://paulm0218.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://paulm0218.wordpress.com/osd.xml" title="Paul&#039;s Blog" />
	<atom:link rel='hub' href='http://paulm0218.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Block 6</title>
		<link>http://paulm0218.wordpress.com/2009/05/13/block-6/</link>
		<comments>http://paulm0218.wordpress.com/2009/05/13/block-6/#comments</comments>
		<pubDate>Wed, 13 May 2009 00:08:42 +0000</pubDate>
		<dc:creator>paulm0218</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulm0218.wordpress.com/?p=103</guid>
		<description><![CDATA[After a semester full of discovering new ways to solve differential equations, we have now come to the end. In block 6 we will cover the last method this semester of solving differential equations. We will be taking a look at the laplase transform to linear diff. eq. This method uses a transformation to change the domain of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=103&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#000000;">After a semester full of discovering new ways to solve differential equations, we have now come to the end. In block 6 we will cover the last method this semester of solving differential equations. We will be taking a look at the laplase transform to linear diff. eq. This method uses a transformation to change the domain of the differential equations.  To transform and then convert the problems back and forth a list of identities can be used. Another way is to simply solve the problems using matlab or mathematica.</span></p>
<p><span style="color:#000000;">In this block I will be choosing 6 examples  in which will be completed. 2 first-order equations, 2 second-order equations, and 2 linear systems will be chosen in order to show the use and function of these laplase transforms </span></p>
<p><span style="color:#000000;">laplasesolver.m:</span></p>
<p style="font:12px Courier;margin:0;"><span style="color:#000000;">function [x] = laplasesolver (f,y_final,y_mult)<br />
syms s t<br />
laplace(f,t,s);<br />
b=1/(s+(y_mult))<br />
x=ans+(y_final);<br />
figure<br />
ezplot(x,[-20,20])<br />
final=x*(b)<br />
ilaplace(final,s,t);<br />
a=ans;<br />
figure<br />
ezplot(a,[10,15])<br />
end </span></p>
<p style="font:12px Courier;margin:0;"><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">  FIRST ORDER EQUATION EXAMPLES</span></p>
<p><span style="color:#000000;">1.   $\latex \frac{dy}{dt}+y=3cos(t)$ ,y(0)=-1</span></p>
<p><span style="color:#000000;">&gt;&gt; laplasesolver(3*cos(t),-1,1)</span></p>
<p><span style="color:#000000;">b =<br />
1/(s + 1)</span></p>
<p><span style="color:#000000;">final =<br />
((3*s)/(s^2 + 1) – 1)/(s + 1)</span></p>
<p><span style="color:#000000;">ans =<br />
(3*cos(t))/2 – 5/(2*exp(t)) + (3*sin(t))/2</span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">Using ilaplace to transform the function to the time domanin</span></p>
<p><span style="color:#000000;">$\latex y(t)=7cos(4*t)$ </span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-105" title="612" src="http://paulm0218.files.wordpress.com/2009/05/612.jpg?w=450&#038;h=337" alt="612" width="450" height="337" /></span></p>
<p><span style="color:#000000;"><strong>2.</strong>  $\latex\frac{dy}{dx}-y=e^(3t), y(0)=2 $</span></p>
<p><span style="color:#000000;">entering this into the m file produces:</span></p>
<p><span style="color:#000000;">b =<br />
1/(s – 1)</span></p>
<p><span style="color:#000000;">final =<br />
(1/(s – 3) + 2)/(s – 1)</span></p>
<p><span style="color:#000000;">ans =<br />
exp(3*t)/2 + (3*exp(t))/2</span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">solution graph:</span></p>
<p><span style="color:#000000;"> <img class="alignnone size-full wp-image-108" title="622" src="http://paulm0218.files.wordpress.com/2009/05/622.jpg?w=450&#038;h=337" alt="622" width="450" height="337" /></span></p>
<p><span style="color:#000000;">SECOND ORDER EQUATION EXAMPLES:</span></p>
<p><span style="color:#000000;">1. $\latex \frac{d^2y}{dt^2}+16y=0$ , y(0)=7, y’(0)=0</span></p>
<p><span style="color:#000000;">$\latex L{\frac{d^2y}{dt^2}}=s^2L{y(s)}-7s$</span></p>
<p><span style="color:#000000;">$\latex s^2L{y(s)}-7s+16L{y(s)}=0$</span></p>
<p><span style="color:#000000;">$\latex (s^2+4)L{y(s)}=7s$</span></p>
<p><span style="color:#000000;">$\latex L{y(s)}=\frac{7s}{(s^2+16)}$</span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">Using ilaplace to transform the function yeilds the solution:</span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">$\latex y(t)=7cos(4*t)$</span></p>
<p><span style="color:#000000;">SOLUTION GRAPH:</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-110" title="632" src="http://paulm0218.files.wordpress.com/2009/05/632.jpg?w=450&#038;h=337" alt="632" width="450" height="337" /></span></p>
<p><span style="color:#000000;">2. $\latex \frac{d^2y}{dt^2}+4y=0$ , y(0)=2 , y’(0)=3</span></p>
<p><span style="color:#000000;">$\latex L{\frac{d^2y}{dt^2}}=s^2L{y(s)}-2s-3$</span></p>
<p><span style="color:#000000;">$\latex s^2L{y(s)}-2s-3+4L{y(s)}=0$</span></p>
<p><span style="color:#000000;">$\latex (s^2+4)L{y(s)}=2s+3$</span></p>
<p><span style="color:#000000;">$\latex L{y(s)}=\frac{2s+3}{(s^2+4)}$</span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">the simplified laplace transform yeilds the final solution:</span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">$\latex y(t)=2cos(2*t)+ \frac{3}{2}sin(2*t)$</span></p>
<p><span style="color:#000000;">SOLUTION GRAPH:</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-113" title="642" src="http://paulm0218.files.wordpress.com/2009/05/642.jpg?w=450" alt="642" /></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulm0218.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulm0218.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulm0218.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulm0218.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulm0218.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulm0218.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulm0218.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulm0218.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulm0218.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulm0218.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulm0218.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulm0218.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulm0218.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulm0218.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=103&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://paulm0218.wordpress.com/2009/05/13/block-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9ed2379e6552ee72aa36df395fad23c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulm0218</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/612.jpg" medium="image">
			<media:title type="html">612</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/622.jpg" medium="image">
			<media:title type="html">622</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/632.jpg" medium="image">
			<media:title type="html">632</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/642.jpg" medium="image">
			<media:title type="html">642</media:title>
		</media:content>
	</item>
		<item>
		<title>Block 5</title>
		<link>http://paulm0218.wordpress.com/2009/05/01/block-5/</link>
		<comments>http://paulm0218.wordpress.com/2009/05/01/block-5/#comments</comments>
		<pubDate>Fri, 01 May 2009 10:14:07 +0000</pubDate>
		<dc:creator>paulm0218</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulm0218.wordpress.com/?p=84</guid>
		<description><![CDATA[In Block 5, I will be looking at systems of Differential Equations.  Systems of Differential Equations are linked by multiple variables as opposed to just one like in previous blocks. In order to study and solve complicated systems we need to use more than one dependent variable as well as multiple equations. Problem 1: T(x,y)=(x+y,x) We can seperate this equation in two: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=84&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#000000;">In Block 5, I will be looking at systems of Differential Equations.  Systems of Differential Equations are linked by multiple variables as opposed to just one like in previous blocks. In order to study and solve complicated systems we need to use more than one dependent variable as well as multiple equations.</span></p>
<p><strong><span style="color:#000000;">Problem 1: <em>T(x,y)=(x+y,x)</em></span></strong></p>
<p><span style="color:#000000;">We can seperate this equation in two:</span></p>
<p><strong><em><span style="color:#000000;">dx/dt=x+Y</span></em></strong></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">dx/dt=x</span></em></strong></p>
<p style="text-align:left;"><span style="color:#000000;">The first thing we  need to do is set <strong><em>(x+y,x)=(λx,λy)</em></strong></span></p>
<p style="text-align:left;"><span style="color:#000000;">This simplifies into two separate equations of</span></p>
<p style="text-align:left;"><span style="color:#000000;"><strong><em>x+y = λx</em></strong>                         <strong><em>x = λy</em></strong></span></p>
<p style="text-align:left;"><span style="color:#000000;">In order to solve for the value/s of <strong><em>λ</em></strong> I set the two equations equal to zero</span></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">(1-λ)x+y=0</span></em></strong></p>
<p style="text-align:left;"><em><strong><span style="color:#000000;">xλy=0</span></strong></em></p>
<p style="text-align:left;"><span style="color:#000000;">The next step we used the equation <strong><em>ad-bc=o</em></strong> solve for <strong><em>λ</em></strong> where</span></p>
<p style="text-align:left;"><span style="color:#000000;"><strong><em>a=(1-λ), b=1, c=1 </em></strong>and<strong><em> d=-λ</em></strong></span></p>
<p style="text-align:left;"><span style="color:#000000;">These values are found by setting the two equations equal to<strong><em> ax+by=0</em></strong> and <strong><em>cx+dy = 0</em></strong>.</span></p>
<p style="text-align:left;"><span style="color:#000000;">For this example<strong><em>  we will use the values λ=+.6103</em></strong> and<strong><em> λ=-.6103</em></strong></span></p>
<p style="text-align:left;"><span style="color:#000000;">Finally, plug the final <strong><em>λ</em></strong> value into one of the original equations of</span></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">(1-λ)x+y=0</span></em></strong></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">x-λy=0</span></em></strong></p>
<p style="text-align:left;"><span style="color:#000000;">then we  solve for y to get thesolutions for the equation as follows;</span></p>
<p style="text-align:left;"><span style="color:#000000;">     <strong><em>y=0.618034x</em></strong> and         <strong><em>y=-1.618034x</em></strong></span></p>
<p style="text-align:left;"><span style="color:#000000;">Here is the code that I wrote to graph the solutions along with the vector field:</span></p>
<p><span style="color:#000000;">[x,y]=meshgrid(-1:1/10:1,-1:1/10:1);<br />
&gt;&gt; u=2*x+y;<br />
&gt;&gt; v=x+y;<br />
&gt;&gt; w=sqrt(u.^2+v.^2);<br />
&gt;&gt; quiver(x,y,u./w,v./w,.5,’.’)<br />
&gt;&gt; hold on<br />
&gt;&gt; f=@(x).618034*x;<br />
&gt;&gt; fplot(f,[-1,1],’r’)<br />
&gt;&gt; hold on<br />
&gt;&gt; f=@(x)-1.61803*x;<br />
&gt;&gt; fplot(f,[-1,1],’g’)<br />
&gt;&gt; hold off<br />
&gt;&gt; hold off</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-88" title="51" src="http://paulm0218.files.wordpress.com/2009/05/511.jpg?w=450&#038;h=346" alt="51" width="450" height="346" /></span></p>
<p><span style="color:#000000;">Example 2: </span></p>
<p><strong><span style="color:#000000;">dx/dt=x+3y</span></strong></p>
<p><strong><span style="color:#000000;">dy/dt=y</span></strong></p>
<p><strong><em><span style="color:#000000;">λ-1</span></em></strong></p>
<p><span style="color:#000000;">Solution: Red: y=0</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-89" title="52" src="http://paulm0218.files.wordpress.com/2009/05/52.jpg?w=450&#038;h=347" alt="52" width="450" height="347" /></span></p>
<p><span style="color:#000000;">Example 3:</span></p>
<p style="text-align:left;"><em><strong><span style="color:#000000;">dx/dt=2x+5y</span></strong></em></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">dy/dt=x-2y</span></em></strong></p>
<p><span style="color:#000000;"><strong><em>λ=-0.23606 and </em></strong><strong><em>λ=4.23607</em></strong></span></p>
<p style="text-align:left;"><span style="color:#000000;">Soutions:</span></p>
<p style="text-align:left;"><span style="color:#000000;">Red: y= -1         Green: y=0.2</span></p>
<p style="text-align:left;"><span style="color:#000000;"><img class="alignnone size-full wp-image-90" title="53" src="http://paulm0218.files.wordpress.com/2009/05/53.jpg?w=450&#038;h=341" alt="53" width="450" height="341" /></span></p>
<p style="text-align:left;"><span style="color:#000000;">Example 4:</span></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">dx/dt=-4x-3y</span></em></strong></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">dy/dt=-2x+4y</span></em></strong></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">λ=√22</span></em></strong></p>
<p style="text-align:left;"><span style="color:#000000;">Solution: Red: y= -2.8968x</span></p>
<p style="text-align:left;"><span style="color:#000000;"><img class="alignnone size-full wp-image-91" title="54" src="http://paulm0218.files.wordpress.com/2009/05/54.jpg?w=450&#038;h=348" alt="54" width="450" height="348" /></span></p>
<p style="text-align:left;"><span style="color:#000000;">Example 5:</span></p>
<p style="text-align:left;"><strong><span style="color:#000000;">dx/dt=2x+2y</span></strong></p>
<p style="text-align:left;"><strong><span style="color:#000000;">dy/dt=2x+y</span></strong></p>
<p style="text-align:left;"><strong><span style="color:#000000;">λ=-0.56155 and λ=3.5616</span></strong></p>
<p style="text-align:left;"><span style="color:#000000;">Solutions:</span></p>
<p style="text-align:left;"><span style="color:#000000;">Green: y= -1.2807x                Red: y= 0.7807x</span></p>
<p style="text-align:left;"><span style="color:#000000;"><img class="alignnone size-full wp-image-92" title="55" src="http://paulm0218.files.wordpress.com/2009/05/55.jpg?w=450&#038;h=347" alt="55" width="450" height="347" /></span></p>
<p style="text-align:left;"><span style="color:#000000;">Example 6:</span></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">dx/dt=2x-2y</span></em></strong></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">dy/dt=2x+y</span></em></strong></p>
<p style="text-align:left;"><strong><em><span style="color:#000000;">λ=(3+√-15)/4 and λ=(3-√-15)/4<br />
<img class="alignnone size-full wp-image-94" title="56" src="http://paulm0218.files.wordpress.com/2009/05/561.jpg?w=450&#038;h=345" alt="56" width="450" height="345" /></span></em></strong></p>
<p style="text-align:left;"><strong><span style="color:#000000;">Solution: non &#8211; real</span></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulm0218.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulm0218.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulm0218.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulm0218.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulm0218.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulm0218.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulm0218.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulm0218.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulm0218.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulm0218.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulm0218.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulm0218.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulm0218.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulm0218.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=84&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://paulm0218.wordpress.com/2009/05/01/block-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9ed2379e6552ee72aa36df395fad23c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulm0218</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/511.jpg" medium="image">
			<media:title type="html">51</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/52.jpg" medium="image">
			<media:title type="html">52</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/53.jpg" medium="image">
			<media:title type="html">53</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/54.jpg" medium="image">
			<media:title type="html">54</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/55.jpg" medium="image">
			<media:title type="html">55</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/05/561.jpg" medium="image">
			<media:title type="html">56</media:title>
		</media:content>
	</item>
		<item>
		<title>Block 4</title>
		<link>http://paulm0218.wordpress.com/2009/04/12/block-4/</link>
		<comments>http://paulm0218.wordpress.com/2009/04/12/block-4/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 18:37:33 +0000</pubDate>
		<dc:creator>paulm0218</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulm0218.wordpress.com/?p=80</guid>
		<description><![CDATA[In this block, I will be choosing a total of six examples from the text, page 76. In these examples, I will carry out the intergrations using the varables seperable method, and comparing my solutions to those given by Mathematicas dsolve method. 1:  4xydx+(x^2+1)dy=0 The first step is to subtract (x^2+1)dy from both sides.  W [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=80&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#000000;">In this block, I will be choosing a total of six examples from the text, page 76. In these examples, I will carry out the intergrations using the varables seperable method, and comparing my solutions to those given by Mathematicas dsolve method.</span></p>
<p><strong><span style="color:#000000;">1:  <em>4xydx+(x^2+1)dy=0 </em></span></strong></p>
<p><span style="color:#000000;">The first step is to subtract<em> <strong>(x^2+1)dy</strong> </em>from both sides.</span></p>
<p><span style="color:#000000;"> W get, <em><strong>4xydx=-(x^2+1)dy</strong>.</em></span></p>
<p><span style="color:#000000;">Next  I divided both sides by <strong><em>y</em></strong> and <strong><em>-(x^2+1),</em></strong></span></p>
<p><span style="color:#000000;">this yields<strong><em> (4xydx)/-(x^2+1))=dy/y.</em></strong></span></p>
<p><span style="color:#000000;">After this, I integrated both sides<strong><em> ∫</em></strong><strong><em>(4xdx)/(-(x^2+1)=∫</em><em>dy/y</em></strong>.</span></p>
<p><span style="color:#000000;">Using the U-Substitution method we get <strong><em>-2ln|(x^2+1)| = ln |y| +C</em></strong>.</span></p>
<p><span style="color:#000000;"> I then rewrite the functions in terms of y by raising both sides to the exponent of <strong><em>e</em></strong>, the <strong><em>ln</em></strong> functions disappear </span></p>
<p><strong><em><span style="color:#000000;">y=e^-2ln(x^2+1)+C</span></em></strong></p>
<p> </p>
<p> </p>
<p><span style="color:#000000;">Simplifying it even further I get <em><strong>y=(1/x^2+1)</strong><strong>^2+C</strong></em><strong><em>=(1/(x^2+1)^2)+C</em></strong></span></p>
<p> </p>
<p><span style="color:#000000;">Now, we can compare our solution to that given by Mathematica using dsolve,</span></p>
<p><strong><span style="color:#000000;">&gt;&gt; dsolve(’Dy = -(4*x*y)/(x^2 + 1)’,’x’)</span></strong></p>
<p><strong><span style="color:#000000;">ans =</span></strong></p>
<p><strong><span style="color:#000000;">C6/(x^2 + 1)^2</span></strong></p>
<p><span style="color:#000000;"><strong></strong></span> </p>
<p><span style="color:#000000;"><strong>2:  4xydx + (x^2 + 1)dy = 0</strong></span></p>
<p> </p>
<p><span style="color:#000000;">Solving by hand:</span></p>
<p><span style="color:#000000;"><strong>4xydx = -(x^2 + 1) dy</strong></span></p>
<p><span style="color:#000000;"><strong>4x / -(x^2+1) dx =1/y dy</strong></span></p>
<p><span style="color:#000000;"><strong>∫ <span style="color:#000000;">4x / -(x^2+1) dx = <span style="color:#000000;">∫1/y dy</span></span></strong></span></p>
<p><span style="color:#000000;"><span style="color:#000000;"><span style="color:#000000;"><strong>4x &#8211; 4ln(x+1) + C = ln(y)</strong></span></span></span><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">Solving With dsolve:</span></p>
<p><span style="color:#000000;"><strong>dsolve(’dy=’4*x*y/(x+1),’x’)</strong></span></p>
<p><span style="color:#000000;"><strong>ans =<br />
 <br />
4*x*y-4*y*log(x+1)+C1</strong></span></p>
<p><strong></strong> </p>
<p><strong>3:  y &#8216; = 10^x + y</strong></p>
<p>Solved by hand:</p>
<p><strong>dy/dx =  (x+y)ln(10)</strong></p>
<p><strong>dy/dx = xln(10) + yln(10)</strong></p>
<p><strong>-ln(10) <span style="color:#000000;">∫ ydy = ln(10)<span style="color:#000000;">∫xdx</span></span></strong></p>
<p><span style="color:#000000;"><span style="color:#000000;"><strong>-ln(10)/2 * y^2 = ln(10)/2 * x^2 + C</strong></span></span></p>
<p>Solved by dsolve:</p>
<p><strong>dsolve(’dy= 10^(x+y)’,’x’)</strong></p>
<p><strong>ans =<br />
 <br />
C1+1/log(10)*10^(x+y)</strong></p>
<p style="text-align:left;"><strong></strong> </p>
<p style="text-align:left;"><strong>4: tan(x)dy+2ydx=0 </strong></p>
<p style="text-align:left;">Solve by Hand:</p>
<p style="text-align:left;"><strong>tan(x)dy=-2ydx</strong> .</p>
<p style="text-align:left;"><strong>dy/-2t=dx/tan(x). </strong></p>
<p style="text-align:left;"><strong>ln|y|=-2ln|sin(x)|</strong></p>
<p style="text-align:left;"><strong>|y|=C/sin^2(x)</strong> </p>
<p style="text-align:left;">Solve by dsolve: </p>
<p style="text-align:left;"><strong>&gt;&gt; dsolve(’Dy/y = -2*cot(x)’,’x’)</strong></p>
<p style="text-align:left;"><strong>ans =</strong></p>
<p style="text-align:left;"><strong>C12/sin(x)^2</strong></p>
<p style="text-align:left;"><strong></strong> </p>
<p><strong>5:  x  dx/dy  + t = 1</strong> </p>
<p>Solved by hand:</p>
<p><strong>xdx = 1- tdt</strong></p>
<p><span style="color:#000000;"><strong>∫ xdx = <span style="color:#000000;"><strong>∫ 1 &#8211; tdt</strong></span></strong></span></p>
<p><span style="color:#000000;"><strong><span style="color:#000000;">x^2/2 = t &#8211; t^2/2 + C</span></strong></span></p>
<p><span style="color:#000000;"><strong><span style="color:#000000;">x^2 = 2t &#8211; t^2 + C</span></strong></span></p>
<p>Solved by dsolve:<br />
<strong>dsolve(’dy=(1-t)/x’,’t’)</strong></p>
<p><strong>ans =<br />
 <br />
1/2*(-t^2+2*t+2*C1*x)/x</strong></p>
<p><strong></strong> </p>
<p><strong>6: y&#8217; = exp(x^2)</strong></p>
<p>Solved by hand:</p>
<p><span style="color:#000000;"><strong>∫dy = <span style="color:#000000;"><strong>∫ e^ (x^2) dx</strong></span></strong></span></p>
<p><span style="color:#000000;"><strong><span style="color:#000000;">xe^(x^2) &#8211; 2x + C</span></strong></span></p>
<p>Solved by dsolve:</p>
<p><strong>dsolve(’dy=exp(x^2)’,’x’)</strong></p>
<p><strong>ans =<br />
 <br />
log(x^2)*x-2*x+C1</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulm0218.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulm0218.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulm0218.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulm0218.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulm0218.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulm0218.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulm0218.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulm0218.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulm0218.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulm0218.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulm0218.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulm0218.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulm0218.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulm0218.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=80&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://paulm0218.wordpress.com/2009/04/12/block-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9ed2379e6552ee72aa36df395fad23c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulm0218</media:title>
		</media:content>
	</item>
		<item>
		<title>THIRD BLOCK</title>
		<link>http://paulm0218.wordpress.com/2009/03/02/third-block/</link>
		<comments>http://paulm0218.wordpress.com/2009/03/02/third-block/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 14:12:01 +0000</pubDate>
		<dc:creator>paulm0218</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulm0218.wordpress.com/?p=59</guid>
		<description><![CDATA[In the third block we will be looking at the three dimensional graphs using both Euler&#8217;s method and the Ode45 method from last block. The lorenz equations are the given examples we will be analyzing with these graphs. The block will conclude with an analysis of the Rossler system of differential equations.  The Lorenz Attractor [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=59&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#000000;">In the third block we will be looking at the three dimensional graphs using both Euler&#8217;s method and the Ode45 method from last block. The lorenz equations are the given examples we will be analyzing with these graphs. The block will conclude with an analysis of the Rossler system of differential equations. </span></p>
<p><span style="color:#000000;">The Lorenz Attractor is made up of three equations, which are</span><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;"><em>dx/dy=</em><em>σ</em><em>(y-x)</em></span></p>
<p><span style="color:#000000;"><em>dx/dt=x(</em><em>ρ</em><em>-x)</em></span></p>
<p><span style="color:#000000;"><span style="color:#000000;"><span style="color:#000000;"><em>dz/dt=xy-</em><em>β</em><em>z</em></span></span></span><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">The first step we need to take before we can get any of our approximations we must modify our m files from previous blocks. We use the following code:</span><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">function[t,y] = eulerpm (f,t_range, y_initial, nstep)</span></p>
<p><span style="color:#000000;">dt = (t_range(2) &#8211; t_range(1)) / nstep;</span></p>
<p><span style="color:#000000;">t = t_range;</span></p>
<p><span style="color:#000000;">y(:,1) = y_initial;</span></p>
<p><span style="color:#000000;">fori = 1 :nstep</span></p>
<p><span style="color:#000000;">t(i+1) = t(i) + dt;</span></p>
<p><span style="color:#000000;">y(:,i+1) = y(i) + dt * feval( f, t(i), y(i) );</span></p>
<p><span style="color:#000000;">plot(t,y)</span></p>
<p><span style="color:#000000;">plot3( y(1,:), y(2,:), y(3,:) )</span></p>
<p><span style="color:#000000;">xlabel(‘t’)</span></p>
<p><span style="color:#000000;">ylabel(‘y’)</span></p>
<p><span style="color:#000000;">end</span></p>
<p><span style="color:#000000;">In order to evaluate the systems of equations we must change the y axis into an array input. The next step is to use the plot3 matlab command. After this the next file that must be changed is the example problem m-file called pmexample.m.</span></p>
<p><span style="color:#000000;"> </span><span style="color:#000000;">functionyprime= pmexample(t,y)</span></p>
<p><span style="color:#000000;">yprime = [10.0* (y(2)-y(1)); y(1)*(28.0-y(3))-y(2);y(1)*y(2)-8*y(3)/3];</span></p>
<p><span style="color:#000000;">end</span></p>
<p><span style="color:#000000;">We must note that these values are default values to ensure that our euler program is running properly. </span></p>
<p><span style="color:#000000;">&gt;&gt; y_init = [rand(),rand(),rand()];</span></p>
<p><span style="color:#000000;">&gt;&gt; [ t, y ] = eulerpm ( ‘pmexample’, [ 0.0, 20.0 ], y_init, 1000 );</span></p>
<p><span style="color:#000000;">The following was graph was yeilded by MATLAB as a result, </span></p>
<p><span style="color:#333300;"><span style="color:#000000;"><img class="alignnone size-full wp-image-61" title="1" src="http://paulm0218.files.wordpress.com/2009/03/1.jpg?w=419&#038;h=314" alt="1" width="419" height="314" /></span></span></p>
<p><span style="color:#333300;"><span style="color:#000000;">As you can see, much like graphs from previous blocks, euler&#8217;s method produces rigid graphs that are not very accurate. Now let us use the Ode45 method and compare the two graphs.</span></span></p>
<p><span style="color:#333300;"><span style="color:#000000;">Our first step is to create two m. files for this method. The first file is so we can evaluate the differential equation, and the second file we create allows us to modify the ode45 program in MATLAB, making life much easier for us.</span></span></p>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;">pmlorenz.m:</span></p>
<p><span style="color:#000000;">functionxdot = pmlorenz(t,x)</span></p>
<p><span style="color:#000000;">xdot = zeros(3,1);</span></p>
<p><span style="color:#000000;">sig = 10.0;</span></p>
<p><span style="color:#000000;">rho = 28.0;</span></p>
<p><span style="color:#000000;">bet = 8.0/3.0;</span></p>
<p><span style="color:#000000;">xdot(1) = sig*(x(2)-x(1));</span></p>
<p><span style="color:#000000;">xdot(2) = rho*x(1)-x(2)-x(1)*x(3);</span></p>
<p><span style="color:#000000;">xdot(3) = x(1)*x(2)-bet*x(3);</span></p>
<p><span style="color:#000000;">pmlorenz2.m:</span></p>
<p><span style="color:#000000;">functionpmlorenz2(time)</span></p>
<p><span style="color:#000000;">[t,x] = ode45(‘pmlorenz’,[0 time],[1;2;3]);</span></p>
<p><span style="color:#000000;">disp(‘press any key to continue ?’)</span></p>
<p><span style="color:#000000;">pause</span></p>
<p><span style="color:#000000;">plot3(x(:,1),x(:,2),x(:,3))</span></p>
<p><span style="color:#000000;">After we enter the lorenz code into the command screan in MATLAB we can see the following lorenz equation graph produced by the ode45 method.</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-64" title="2" src="http://paulm0218.files.wordpress.com/2009/03/2.jpg?w=450&#038;h=337" alt="2" width="450" height="337" /></span></p>
<p><span style="color:#000000;">Much, much better. It is actually difficult to beleive that this is the same as the graph above but believe it so. We can see, just like the previous blocks, the ode45 method of solving these differential equations produces a much smoother, more detailed graph of the function. As you follow through the rest of this block, we will be further proving this conclusion using three more examples. In these examples, I will be using the same m. files as in the problem above with changes only in the rho sigma and beta of each. Because of this, to avoid redundency I will just include the new values of these three.</span></p>
<p><span style="color:#000000;">The first example will use:</span></p>
<p><span style="color:#000000;">Example #2:</span></p>
<p><span style="color:#000000;"><strong>ρ</strong> = 18</span></p>
<p><span style="color:#000000;"><strong>σ</strong> = 10</span></p>
<p><span style="color:#000000;"><strong>β</strong> = 8/3</span></p>
<p><span style="color:#000000;"> </span><span style="color:#000000;">Euler&#8217;s Method Approximation</span></p>
<p><span style="color:#000000;"> </span><span style="color:#000000;"><img class="alignnone size-full wp-image-68" title="4" src="http://paulm0218.files.wordpress.com/2009/03/4.jpg?w=450&#038;h=337" alt="4" width="450" height="337" /></span></p>
<p><span style="color:#000000;">Ode45 Method Approximation</span></p>
<p> </p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-69" title="5" src="http://paulm0218.files.wordpress.com/2009/03/5.jpg?w=450&#038;h=337" alt="5" width="450" height="337" /></span></p>
<p><span style="color:#000000;">Example 3:</span></p>
<p><span style="color:#000000;"><strong>σ</strong> = 10</span></p>
<p><span style="color:#000000;"><strong>β</strong> = 8/3</span></p>
<p><span style="color:#000000;"><strong>ρ</strong> = 8</span></p>
<p><span style="color:#000000;">Euler&#8217;s Method Approximation</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-70" title="euler1" src="http://paulm0218.files.wordpress.com/2009/03/euler1.jpg?w=450&#038;h=337" alt="euler1" width="450" height="337" /></span></p>
<p><span style="color:#000000;">Ode45 Method Approximation</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-72" title="ode11" src="http://paulm0218.files.wordpress.com/2009/03/ode11.jpg?w=450&#038;h=337" alt="ode11" width="450" height="337" /></span></p>
<p><span style="color:#000000;">Now that we have seen a few examples using the lorenz attractor it has become apparent that there is a significant difference between euler&#8217;s method and the ode45 method if solving. Each example shows how much smoother and more accurate the ode45 method is when analyzing lorenz&#8217;s system of equations.</span></p>
<p><span style="color:#000000;">The next step we will be taking is to show that this is not only the case for Lorenz&#8217;s system of equations, but also for Rossler&#8217;s system of equations as well. This will demonstrate that another Ode system of equations that creates an attractor as well as furthering our conclusion that euler&#8217;s method is not nearly as accurate or reliable for our use.</span></p>
<p><span style="color:#000000;">In order to do this, we must take similar steps as creating the lorenz system. We create two m. files, one to create a graph of the attractor and the other to set the variables and equation.</span></p>
<p><span style="color:#000000;">rossler.m:</span></p>
<p><span style="color:#000000;">function xdot = rossler(t,x)</span></p>
<p><span style="color:#000000;">a = 0.2;<br />
b = 0.2;<br />
c = 5.7;</span></p>
<p><span style="color:#000000;">xdot(1) = -x(2)-z;<br />
xdot(2) = x(1)+ax(2);<br />
xdot(3) = b+x(3)*(x(1)-c);</span></p>
<p><span style="color:#000000;">rossler2.m:</span></p>
<p><span style="color:#000000;">function rossler2(time)<br />
[t,x] = ode45(’rossler’,[0 time],[1;2;3]);<br />
disp(’press any key to continue ?’)<br />
pause<br />
plot3(x(:,1),x(:,2),x(:,3))<br />
print -deps rossler.eps</span></p>
<p><span style="color:#000000;">Example 1:</span></p>
<p><span style="color:#000000;">a = 0.2</span></p>
<p><span style="color:#000000;">b = 0.2</span></p>
<p><span style="color:#000000;">c = 5.7</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-75" title="ode21" src="http://paulm0218.files.wordpress.com/2009/03/ode21.jpg?w=450&#038;h=337" alt="ode21" width="450" height="337" /></span></p>
<p><span style="color:#000000;">As you can see by the graph above, this approximation has a different shape as the lorenz examples. This attractor draws the point verticaly away from the xy plane at one point allong its circular path creating a bumb or hill.</span></p>
<p><span style="color:#000000;">Example 2:</span></p>
<p><span style="color:#000000;">a = 0.1</span></p>
<p><span style="color:#000000;">b = 0.1</span></p>
<p><span style="color:#000000;">c = 4</span></p>
<p><span style="color:#000000;"><img class="alignnone size-full wp-image-76" title="ode3" src="http://paulm0218.files.wordpress.com/2009/03/ode3.jpg?w=450&#038;h=337" alt="ode3" width="450" height="337" /></span></p>
<p><span style="color:#000000;">Much like the previous problem, once again we see a similar shape with circular path and an annomoly conatined within.</span></p>
<p><span style="color:#000000;">We conclude with analyzing the roles of the three variables a, b and c.</span></p>
<p><span style="color:#000000;">Variable a is responsible for controling the spot where the annomaly enters the center. The larger the value of a is, the further from the center the path is. Variable a also controls the proximity of each revolution in comparison to the last. When we increase or decrease variable a from the value .2, it creates a swirl effect in the graph that groups the revolutions together in a circular path.</span></p>
<p><span style="color:#000000;">Variable b seems as though it has a direct correlation with the height of the annomoly in the graph. By varying the value of b we can see the anomoly going up or down in height.</span></p>
<p><span style="color:#000000;">Variable c similar to variable, controls the proximity of the revolutions as well.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulm0218.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulm0218.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulm0218.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulm0218.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulm0218.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulm0218.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulm0218.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulm0218.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulm0218.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulm0218.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulm0218.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulm0218.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulm0218.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulm0218.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=59&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://paulm0218.wordpress.com/2009/03/02/third-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9ed2379e6552ee72aa36df395fad23c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulm0218</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/1.jpg" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/2.jpg" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/4.jpg" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/5.jpg" medium="image">
			<media:title type="html">5</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/euler1.jpg" medium="image">
			<media:title type="html">euler1</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/ode11.jpg" medium="image">
			<media:title type="html">ode11</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/ode21.jpg" medium="image">
			<media:title type="html">ode21</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/03/ode3.jpg" medium="image">
			<media:title type="html">ode3</media:title>
		</media:content>
	</item>
		<item>
		<title>block 2</title>
		<link>http://paulm0218.wordpress.com/2009/02/20/block-2/</link>
		<comments>http://paulm0218.wordpress.com/2009/02/20/block-2/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 15:43:03 +0000</pubDate>
		<dc:creator>paulm0218</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulm0218.wordpress.com/?p=19</guid>
		<description><![CDATA[In this block we will use three different methods to solve six differential equations. The first method we will be using is Euler&#8217;s method, just as we did in block 1. The next two methods, the ode45 equation solver and the dsolve function in MATLAB will both be used an compared to Euler&#8217;s method. PROBLEM [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=19&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#000080;">In this block we will use three different methods to solve six differential equations. The first method we will be using is Euler&#8217;s method, just as we did in block 1. The next two methods, the ode45 equation solver and the dsolve function in MATLAB will both be used an compared to Euler&#8217;s method.</span></p>
<p><span style="color:#000080;"><strong>PROBLEM 1. :</strong> dy/dx=x^4*y ; y(1)=1; expression solution $ latex y= \frac {1}{sin(x)+1} $</span></p>
<p><span style="color:#000080;">In these problems, using Euler&#8217;s method, i will be using the MATLAB code that i created in the previous block. The written m file was as follows,</span></p>
<p><span style="color:#000080;">function [x,y] = euler (f,x_range, y_initial, nstep)</span></p>
<p><span style="color:#000080;">dx = (x_range(2) &#8211; x_range(1)) / nstep;</span></p>
<p><span style="color:#000080;">x = 1;</span></p>
<p><span style="color:#000080;">y = y_initial;</span></p>
<p><span style="color:#000080;">for i = 1 :nstep</span></p>
<p><span style="color:#000080;">x(i+1) = x(i) + dx;</span></p>
<p><span style="color:#000080;">y(i+1) = y(i) + dx * feval( f, x(i), y(i) );</span></p>
<p><span style="color:#000080;">plot(x,y)</span></p>
<p><span style="color:#000080;">xlabel(‘x’)</span></p>
<p><span style="color:#000080;">ylabel(‘y’)</span></p>
<p><span style="color:#000080;">end</span></p>
<p><span style="color:#000080;">When i entered the first problem into the code,</span></p>
<p><span style="color:#000080;"><strong>exmplepm.m :</strong></span></p>
<p><span style="color:#000080;">function yprime = pmexmple(x,y)</span></p>
<p><span style="color:#000080;">yprime = (x^4*y)</span></p>
<p><span style="color:#000080;">end</span></p>
<p><span style="color:#000080;">In the command screan, entered</span></p>
<p><span style="color:#000080;">&gt;&gt; eulerpm(&#8216;pmexample&#8217;,[0,1],1,100);</span></p>
<p><span style="color:#000080;">MATLAB then yielded the following graph,</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-23" title="ee2" src="http://paulm0218.files.wordpress.com/2009/02/ee2.jpg?w=450&#038;h=337" alt="ee2" width="450" height="337" /><br />
The next step was to use the ode45 method for the same problem. Since ode45 is already programed in MATLAB all that is necessary to yield a graph the following code in the command screan,</span></p>
<p><span style="color:#000080;">&gt;&gt;ode45(&#8216;pmexample,1,100);</span></p>
<p><span style="color:#000080;">The following graph is created,</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-24" title="ff" src="http://paulm0218.files.wordpress.com/2009/02/ff.jpg?w=450&#038;h=337" alt="ff" width="450" height="337" /></span></p>
<p><span style="color:#000080;">After getting both graphs, in order to get a better comparison, the next step is to overlay the two. We use the following code,</span></p>
<p><span style="color:#000080;">&gt;&gt; eulerpm(&#8216;pmexample&#8217;,[0,1],1,100);</span></p>
<p><span style="color:#000080;">&gt;&gt; hold on</span></p>
<p><span style="color:#000080;">&gt;&gt; [x,y]=ode45(&#8216;pmexample&#8217;,[0,1],1);</span></p>
<p><span style="color:#000080;">&gt;&gt; hold off</span></p>
<p><span style="color:#000080;">the overlay graph:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-25" title="fff" src="http://paulm0218.files.wordpress.com/2009/02/fff.jpg?w=450&#038;h=337" alt="fff" width="450" height="337" /></span></p>
<p><span style="color:#000080;">As you can see, the two graphs were so similar, they overlap each other making it seem as though there is only one equation line. This shows that both methods yielded the same answer to the equation.</span></p>
<p><span style="color:#000080;">The MATLAB solution using the dsolve method which evaluates differential equations used the following code,</span></p>
<p><span style="color:#000080;">dsolve(&#8216;DY=x^4*y&#8217;,'x&#8217;)</span></p>
<p><span style="color:#000080;">the answer = 1/5*x^5y+C1</span></p>
<p><span style="color:#000080;"><strong>PROBLEM 2. : </strong><em>dy/dx = (x^4)*(y)<br />
</em></span></p>
<p><span style="color:#000080;">Using the same MATLAB codes as in the first problem, all that was changed were the codes to fit this problem. The same m files were used in this problem as in the first.</span></p>
<p><span style="color:#000080;">Euler&#8217;s Method produces the following graph:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-37" title="2-euler-x4y" src="http://paulm0218.files.wordpress.com/2009/02/2-euler-x4y.jpg?w=450&#038;h=337" alt="2-euler-x4y" width="450" height="337" /></span></p>
<p><span style="color:#000080;">By using a smaller step size, we can see how inaccurate Euler&#8217;s method is. As you can see, this method uses a series of lines instead of curves to approximate the solution.</span></p>
<p><span style="color:#000080;">The ode45 method, using the same code as problem 1 with a slight change then yields,</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-38" title="2-x4y-ode45" src="http://paulm0218.files.wordpress.com/2009/02/2-x4y-ode45.jpg?w=450&#038;h=337" alt="2-x4y-ode45" width="450" height="337" /></span></p>
<p><span style="color:#000080;">This graph is much more fluid in its curves and more accurate than the first. Now we can look at the over lay of the two graphs,</span></p>
<p><span style="color:#000080;"><strong><img class="alignnone size-full wp-image-40" title="overlay1" src="http://paulm0218.files.wordpress.com/2009/02/overlay1.jpg?w=450&#038;h=337" alt="overlay1" width="450" height="337" /></strong></span></p>
<p><span style="color:#000080;">As we can see, the approximations are close to one another, however they are not equal. The Euler&#8217;s approximation is nice, but not quite as accurate as the ode 45 method.</span></p>
<p><span style="color:#000080;">Our next step is to look at this equation using the dsolve method in MATLAB</span></p>
<p><span style="color:#000080;">dsolve(’DY=Y*X^4&#8242;,’Y(1)=1&#8242;,’X&#8217;)</span></p>
<p><span style="color:#000080;">ans =</span></p>
<p><span style="color:#000080;">exp(X^5/5)/exp(1/5)</span></p>
<p><span style="color:#000080;"><strong>PROBLEM 3. : </strong><span style="font-style:italic;"> dy/dx = x + y ;  y(0) = 0 </span>expression solution <em>y = 1 &#8211; x + e^x</em></span></p>
<p><span style="color:#000080;">Euler&#8217;s Method:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-45" title="asa" src="http://paulm0218.files.wordpress.com/2009/02/asa.jpg?w=450&#038;h=337" alt="asa" width="450" height="337" /></span></p>
<p><span style="color:#000080;">The graph displays the function as a slowly upward sloping curve. The graph looks as though it is a pretty good depiction, however, let&#8217;s take a look at the graph produced by the ode 45 method,</span></p>
<p><span style="color:#000080;">Ode45 Method:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-47" title="asb1" src="http://paulm0218.files.wordpress.com/2009/02/asb1.jpg?w=450&#038;h=337" alt="asb1" width="450" height="337" /></span></p>
<p><span style="color:#000080;">Once again, we see a similar, yet smoother and more accurate graph produced by the ode45 method as opposed to Euler&#8217;s method.</span></p>
<p><span style="color:#000080;">The Overlay Graph:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-48" title="asc" src="http://paulm0218.files.wordpress.com/2009/02/asc.jpg?w=450&#038;h=337" alt="asc" width="450" height="337" /></span></p>
<p><span style="color:#000080;">The two curves of this function are very close to each other, but are not equal to each other. The ode45 method has produced the more accurate graph yet again.</span></p>
<p><span style="color:#000080;">The MATLAB dsolve method of solving this problem has given the following solution,</span></p>
<p><span style="color:#000080;">dsolve(’DY=x+y’,&#8217;x’)</span></p>
<p><span style="color:#000080;">ans =</span></p>
<p><span style="color:#000080;">1/2*x^2+y*x+C1</span></p>
<p><span style="color:#000080;"><strong>PROBLEM 4. : </strong><em>dy/dx = x*y^2 ; y(0)=1</em></span></p>
<p><span style="color:#000080;">Again, by changing the examplepm to fit the equation we can plot the graphs as follows,</span></p>
<p><span style="color:#000080;">Eulers Method:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-42" title="block2s2q1-11" src="http://paulm0218.files.wordpress.com/2009/02/block2s2q1-11.jpg?w=450&#038;h=337" alt="block2s2q1-11" width="450" height="337" /></span></p>
<p><span style="color:#000080;">The graph shows a curve function that looks similar to the curve in problem one. This is because the only difference in the two equations is the exponential power of x. This creates the graph to rise at a steeper pace than the previous curve. The next step is to look at the ode45 method and compare the graphs,</span></p>
<p><span style="color:#000080;">ode45 Method:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-43" title="adsaaa" src="http://paulm0218.files.wordpress.com/2009/02/adsaaa.jpg?w=450&#038;h=337" alt="adsaaa" width="450" height="337" /></span></p>
<p><span style="color:#000080;">The graph is much similar to that of Euler&#8217;s method. In order to get a better visual understanding of the relations between the two, we must overlay the two functions on one graph. As it has been in the previous problems, I believe the ode45 method has produced the more accurate depiction of the equation.</span></p>
<p><span style="color:#000080;">The overlay graph of the two functions looks as follows,</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-44" title="adsaassa" src="http://paulm0218.files.wordpress.com/2009/02/adsaassa.jpg?w=450&#038;h=337" alt="adsaassa" width="450" height="337" /></span></p>
<p><span style="color:#000080;">As you can see, the ode 45 method, just as it has been in the previous problems, produces a more accurate graph of the function. Euler&#8217;s method produces a graph that is very similar but not quite as accurate as the ode45 method.</span></p>
<p><span style="color:#000080;">The dsolve method in MATLAB yields,</span></p>
<p><span style="color:#000080;">dsolve(’DY=x^2*y’,&#8217;x’)</span></p>
<p><span style="color:#000080;">ans =</span></p>
<p><span style="color:#000080;">(y*x^3)/3 + C2</span></p>
<p><span style="color:#000080;"><strong><br />
PROBLEM 5. : </strong><em>dy/dx = e ^ -x ; y(0)=1</em></span></p>
<p><span style="color:#000080;">For this equation, the first method i used to solve the equation was the MATLAB dsolve method, which yielded the following, <em></em></span></p>
<p>dsolve(’DY=exp(-x)’,&#8217;x’)</p>
<p>ans =</p>
<p>-exp(-x)+C1</p>
<p><span style="color:#000080;">The next step was to change the Euler&#8217;s method equation to fit the problem, after which, we can see the graph of the function as follows,</span></p>
<p><span style="color:#000080;">Euler&#8217;s Method:<br />
</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-50" title="ada" src="http://paulm0218.files.wordpress.com/2009/02/ada.jpg?w=450&#038;h=337" alt="ada" width="450" height="337" /></span></p>
<p><span style="color:#000080;">As you can see, the curve of the line looks like a reasonable solution to the problem. However, our next step is to use the ode45 method once again, and then compare the two graphical solutions.</span></p>
<p><span style="color:#000080;">Ode45 Method:</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-51" title="adb" src="http://paulm0218.files.wordpress.com/2009/02/adb.jpg?w=450&#038;h=337" alt="adb" width="450" height="337" /></span></p>
<p><span style="color:#000080;">This graph looks pretty similar to that of Euler&#8217;s method, but when we overlay them for a closer look, </span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-52" title="adc" src="http://paulm0218.files.wordpress.com/2009/02/adc.jpg?w=450&#038;h=337" alt="adc" width="450" height="337" /></span></p>
<p><span style="color:#000080;">We can see that while the curves are very close in this particular problem, as we have found throughout this block, the ode45 method has once again produced the smoother, more accurate solution curve</span></p>
<p><span style="color:#000080;"><strong>PROBLEM 6. : </strong><em>dy/dx = x^3 * y &#8211; x^2 * y^2 ; y(-1) = 1</em></span></p>
<p><span style="color:#000080;">When we take a look at Euler&#8217;s method for this problem, the graph yielded is,</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-54" title="af1" src="http://paulm0218.files.wordpress.com/2009/02/af1.jpg?w=450&#038;h=337" alt="af1" width="450" height="337" /></span></p>
<p><span style="color:#000080;">As you can see, the Euler&#8217;s method has produced a very jagged graph of this problem. The next step we took the ode45 method and graphed the equation which produced a much better graph. I skipped right to overlaying them and they look as follows,</span></p>
<p><span style="color:#000080;"><img class="alignnone size-full wp-image-56" title="ag" src="http://paulm0218.files.wordpress.com/2009/02/ag.jpg?w=450&#038;h=337" alt="ag" width="450" height="337" /></span></p>
<p><span style="color:#000080;">The ode45 method has produced the much smoother graph of the line once again which leads us to the conclusion of this block. As you can see throughout the problems above, the euler method is not a very accurate way t solve problems. The ode45 method or Runge-Kutta method is a much more smooth and accurate depiction of the problems. <br />
</span></p>
<p><span style="color:#000080;"><br />
</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulm0218.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulm0218.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulm0218.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulm0218.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulm0218.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulm0218.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulm0218.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulm0218.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulm0218.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulm0218.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulm0218.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulm0218.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulm0218.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulm0218.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=19&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://paulm0218.wordpress.com/2009/02/20/block-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9ed2379e6552ee72aa36df395fad23c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulm0218</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/ee2.jpg" medium="image">
			<media:title type="html">ee2</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/ff.jpg" medium="image">
			<media:title type="html">ff</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/fff.jpg" medium="image">
			<media:title type="html">fff</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/2-euler-x4y.jpg" medium="image">
			<media:title type="html">2-euler-x4y</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/2-x4y-ode45.jpg" medium="image">
			<media:title type="html">2-x4y-ode45</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/overlay1.jpg" medium="image">
			<media:title type="html">overlay1</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/asa.jpg" medium="image">
			<media:title type="html">asa</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/asb1.jpg" medium="image">
			<media:title type="html">asb1</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/asc.jpg" medium="image">
			<media:title type="html">asc</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/block2s2q1-11.jpg" medium="image">
			<media:title type="html">block2s2q1-11</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/adsaaa.jpg" medium="image">
			<media:title type="html">adsaaa</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/adsaassa.jpg" medium="image">
			<media:title type="html">adsaassa</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/ada.jpg" medium="image">
			<media:title type="html">ada</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/adb.jpg" medium="image">
			<media:title type="html">adb</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/adc.jpg" medium="image">
			<media:title type="html">adc</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/af1.jpg" medium="image">
			<media:title type="html">af1</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/02/ag.jpg" medium="image">
			<media:title type="html">ag</media:title>
		</media:content>
	</item>
		<item>
		<title>First Block</title>
		<link>http://paulm0218.wordpress.com/2009/01/28/first-block/</link>
		<comments>http://paulm0218.wordpress.com/2009/01/28/first-block/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 05:53:42 +0000</pubDate>
		<dc:creator>paulm0218</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[In my first post there will be two problems analyzed, one from the text dy/dx = xy (#17) and the given problem dy/dx = y^2 + t . The first thing I will do is plot a direction field for the first differential equation using MATLAB. Using the text, on page 85, the code used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=1&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my first post there will be two problems analyzed, one from the text <em><strong>dy/dx = xy</strong></em> (#17) and the given problem <strong><em>dy/dx = y^2 + t</em></strong> .</p>
<p>The first thing I will do is plot a direction field for the first differential equation using MATLAB. Using the text, on page 85, the code used to create the direction feild in MATLAB is the following,</p>
<p>[X,Y]= meshgrid(-2*pi:.25:2*pi,-2*pi:.25:2*pi);</p>
<p>DY=X.*Y</p>
<p>DX=ones(size(DY));</p>
<p>DW=sqrt(DX.^2 +DY.^2);</p>
<p>quiver(X,Y,DX./DW,DY./DW,.33,<span>&#8216;.&#8217;</span>);</p>
<p>xlabel(<span>&#8216;x&#8217;</span>);</p>
<p>ylabel(<span>&#8216;y&#8217;</span>);</p>
<p>The direction field I got for this equation is as follows,</p>
<p><img class="alignnone size-full wp-image-4" title="euler1" src="http://paulm0218.files.wordpress.com/2009/01/euler1.jpg?w=450&#038;h=393" alt="euler1" width="450" height="393" /></p>
<p>In order to attain the euler approximation for this equation, I used the following MATLAB code as it was stated in the text.</p>
<p>function [xout,yout]=euler(fname,xvals,y0,h)<br />
x0=xvals(1);xf=xvals(2);<br />
xn=x0;<br />
yn=y0;<br />
xout=xn;<br />
yout=yn;<br />
steps=(xf-x0)/h;<br />
for j=1:steps<br />
fn=feval(fname,xn,yn);<br />
xn=xn+h;<br />
yn=yn+h*fn;<br />
xout=[xout;xn];<br />
yout=[yout;yn];<br />
end</p>
<p>The euler approximation that MATLAB created is as follows,</p>
<p><img class="alignnone size-full wp-image-12" title="euler17" src="http://paulm0218.files.wordpress.com/2009/01/euler17.jpeg?w=450&#038;h=340" alt="euler17" width="450" height="340" /></p>
<p>The next step was to plot the euler method over the directional feild, which created the follwing graph,</p>
<p><img class="alignnone size-full wp-image-7" title="prob17final" src="http://paulm0218.files.wordpress.com/2009/01/prob17final.jpeg?w=450&#038;h=344" alt="prob17final" width="450" height="344" /></p>
<p>As you can see, the euler curve follows the directional feild lines pretty closely.   We can notice the directional feild lines are actually tangential to the solution curve created using the euler method. This tells us that the graph produced is a viable solution to this equation.</p>
<p> </p>
<p>After completing the first differential equation, the same steps were taken for the second differential equation. The MATLAB code for the directional feild for dy/dx = y^2 + t is the same as the last equation, as follows,</p>
<div><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">[T,Y]= meshgrid(-2*pi:.25:2*pi,-2*pi:.25:2*pi);</span></span></div>
<p><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">DY=Y.^2+T</span></span></p>
<p>DT=ones(size(DY));</p>
<p>DW=sqrt(DT.^2 +DY.^2);</p>
<div><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">quiver(T,Y,DT./DW,DY./DW,.33,<span style="font-size:x-small;color:#a020f0;font-family:Courier New;"><span style="font-size:x-small;color:#a020f0;font-family:Courier New;"><span style="font-size:x-small;color:#a020f0;font-family:Courier New;">‘.’</span></span></span><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">);</span></span></span></span></div>
<div><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">xlabel(</span></span></span></span><span style="font-size:x-small;color:#a020f0;font-family:Courier New;"><span style="font-size:x-small;color:#a020f0;font-family:Courier New;"><span style="font-size:x-small;color:#a020f0;font-family:Courier New;">‘x’</span></span></span><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">);</span></span></div>
<div><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">ylabel(</span></span></span></span><span style="font-size:x-small;color:#a020f0;font-family:Courier New;"><span style="font-size:x-small;color:#a020f0;font-family:Courier New;"><span style="font-size:x-small;color:#a020f0;font-family:Courier New;">‘y’</span></span></span><span style="font-size:x-small;font-family:Courier New;"><span style="font-size:x-small;font-family:Courier New;">);</span></span></div>
<p><img class="alignnone size-full wp-image-11" title="secondproblemgraph" src="http://paulm0218.files.wordpress.com/2009/01/secondproblemgraph.jpeg?w=450&#038;h=343" alt="secondproblemgraph" width="450" height="343" /></p>
<p>After getting the directional feild for this equation, I used the same general equation for the Euler method as the previous problems. Some changes in the euation were necessary to yeild the graph below.</p>
<p><img class="alignnone size-full wp-image-8" title="euler-correct1" src="http://paulm0218.files.wordpress.com/2009/01/euler-correct1.jpeg?w=450&#038;h=341" alt="euler-correct1" width="450" height="341" /></p>
<p>As done in the previous problem, the directional feild and euler method were plotted together.</p>
<p><img class="alignnone size-full wp-image-10" title="euler-final" src="http://paulm0218.files.wordpress.com/2009/01/euler-final.jpeg?w=450&#038;h=346" alt="euler-final" width="450" height="346" /></p>
<p>As you can see the relationship between the two, we can notice that once again the directional feild lines are tangential to the curve created using the Euler method. Because of this, we can conclude that this is another successful solution to the given differential euqation.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulm0218.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulm0218.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulm0218.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulm0218.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulm0218.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulm0218.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulm0218.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulm0218.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulm0218.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulm0218.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulm0218.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulm0218.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulm0218.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulm0218.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulm0218.wordpress.com&amp;blog=6350838&amp;post=1&amp;subd=paulm0218&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://paulm0218.wordpress.com/2009/01/28/first-block/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9ed2379e6552ee72aa36df395fad23c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulm0218</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/01/euler1.jpg" medium="image">
			<media:title type="html">euler1</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/01/euler17.jpeg" medium="image">
			<media:title type="html">euler17</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/01/prob17final.jpeg" medium="image">
			<media:title type="html">prob17final</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/01/secondproblemgraph.jpeg" medium="image">
			<media:title type="html">secondproblemgraph</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/01/euler-correct1.jpeg" medium="image">
			<media:title type="html">euler-correct1</media:title>
		</media:content>

		<media:content url="http://paulm0218.files.wordpress.com/2009/01/euler-final.jpeg" medium="image">
			<media:title type="html">euler-final</media:title>
		</media:content>
	</item>
	</channel>
</rss>
