<?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>Josh's Blog</title>
	<atom:link href="http://joshuamoranmth212s09.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshuamoranmth212s09.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sun, 17 May 2009 23:55:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='joshuamoranmth212s09.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Josh's Blog</title>
		<link>http://joshuamoranmth212s09.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://joshuamoranmth212s09.wordpress.com/osd.xml" title="Josh&#039;s Blog" />
	<atom:link rel='hub' href='http://joshuamoranmth212s09.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Sixth Block</title>
		<link>http://joshuamoranmth212s09.wordpress.com/2009/05/17/sixth-block/</link>
		<comments>http://joshuamoranmth212s09.wordpress.com/2009/05/17/sixth-block/#comments</comments>
		<pubDate>Sun, 17 May 2009 19:42:45 +0000</pubDate>
		<dc:creator>jmoran1</dc:creator>
				<category><![CDATA[MTH212]]></category>

		<guid isPermaLink="false">http://joshuamoranmth212s09.wordpress.com/?p=324</guid>
		<description><![CDATA[The Laplace Transform In this block my partner (Mike Bosse) and I will apply the Laplace transform to the solution of linear differential equations involving higher order derivatives. Our specific tasks are to discuss the general solutions of the differential equations. In each case we are going to each plot solution curve for a variety [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=324&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3 style="text-align:center;">The Laplace Transform</h3>
<p style="text-align:left;">In this block my partner (Mike Bosse) and I will apply the Laplace transform to the solution of linear differential equations involving higher order derivatives. Our specific tasks are to discuss the general solutions of the differential equations. In each case we are going to each plot solution curve for a variety of parameters and given initial conditions. The Specific first and second-order linear differential equations for this block are listed below are listed below:</p>
<p>(a) The first two first-order equations on p. 466</p>
<p>(b) Any two second-order equations on p. 466.</p>
<p>(c) Two examples of linear systems from pp. 470-471.</p>
<p>For each we need to find the general solution using Laplace transforms (not by any other method) and plot solutions over a range of t values, for a given initial condition.</p>
<h3>PART A (FIRST ORDER EQUATIONS)</h3>
<p>To begin, we need to describe what needs to be done in order to solve these equations. As you can see on Gary’s page, these are differential equations of the form <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D+%2B+Bx+%3D+C&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt} + Bx = C' title='&#92;frac{dx}{dt} + Bx = C' class='latex' /> where <img src='http://s0.wp.com/latex.php?latex=C%5Cneq0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='C&#92;neq0' title='C&#92;neq0' class='latex' />. A similar approach to the homogeneous case shows us that the Laplace transform <img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%28t%29%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x(t)]' title='&#92;mathscr{L}[x(t)]' class='latex' /> of a solution <img src='http://s0.wp.com/latex.php?latex=x%28t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x(t)' title='x(t)' class='latex' /> must satisfy <img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%28t%29%5D+%3D+%5Cfrac%7Bx%280%29%7D%7BB+%2B+s%7D+%2B+%5Cfrac%7BC%7D%7Bs%28B+%2B+s%29%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x(t)] = &#92;frac{x(0)}{B + s} + &#92;frac{C}{s(B + s)}' title='&#92;mathscr{L}[x(t)] = &#92;frac{x(0)}{B + s} + &#92;frac{C}{s(B + s)}' class='latex' />. Using inverse Laplace transforms we get  <img src='http://s0.wp.com/latex.php?latex=x%28t%29+%3D+%5Cfrac%7BC%7D%7BB%7D+%2B+%5Cfrac%7BAB+-+C%7D%7BB%7De%5E%7B-Bt%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x(t) = &#92;frac{C}{B} + &#92;frac{AB - C}{B}e^{-Bt}' title='x(t) = &#92;frac{C}{B} + &#92;frac{AB - C}{B}e^{-Bt}' class='latex' /> where <img src='http://s0.wp.com/latex.php?latex=A+%3D+x%280%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='A = x(0)' title='A = x(0)' class='latex' />.</p>
<h4>Problem 1</h4>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+-+y+%3D+e%5E%7B3t%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} - y = e^{3t}' title='&#92;frac{dy}{dt} - y = e^{3t}' class='latex' />    <img src='http://s0.wp.com/latex.php?latex=y%280%29+%3D+2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(0) = 2' title='y(0) = 2' class='latex' /></p>
<p>First we need to break down the equation into two sides and take the Laplace of them:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D+%5B+%5Cfrac%7Bdy%7D%7Bdt%7D+-+y+%5D+%3D+%5Cmathcal%7BL%7D+%5Be%5E%7B3t%7D%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L} [ &#92;frac{dy}{dt} - y ] = &#92;mathcal{L} [e^{3t}]' title='&#92;mathcal{L} [ &#92;frac{dy}{dt} - y ] = &#92;mathcal{L} [e^{3t}]' class='latex' /></p>
<p>Looking at this and the table for Laplace’s theorem, we can take apart the right side and plug it in (from the table) to the left side:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bdy%7D%7Bdt%7D%5D+-+%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B1%7D%7Bs+-+3%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{dy}{dt}] - &#92;mathcal{L}[y] = &#92;frac{1}{s - 3}' title='&#92;mathcal{L}[&#92;frac{dy}{dt}] - &#92;mathcal{L}[y] = &#92;frac{1}{s - 3}' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=s%5Cmathcal%7BL%7D%5By%5D+-+y%280%29+%3D+%5Cmathcal%7BL%7D%5By%5D+%2B+%5Cfrac%7B1%7D%7Bs+-+3%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='s&#92;mathcal{L}[y] - y(0) = &#92;mathcal{L}[y] + &#92;frac{1}{s - 3}' title='s&#92;mathcal{L}[y] - y(0) = &#92;mathcal{L}[y] + &#92;frac{1}{s - 3}' class='latex' /> For s &gt; 3</p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%28s+-+1%29%5Cmathcal%7BL%7D%5By%5D+-+2+%3D+%5Cfrac%7B1%7D%7Bs+-+3%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s - 1)&#92;mathcal{L}[y] - 2 = &#92;frac{1}{s - 3}' title='(s - 1)&#92;mathcal{L}[y] - 2 = &#92;frac{1}{s - 3}' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B%5Cfrac%7B1%7D%7Bs-3%7D-2%7D%7Bs+-+1%7D+%3D+%5Cfrac%7B1%7D%7B%28s+-+3%29%2A%28s+-+1%29%7D+%2B+%5Cfrac%7B2%7D%7Bs+-+1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[y] = &#92;frac{&#92;frac{1}{s-3}-2}{s - 1} = &#92;frac{1}{(s - 3)*(s - 1)} + &#92;frac{2}{s - 1}' title='&#92;mathcal{L}[y] = &#92;frac{&#92;frac{1}{s-3}-2}{s - 1} = &#92;frac{1}{(s - 3)*(s - 1)} + &#92;frac{2}{s - 1}' class='latex' /></p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">syms s t;<br />
ilaplace(1/((s-3)*(s-1))+2/(s-1), s,t);</span></address>
<address><span style="color:#ffff00;">ans = 2*exp(t)+exp(2*t)*sinh(t)</span></address>
<p>________________________________________________________________________________________</p>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=y%28t%29%3D2e%5Et%2Be%5E%7B2t%7Dsinh%28t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(t)=2e^t+e^{2t}sinh(t)' title='y(t)=2e^t+e^{2t}sinh(t)' class='latex' /></p>
<p>Now we are going to plot this equation by using EZPLOT function in MATLAB:</p>
<p>________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ezplot(2*exp(x)+exp(2*x)*sinh(x)&#8217;)</span></address>
<p>________________________________________________________________________________________</p>
<p>As a result from the following command we get:</p>
<p><img class="aligncenter size-full wp-image-329" title="1_pg_466" src="http://joshuamoranmth212s09.files.wordpress.com/2009/05/1_pg_466.jpg?w=450&#038;h=337" alt="1_pg_466" width="450" height="337" /></p>
<p>For this plot, x is equal to t. From this plot you can see that y increases at a rapid rate once t is greater than 4.</p>
<h4>Problem 2</h4>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%2B+y+%3D+3%2Acos%28t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} + y = 3*cos(t)' title='&#92;frac{dy}{dt} + y = 3*cos(t)' class='latex' />   <img src='http://s0.wp.com/latex.php?latex=y%280%29+%3D+-1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(0) = -1' title='y(0) = -1' class='latex' /></p>
<p>First we need to break down the equation into two sides and take the Laplace of them:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bdy%7D%7Bdt%7D+%2B+y%5D+%3D+%5Cmathcal%7BL%7D%5B3cos%28t%29%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{dy}{dt} + y] = &#92;mathcal{L}[3cos(t)]' title='&#92;mathcal{L}[&#92;frac{dy}{dt} + y] = &#92;mathcal{L}[3cos(t)]' class='latex' /></p>
<p>Looking at this and the table for Laplace’s theorem, we can take apart the right side and plug it in (from the table) to the left side:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bdy%7D%7Bdt%7D%5D+%2B+%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B3s%7D%7Bs%5E2+%2B+1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{dy}{dt}] + &#92;mathcal{L}[y] = &#92;frac{3s}{s^2 + 1}' title='&#92;mathcal{L}[&#92;frac{dy}{dt}] + &#92;mathcal{L}[y] = &#92;frac{3s}{s^2 + 1}' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=s%5Cmathcal%7BL%7D%5By%5D+-+y%280%29+%2B+%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B3s%7D%7Bs%5E2+%2B+1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='s&#92;mathcal{L}[y] - y(0) + &#92;mathcal{L}[y] = &#92;frac{3s}{s^2 + 1}' title='s&#92;mathcal{L}[y] - y(0) + &#92;mathcal{L}[y] = &#92;frac{3s}{s^2 + 1}' class='latex' /> For all s</p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%28s+%2B+1%29%5Cmathcal%7BL%7D%5By%5D+%2B+1+%3D+%5Cfrac%7B3s%7D%7Bs%5E2+%2B+1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s + 1)&#92;mathcal{L}[y] + 1 = &#92;frac{3s}{s^2 + 1}' title='(s + 1)&#92;mathcal{L}[y] + 1 = &#92;frac{3s}{s^2 + 1}' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B3s%7D%7B%28s%5E2+%2B+1%29%28s+%2B+1%29%7D+-+%5Cfrac%7B1%7D%7Bs+%2B+1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[y] = &#92;frac{3s}{(s^2 + 1)(s + 1)} - &#92;frac{1}{s + 1}' title='&#92;mathcal{L}[y] = &#92;frac{3s}{(s^2 + 1)(s + 1)} - &#92;frac{1}{s + 1}' class='latex' /></p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">syms s t;<br />
ilaplace(3*s/((s^2+1)*(s+1))-1/(s+1), s,t);</span></address>
<address><span style="color:#ffff00;">ans = -5/2exp(-t) +3/2*cos(t) +3/2*sin(t)</span></address>
<p>________________________________________________________________________________________</p>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=y%28t%29%3D%5Cfrac%7B-5%7D%7B2%7De%5E%7B-t%7D%2B%5Cfrac%7B3%7D%7B2%7Dcos%28t%29%2B%5Cfrac%7B3%7D%7B2%7Dsin%28t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(t)=&#92;frac{-5}{2}e^{-t}+&#92;frac{3}{2}cos(t)+&#92;frac{3}{2}sin(t)' title='y(t)=&#92;frac{-5}{2}e^{-t}+&#92;frac{3}{2}cos(t)+&#92;frac{3}{2}sin(t)' class='latex' /></p>
<p>Now we are going to plot this equation by using EZPLOT function in MATLAB:</p>
<p>________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ezplot(</span><span style="color:#ffff00;">&#8216;-5/2exp(-x) +3/2*cos(x) +3/2*sin(x)</span><span style="color:#ffff00;">’,-5,5)</span></address>
<p>________________________________________________________________________________________</p>
<p>As a result from the following command we get:</p>
<p><img class="aligncenter size-full wp-image-336" title="problem2" src="http://joshuamoranmth212s09.files.wordpress.com/2009/05/problem21.jpg?w=450&#038;h=337" alt="problem2" width="450" height="337" /><br />
For this plot, x is equal to t. From this plot you can see that y decreases exponentially as t becomes more neagative.</p>
<h3>PART A (SECOND ORDER EQUATIONS)</h3>
<p>To begin, we need to describe second-order differential equations which is an algebraic expression( $latex\mathscr{L}[f''(t)]=s^2\mathscr{L}[f(t)]-sf(0)-f&#8217;(0)$ ), in which we solve for <img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5Bf%28t%29%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[f(t)]' title='&#92;mathcal{L}[f(t)]' class='latex' />. We then apply the inverse Laplace transform as before to find the solution of the linear differential equation, but before this happens we need to perfom the second order differential equation. Here are the two problems that we chose to work on below.</p>
<h4>Problem 1</h4>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bd%5E2y%7D%7Bdt%5E2%7D+%2B+4y+%3D+0+%2C+y%280%29+%3D+2+%2C+y%27%280%29+%3D+3&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{d^2y}{dt^2} + 4y = 0 , y(0) = 2 , y&#039;(0) = 3' title='&#92;frac{d^2y}{dt^2} + 4y = 0 , y(0) = 2 , y&#039;(0) = 3' class='latex' /></p>
<p>First we need to break down the equation into two sides and take the Laplace of them:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bd%5E2y%7D%7Bdt%5E2%7D+%2B+4y%5D+%3D+%5Cmathcal%7BL%7D%5B0%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{d^2y}{dt^2} + 4y] = &#92;mathcal{L}[0]' title='&#92;mathcal{L}[&#92;frac{d^2y}{dt^2} + 4y] = &#92;mathcal{L}[0]' class='latex' /></p>
<p>Looking at this and the table for Laplace’s theorem, we can take apart the right side and plug it in (from the table) to the left side:</p>
<p><img src='http://s0.wp.com/latex.php?latex=s%5E2%5Cmathcal%7BL%7D%5By%5D+%2B+sy%280%29+-+y%27%280%29+%2B+4%5Cmathcal%7BL%7D%5By%5D+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='s^2&#92;mathcal{L}[y] + sy(0) - y&#039;(0) + 4&#92;mathcal{L}[y] = 0' title='s^2&#92;mathcal{L}[y] + sy(0) - y&#039;(0) + 4&#92;mathcal{L}[y] = 0' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%28s%5E2+%2B+4%29%5Cmathcal%7BL%7D%5By%5D+-+2s+-+3+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s^2 + 4)&#92;mathcal{L}[y] - 2s - 3 = 0' title='(s^2 + 4)&#92;mathcal{L}[y] - 2s - 3 = 0' class='latex' /></p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B2s+-+3%7D%7Bs%5E2+%2B+4%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[y] = &#92;frac{2s - 3}{s^2 + 4}' title='&#92;mathcal{L}[y] = &#92;frac{2s - 3}{s^2 + 4}' class='latex' /></p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">syms s t;<br />
ilaplace((2*s+3)/(s^2+4), s,t); </span></address>
<address><span style="color:#ffff00;">ans = 2*cos(2*t)+3/2*sin(2*t)</span></address>
<address>________________________________________________________________________________________</address>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=y%28t%29%3D2cos%282t%29%2B%5Cfrac%7B3%7D%7B2%7Dsin%282t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(t)=2cos(2t)+&#92;frac{3}{2}sin(2t)' title='y(t)=2cos(2t)+&#92;frac{3}{2}sin(2t)' class='latex' /></p>
<p>Now we are going to plot this equation by using EZPLOT function in MATLAB:</p>
<p>________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ezplot(</span><span style="color:#ffff00;">&#8217;2*cos(2*x)+3/2*sin(2*x)</span><span style="color:#ffff00;">’,-5,5)</span></address>
<p>________________________________________________________________________________________</p>
<p>As a result from the following command we get:</p>
<p><img class="aligncenter size-full wp-image-338" title="problem3" src="http://joshuamoranmth212s09.files.wordpress.com/2009/05/problem31.jpg?w=450&#038;h=337" alt="problem3" width="450" height="337" /><br />
For this plot, x is equal to t. From this plot you can see that y is sinusoidal where the maximum seems to be 5/2 and minimum value as -5/2.</p>
<h4>Problem 2</h4>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bd%5E2y%7D%7Bdt%5E2%7D+%2B+16y+%3D+0%2C+y%280%29+%3D+7%2C+y%27%280%29+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{d^2y}{dt^2} + 16y = 0, y(0) = 7, y&#039;(0) = 0' title='&#92;frac{d^2y}{dt^2} + 16y = 0, y(0) = 7, y&#039;(0) = 0' class='latex' /></p>
<p>First we need to break down the equation into two sides and take the Laplace of them:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bd%5E2y%7D%7Bdt%5E2%7D+%2B+16y%5D+%3D+%5Cmathcal%7BL%7D%5B0%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{d^2y}{dt^2} + 16y] = &#92;mathcal{L}[0]' title='&#92;mathcal{L}[&#92;frac{d^2y}{dt^2} + 16y] = &#92;mathcal{L}[0]' class='latex' /></p>
<p>Looking at this and the table for Laplace’s theorem, we can take apart the right side and plug it in (from the table) to the left side:</p>
<p><img src='http://s0.wp.com/latex.php?latex=s%5E2%5Cmathcal%7BL%7D%5By%5D+%2B+sy%280%29+-+y%27%280%29+%2B+16%5Cmathcal%7BL%7D%5By%5D+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='s^2&#92;mathcal{L}[y] + sy(0) - y&#039;(0) + 16&#92;mathcal{L}[y] = 0' title='s^2&#92;mathcal{L}[y] + sy(0) - y&#039;(0) + 16&#92;mathcal{L}[y] = 0' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%28s%5E2+%2B+16%29%5Cmathcal%7BL%7D%5By%5D+-+7s+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s^2 + 16)&#92;mathcal{L}[y] - 7s = 0' title='(s^2 + 16)&#92;mathcal{L}[y] - 7s = 0' class='latex' /></p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B7s%7D%7Bs%5E2+%2B+16%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[y] = &#92;frac{7s}{s^2 + 16}' title='&#92;mathcal{L}[y] = &#92;frac{7s}{s^2 + 16}' class='latex' /></p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">syms s t;<br />
ilaplace(7*s/(s^2+16), s,t);</span></address>
<address><span style="color:#ffff00;">ans = 7*cos(4*t)</span></address>
<p>________________________________________________________________________________________</p>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=y%28t%29%3D7cos%284t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(t)=7cos(4t)' title='y(t)=7cos(4t)' class='latex' /></p>
<p>Now we are going to plot this equation by using EZPLOT function in MATLAB:</p>
<p>________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ezplot(</span><span style="color:#ffff00;">&#8217;7*cos(4*x)</span><span style="color:#ffff00;">’,-3,3)</span></address>
<p>________________________________________________________________________________________</p>
<p>As a result from the following command we get:</p>
<p><img class="aligncenter size-full wp-image-341" title="problem4" src="http://joshuamoranmth212s09.files.wordpress.com/2009/05/problem4.jpg?w=450&#038;h=337" alt="problem4" width="450" height="337" />For this plot, x is equal to t. From this plot you can see that y is a cosine wave with the maximum value equal to 7 and a minimum value equal to -7.</p>
<h3>PART C (LINEAR SYSTEMS)</h3>
<p>To begin, we need to describe what needs to be done for Linear Systems. For Linear systems two algebraic equations are solved for <img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x]' title='&#92;mathscr{L}[x]' class='latex' /> or <img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5By%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[y]' title='&#92;mathscr{L}[y]' class='latex' />. This gives the solution as a system of x(t) and y(t).</p>
<h4>Problem 1</h4>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D+%2B+y+%3D+3e%5E%7B2t%7D%2C+x%280%29+%3D+2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt} + y = 3e^{2t}, x(0) = 2' title='&#92;frac{dx}{dt} + y = 3e^{2t}, x(0) = 2' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%2B+x+%3D+0%2C+y%280%29+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} + x = 0, y(0) = 0' title='&#92;frac{dy}{dt} + x = 0, y(0) = 0' class='latex' /></p>
<p>If we divide the two into two components x and y so we can decipher them and then reconnect. First lets start our same process with the y(t) function first:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%2B+x+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} + x = 0' title='&#92;frac{dy}{dt} + x = 0' class='latex' /></p>
<p>We need to break down the equation into two sides and take the Laplace of them:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bdy%7D%7Bdt%7D%5D+%2B+%5Cmathcal%7BL%7D%5Bx%5D+%3D+%5Cmathcal%7BL%7D%5B0%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{dy}{dt}] + &#92;mathcal{L}[x] = &#92;mathcal{L}[0]' title='&#92;mathcal{L}[&#92;frac{dy}{dt}] + &#92;mathcal{L}[x] = &#92;mathcal{L}[0]' class='latex' /></p>
<p>Looking at this and the table for Laplace’s theorem, we can take apart the right side and plug it in (from the table) to the left side:</p>
<p><img src='http://s0.wp.com/latex.php?latex=s%5Cmathcal%7BL%7D%5By%5D+-+y%280%29+%2B+%5Cmathcal%7BL%7D%5Bx%5D+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='s&#92;mathcal{L}[y] - y(0) + &#92;mathcal{L}[x] = 0' title='s&#92;mathcal{L}[y] - y(0) + &#92;mathcal{L}[x] = 0' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5Bx%5D+%3D+-s%5Cmathcal%7BL%7D%5By%5D+%2B+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[x] = -s&#92;mathcal{L}[y] + 0' title='&#92;mathcal{L}[x] = -s&#92;mathcal{L}[y] + 0' class='latex' /> Lets represent this as Equation 1</p>
<p>Since we have the x(t) function simplified we can move onto the y(t) function:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D+%2B+y+%3D+3e%5E%7B2t%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt} + y = 3e^{2t}' title='&#92;frac{dx}{dt} + y = 3e^{2t}' class='latex' /></p>
<p>First we need to break down the equation into two sides and take the Laplace of them:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bdx%7D%7Bdt%7D%5D+%2B+%5Cmathcal%7BL%7D%5By%5D+%3D+3%5Cmathcal%7BL%7D%5Be%5E%7B2t%7D%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{dx}{dt}] + &#92;mathcal{L}[y] = 3&#92;mathcal{L}[e^{2t}]' title='&#92;mathcal{L}[&#92;frac{dx}{dt}] + &#92;mathcal{L}[y] = 3&#92;mathcal{L}[e^{2t}]' class='latex' /></p>
<p>Looking at this and the table for Laplace’s theorem, we can take apart the right side and plug it in (from the table) to the left side:</p>
<p><img src='http://s0.wp.com/latex.php?latex=s%5Cmathcal%7BL%7D%5Bx%5D+-+2+%2B+%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B3%7D%7Bs+-+2%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='s&#92;mathcal{L}[x] - 2 + &#92;mathcal{L}[y] = &#92;frac{3}{s - 2}' title='s&#92;mathcal{L}[x] - 2 + &#92;mathcal{L}[y] = &#92;frac{3}{s - 2}' class='latex' /> Lets represent this as equation 2</p>
<p>If we now plug equation 1 into equation 2 we can solve for the system of equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=s%28-s%5Cmathcal%7BL%7D%5By%5D%29+-+2+%2B+%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B3%7D%7Bs+-+2%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='s(-s&#92;mathcal{L}[y]) - 2 + &#92;mathcal{L}[y] = &#92;frac{3}{s - 2}' title='s(-s&#92;mathcal{L}[y]) - 2 + &#92;mathcal{L}[y] = &#92;frac{3}{s - 2}' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%28-s%5E2+%2B+1%29%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B3%7D%7Bs+-+2%7D+%2B+2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(-s^2 + 1)&#92;mathcal{L}[y] = &#92;frac{3}{s - 2} + 2' title='(-s^2 + 1)&#92;mathcal{L}[y] = &#92;frac{3}{s - 2} + 2' class='latex' /></p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5By%5D+%3D+%5Cfrac%7B3%7D%7B%281+-+s%5E2%29%28s+-+2%29%7D+%2B+%5Cfrac%7B2%7D%7B1+-+s%5E2%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[y] = &#92;frac{3}{(1 - s^2)(s - 2)} + &#92;frac{2}{1 - s^2}' title='&#92;mathcal{L}[y] = &#92;frac{3}{(1 - s^2)(s - 2)} + &#92;frac{2}{1 - s^2}' class='latex' /></p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address> <span style="color:#ffff00;">syms s t;<br />
ilaplace ((3/((s-2)*(-s^2+1)))+(2/(-s^2+1)),s,t); </span></address>
<address><span style="color:#ffff00;">ans = cosh(t)-exp(2*t)</span></address>
<address>________________________________________________________________________________________</address>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=y%28t%29%3Dcosh%28t%29-e%5E%282t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(t)=cosh(t)-e^(2t)' title='y(t)=cosh(t)-e^(2t)' class='latex' /></p>
<p>In order to find x(t) we first must plug equation 3 into equation 1</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%5D%3D-s%28%5Cfrac%7B3%7D%7B%28s-2%29%28-s%5E2%2B1%29%7D%2B%5Cfrac%7B2%7D%7B-s%5E2%2B1%7D%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x]=-s(&#92;frac{3}{(s-2)(-s^2+1)}+&#92;frac{2}{-s^2+1})' title='&#92;mathscr{L}[x]=-s(&#92;frac{3}{(s-2)(-s^2+1)}+&#92;frac{2}{-s^2+1})' class='latex' /></p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%5D%3D%5Cfrac%7B-3s%7D%7B%28s-2%29%28-s%5E2%2B1%29%7D-%5Cfrac%7B2s%7D%7B-s%5E2%2B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x]=&#92;frac{-3s}{(s-2)(-s^2+1)}-&#92;frac{2s}{-s^2+1}' title='&#92;mathscr{L}[x]=&#92;frac{-3s}{(s-2)(-s^2+1)}-&#92;frac{2s}{-s^2+1}' class='latex' /></p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">syms s t;<br />
&gt;&gt;ilaplace((-3*s/((s-2)(-s^2+1)))-(2*s/(-s^2+1)),s,t); </span></address>
<address><span style="color:#ffff00;">ans =-sinh(t)+2*exp(2*t)</span></address>
<address>________________________________________________________________________________________</address>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=x%28t%29%3D-sinh%28t%29%2B2e%5E%282t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x(t)=-sinh(t)+2e^(2t)' title='x(t)=-sinh(t)+2e^(2t)' class='latex' /></p>
<p>Now we are going to plot this equation by using EZPLOT function in MATLAB:</p>
<p>________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ezplot(</span><span style="color:#ffff00;">‘</span><span style="color:#ffff00;">cosh(x)-exp(2*x)</span><span style="color:#ffff00;">’,-5,2)</span></address>
<p>________________________________________________________________________________________</p>
<p>As a result from the following command we get:</p>
<p><img class="aligncenter size-full wp-image-344" title="problem5" src="http://joshuamoranmth212s09.files.wordpress.com/2009/05/problem5.jpg?w=450&#038;h=337" alt="problem5" width="450" height="337" />For this plot, x is equal to t. From this plot you can see that y(t) and x(t) decreases exponentially, when -3&gt;t&gt;1.</p>
<h4>Problem 2</h4>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D+-+2y+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt} - 2y = 0' title='&#92;frac{dx}{dt} - 2y = 0' class='latex' />, <img src='http://s0.wp.com/latex.php?latex=x%280%29+%3D+3&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x(0) = 3' title='x(0) = 3' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%2B+x+%2B+3y+%3D+2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} + x + 3y = 2' title='&#92;frac{dy}{dt} + x + 3y = 2' class='latex' />, <img src='http://s0.wp.com/latex.php?latex=y%280%29+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(0) = 0' title='y(0) = 0' class='latex' /></p>
<p>If we divide the two into two components x and y so we can decipher them and then reconnect. First lets start our same process with the y(t) function first:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%2B+x+%2B+3y+%3D+2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} + x + 3y = 2' title='&#92;frac{dy}{dt} + x + 3y = 2' class='latex' /></p>
<p>We need to break down the equation into two sides and take the Laplace of them:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D%5B%5Cfrac%7Bdy%7D%7Bdt%7D%5D+%2B+%5Cmathcal%7BL%7D%5Bx%5D+%2B+%5Cmathcal%7BL%7D%5B3y%5D+%3D+%5Cmathcal%7BL%7D%5B2%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathcal{L}[&#92;frac{dy}{dt}] + &#92;mathcal{L}[x] + &#92;mathcal{L}[3y] = &#92;mathcal{L}[2]' title='&#92;mathcal{L}[&#92;frac{dy}{dt}] + &#92;mathcal{L}[x] + &#92;mathcal{L}[3y] = &#92;mathcal{L}[2]' class='latex' /></p>
<p>Looking at this and the table for Laplace’s theorem, we can take apart the right side and plug it in (from the table) to the left side:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%28s+-+3%29%5Cmathcal%7BL%7D%5By%5D+%2B+%5Cmathcal%7BL%7D%5Bx%5D+%3D+%5Cfrac%7B2%7D%7Bs%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s - 3)&#92;mathcal{L}[y] + &#92;mathcal{L}[x] = &#92;frac{2}{s}' title='(s - 3)&#92;mathcal{L}[y] + &#92;mathcal{L}[x] = &#92;frac{2}{s}' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%5D%3D%5Cfrac%7B3%2B2%5Cmathscr%7BL%7D%5By%5D%7D%7Bs%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x]=&#92;frac{3+2&#92;mathscr{L}[y]}{s}' title='&#92;mathscr{L}[x]=&#92;frac{3+2&#92;mathscr{L}[y]}{s}' class='latex' /> This is equation1</p>
<p>Now if we take <img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x]' title='&#92;mathscr{L}[x]' class='latex' /> and plug it into<img src='http://s0.wp.com/latex.php?latex=%28s+-+3%29%5Cmathcal%7BL%7D%5By%5D+%2B+%5Cmathcal%7BL%7D%5Bx%5D+%3D+%5Cfrac%7B2%7D%7Bs%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s - 3)&#92;mathcal{L}[y] + &#92;mathcal{L}[x] = &#92;frac{2}{s}' title='(s - 3)&#92;mathcal{L}[y] + &#92;mathcal{L}[x] = &#92;frac{2}{s}' class='latex' /> we can solve for<img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5By%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[y]' title='&#92;mathscr{L}[y]' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%28s-3%29%5Cmathscr%7BL%7D%5By%5D%2B%5Cfrac%7B3%2B2%5Cmathscr%7BL%7D%5By%5D%7D%7Bs%7D%3D%5Cfrac%7B2%7D%7Bs%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s-3)&#92;mathscr{L}[y]+&#92;frac{3+2&#92;mathscr{L}[y]}{s}=&#92;frac{2}{s}' title='(s-3)&#92;mathscr{L}[y]+&#92;frac{3+2&#92;mathscr{L}[y]}{s}=&#92;frac{2}{s}' class='latex' /></p>
<p>Now we are going to continue with the process of the Laplace transform:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%28s%5E2-3s%2B2%29%5Cmathscr%7BL%7D%5By%5D%3D-1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(s^2-3s+2)&#92;mathscr{L}[y]=-1' title='(s^2-3s+2)&#92;mathscr{L}[y]=-1' class='latex' /></p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p>$latex\mathscr{L}[y]=\frac{-1}{s^2-3s+2}$ equation 2</p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">syms s t;<br />
&gt;&gt; ilaplace (-1/(s^2-3*s+2),s,t); </span></address>
<address><span style="color:#ffff00;">ans = exp(t)-exp(2*t)</span></address>
<address>________________________________________________________________________________________</address>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=y%28t%29%3De%5E%28t%29-e%5E%282t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(t)=e^(t)-e^(2t)' title='y(t)=e^(t)-e^(2t)' class='latex' /></p>
<p>In order to find x(t) we first must plug equation 2 into equation 1</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%5D%3D%5Cfrac%7B3%2B2%5Cfrac%7B-1%7D%7Bs%5E2-3s%2B2%7D%7D%7Bs%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x]=&#92;frac{3+2&#92;frac{-1}{s^2-3s+2}}{s}' title='&#92;mathscr{L}[x]=&#92;frac{3+2&#92;frac{-1}{s^2-3s+2}}{s}' class='latex' /></p>
<p>Before we can use the solver, we are going to simplify the problem:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmathscr%7BL%7D%5Bx%5D%3D%5Cfrac%7B3%7D%7B2%7D-%5Cfrac%7B2%7D%7Bs%28s%5E2-3s%2B2%29%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;mathscr{L}[x]=&#92;frac{3}{2}-&#92;frac{2}{s(s^2-3s+2)}' title='&#92;mathscr{L}[x]=&#92;frac{3}{2}-&#92;frac{2}{s(s^2-3s+2)}' class='latex' /></p>
<p>Using MATLAB we can now get our final Solution</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">syms s t;<br />
ilaplace(3/2-(2/(s*(s^2-3*s+2))),s,t); </span></address>
<address><span style="color:#ffff00;">ans = 2+2*exp(t)-exp(2*t)</span></address>
<address>________________________________________________________________________________________</address>
<p>Final Solution:</p>
<p><img src='http://s0.wp.com/latex.php?latex=x%28t%29%3D2%2B2%2Ae%5E%28t%29-e%5E%282t%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x(t)=2+2*e^(t)-e^(2t)' title='x(t)=2+2*e^(t)-e^(2t)' class='latex' /></p>
<p>Now we are going to plot this equation by using EZPLOT function in MATLAB:</p>
<p>________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ezplot(</span><span style="color:#ffff00;">‘</span><span style="color:#ffff00;">cosh(x)-exp(2*x)</span><span style="color:#ffff00;">’,-5,2)</span></address>
<p>________________________________________________________________________________________</p>
<p>As a result from the following command we get:</p>
<p><img class="aligncenter size-full wp-image-346" title="problem6" src="http://joshuamoranmth212s09.files.wordpress.com/2009/05/problem6.jpg?w=450&#038;h=337" alt="problem6" width="450" height="337" /></p>
<p>For this plot, x is equal to t. From this plot you can see that y(t) and x(t) decreases exponentially as t increases.</p>
<h3>Conclusion</h3>
<p>Overall this was quite a Lenghthy block. With the knowledge that I gathered through all my classes so far though I was able to accomplish the task at ahnd.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joshuamoranmth212s09.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joshuamoranmth212s09.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joshuamoranmth212s09.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joshuamoranmth212s09.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joshuamoranmth212s09.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joshuamoranmth212s09.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joshuamoranmth212s09.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joshuamoranmth212s09.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joshuamoranmth212s09.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joshuamoranmth212s09.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joshuamoranmth212s09.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joshuamoranmth212s09.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joshuamoranmth212s09.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joshuamoranmth212s09.wordpress.com/324/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=324&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joshuamoranmth212s09.wordpress.com/2009/05/17/sixth-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6510b6bc84fa204c7f245dada42d037?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jmoran1</media:title>
		</media:content>

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

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

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

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

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

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/05/problem6.jpg" medium="image">
			<media:title type="html">problem6</media:title>
		</media:content>
	</item>
		<item>
		<title>Block 5</title>
		<link>http://joshuamoranmth212s09.wordpress.com/2009/04/03/block-5/</link>
		<comments>http://joshuamoranmth212s09.wordpress.com/2009/04/03/block-5/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 12:42:18 +0000</pubDate>
		<dc:creator>jmoran1</dc:creator>
				<category><![CDATA[MTH212]]></category>

		<guid isPermaLink="false">http://joshuamoranmth212s09.wordpress.com/?p=241</guid>
		<description><![CDATA[PART 1 Systems of Linear Differential Equations This is a 3-week block in which we will be looking at the behavior of systems of linear differential equations. A system of two linear differential equations is a pair of linked differential equations of the form where are constants. A linear function on the Euclidean plane is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=241&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>PART 1</h1>
<h3 style="text-align:center;">Systems of Linear Differential Equations</h3>
<p style="text-align:left;">This is a 3-week block in which we will be looking at the behavior of systems of linear differential equations. A system of two linear differential equations is a pair of linked differential equations of the form</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3Dax%2Bby&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=ax+by' title='&#92;frac{dx}{dt}=ax+by' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3Dcx%2Bdy&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=cx+dy' title='&#92;frac{dy}{dt}=cx+dy' class='latex' /></p>
<p>where <img src='http://s0.wp.com/latex.php?latex=a%2C+b%2C+c%2C+d&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a, b, c, d' title='a, b, c, d' class='latex' /> are constants.</p>
<p>A linear function on the Euclidean plane is a function of the form <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%28ax%2Bby%2C+cx%2Bdy%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(ax+by, cx+dy)' title='T[(x,y)]=(ax+by, cx+dy)' class='latex' />. A linear function is exactly a function that preserves vector addition and scalar multiplication: <img src='http://s0.wp.com/latex.php?latex=T%5B%28x_1%2Cy_1%29%2B%28x_2%2Cy_2%29%5D%3DT%5B%28x_1%2Cy_1%29%5D%2BT%5B%28x_2%2Cy_2%29%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x_1,y_1)+(x_2,y_2)]=T[(x_1,y_1)]+T[(x_2,y_2)]' title='T[(x_1,y_1)+(x_2,y_2)]=T[(x_1,y_1)]+T[(x_2,y_2)]' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=T%5B%5Clambda%28x%2Cy%29%5D%3D%5Clambda+T%5B%28x%2Cy%29%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[&#92;lambda(x,y)]=&#92;lambda T[(x,y)]' title='T[&#92;lambda(x,y)]=&#92;lambda T[(x,y)]' class='latex' /> for all vectors <img src='http://s0.wp.com/latex.php?latex=%28x_1%2Cy_1%29%2C+%28x_2%2Cy_2%29%2C+%28x%2Cy%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(x_1,y_1), (x_2,y_2), (x,y)' title='(x_1,y_1), (x_2,y_2), (x,y)' class='latex' /> and all real numbers <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' />.</p>
<p>As a result, once we know what a linear function T does to the vectors (1,0) <img src='http://s0.wp.com/latex.php?latex=%5Ctextrm%7B+and+%7D+%280%2C1%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;textrm{ and } (0,1)' title='&#92;textrm{ and } (0,1)' class='latex' /> we know what T does to every vector. The reason is that <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3DT%5Bx%281%2C0%29%2By%280%2C1%29%5D%3DxT%5B%281%2C0%29%5D%2ByT%5B%280%2C1%29%5D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=T[x(1,0)+y(0,1)]=xT[(1,0)]+yT[(0,1)]' title='T[(x,y)]=T[x(1,0)+y(0,1)]=xT[(1,0)]+yT[(0,1)]' class='latex' />.</p>
<p>In principle, we could just draw, for each vector (x,y) a directed line segment. However, a moment’s thought tells us that all these directed line segments would overlap in a mess, and give us no sensible picture at all. One way around this is to draw a very short directed line segment. So that these small directed line segments do not overlap:</p>
<p><img class="aligncenter size-full wp-image-252" title="matlab_vector_field2" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/matlab_vector_field2.jpg?w=450&#038;h=338" alt="matlab_vector_field2" width="450" height="338" /></p>
<p>To accomplish this we will be using MATLAB.</p>
<p>Finding Invariant Lines &#8211; Invariant lines are lines where points map back onto themselves (line of invariant points). It can also be a line where the points map back onto a (usually) different place on the line. In this block we will also be finding these.</p>
<p>In this part of the block my partner (Mike Bosse) and I will be accomplishing the following:</p>
<p>1.    (a) Plot the vector field for the linear function <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%28x%2By%2Cx%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(x+y,x)' title='T[(x,y)]=(x+y,x)' class='latex' />.</p>
<p>(b) Find any invariant lines, and write down the differential equations corresponding to a flow for which the vectors in the vector field are tangent to the flow.</p>
<p>(c) Try to describe the flow geometrically, in words.</p>
<p>2. Repeat this for the linear functions <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%28ax%2Bby%2C+cx%2Bdy%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(ax+by, cx+dy)' title='T[(x,y)]=(ax+by, cx+dy)' class='latex' /> for several choices of integers <img src='http://s0.wp.com/latex.php?latex=a%2C+b%2C+c%2C+d&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a, b, c, d' title='a, b, c, d' class='latex' /> chosen randomly in the range <img src='http://s0.wp.com/latex.php?latex=-5+%5Cleq+a%2C+b%2C+c%2C+d+%5Cleq+5&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-5 &#92;leq a, b, c, d &#92;leq 5' title='-5 &#92;leq a, b, c, d &#92;leq 5' class='latex' />.</p>
<p>To begin this part of the block my partner and I, decided to make one simple function that would help simplify this part of the Block. To begin we solve for the invariant lines algebraically.</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%28ax%2Bby%2Ccx%2Bdy%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(ax+by,cx+dy)' title='(ax+by,cx+dy)' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=%28%5Clambda+x%2C%5Clambda+y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(&#92;lambda x,&#92;lambda y)' title='(&#92;lambda x,&#92;lambda y)' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=ax%2Bby%3D%5Clambda+x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='ax+by=&#92;lambda x' title='ax+by=&#92;lambda x' class='latex' />                 <img src='http://s0.wp.com/latex.php?latex=cx%2Bdy%3D%5Clambda+y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='cx+dy=&#92;lambda y' title='cx+dy=&#92;lambda y' class='latex' /></p>
<p style="text-align:center;">Solve for x and y</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7B%5Clambda+x+-+ax%29%7D%7Bb%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{&#92;lambda x - ax)}{b}' title='y=&#92;frac{&#92;lambda x - ax)}{b}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D%5Cfrac%7B%5Clambda+y+-+dy%29%7D%7Bc%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x=&#92;frac{&#92;lambda y - dy)}{c}' title='x=&#92;frac{&#92;lambda y - dy)}{c}' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7Bx%28%5Clambda+-+a%29%7D%7Bb%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{x(&#92;lambda - a)}{b}' title='y=&#92;frac{x(&#92;lambda - a)}{b}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D+%5Cfrac%7By%28%5Clambda+-+d%29%7D%7Bc%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x= &#92;frac{y(&#92;lambda - d)}{c}' title='x= &#92;frac{y(&#92;lambda - d)}{c}' class='latex' /></p>
<p style="text-align:center;">Rearrange</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%28%5Clambda+-+a%29x+-+by+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(&#92;lambda - a)x - by = 0' title='(&#92;lambda - a)x - by = 0' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=-cx+%2B+%28%5Clambda+-+d%29y+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-cx + (&#92;lambda - d)y = 0' title='-cx + (&#92;lambda - d)y = 0' class='latex' /></p>
<p style="text-align:center;">Finding the Determinant</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%28%5Clambda+-+a%29%28%5Clambda+-+d%29+-+%28-b%29%28-c%29%3D0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(&#92;lambda - a)(&#92;lambda - d) - (-b)(-c)=0' title='(&#92;lambda - a)(&#92;lambda - d) - (-b)(-c)=0' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%28%5Clambda+-a%29%28%5Clambda+-+d%29-bc%3D0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(&#92;lambda -a)(&#92;lambda - d)-bc=0' title='(&#92;lambda -a)(&#92;lambda - d)-bc=0' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Clambda+%5E2+%2B+%28-a-d%29%5Clambda+%2B+ab-bc%3D0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda ^2 + (-a-d)&#92;lambda + ab-bc=0' title='&#92;lambda ^2 + (-a-d)&#92;lambda + ab-bc=0' class='latex' /></p>
<p style="text-align:center;">Using the Quadratic Equation, solve for <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B-B+%5Cpm+%5Csqrt%7BB%5E2-4AC%7D%7D%7B2A%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{-B &#92;pm &#92;sqrt{B^2-4AC}}{2A}' title='&#92;frac{-B &#92;pm &#92;sqrt{B^2-4AC}}{2A}' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=a%3D1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a=1' title='a=1' class='latex' />    <img src='http://s0.wp.com/latex.php?latex=b%3D%28-a-d%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='b=(-a-d)' title='b=(-a-d)' class='latex' />    <img src='http://s0.wp.com/latex.php?latex=c%3D%28ad-bc%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='c=(ad-bc)' title='c=(ad-bc)' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B-%28-a-d%29+%5Cpm+%5Csqrt%7B%28-a-d%29%5E2-4%281%29%28ad-bc%29%7D%7D%7B2%281%29%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{-(-a-d) &#92;pm &#92;sqrt{(-a-d)^2-4(1)(ad-bc)}}{2(1)}' title='&#92;frac{-(-a-d) &#92;pm &#92;sqrt{(-a-d)^2-4(1)(ad-bc)}}{2(1)}' class='latex' /></p>
<p style="text-align:center;">Once <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' /> is found, plug it into either of the following equations from before, to find the Invariant line equation.</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7Bx%28%5Clambda+-+a%29%7D%7Bb%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{x(&#92;lambda - a)}{b}' title='y=&#92;frac{x(&#92;lambda - a)}{b}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D+%5Cfrac%7By%28%5Clambda+-+d%29%7D%7Bc%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x= &#92;frac{y(&#92;lambda - d)}{c}' title='x= &#92;frac{y(&#92;lambda - d)}{c}' class='latex' /></p>
<p style="text-align:left;">Since we have now found a generalized formula to solve for the invariant lines, we decided to make a function in MATLAB that would plot the vectors and variant lines. All we would have to do is enter what a b c and d would be. Also to make it a little more easier, if you say that a b c and d are all zero the function will choose random values from -5 to 5 for you. Below is the following function we created in MATLAB.</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p><span style="color:#ffff00;">% This Function is For Block 5. This function is for a system<br />
% of two linear differential equations. dx/dt=ax+by and<br />
% dy/dt=cx+dy. a=a b=b c=c d=d and g is whether or not you want<br />
% to display invariant lines. The main point of this function is<br />
% that it determines your invariant lines for you</span></p>
<p><span style="color:#ffff00;">function Block5_1(a,b,c,d,g)</span></p>
<p><span style="color:#ffff00;">% IF a,b,c,d = 0 then give them random values.<br />
if (a==0 &amp;&amp; b==0 &amp;&amp; c==0 &amp;&amp; d==0)<br />
a=fix(10*rand())-5<br />
b=fix(10*rand())-5<br />
c=fix(10*rand())-5<br />
d=fix(10*rand())-5<br />
end</span></p>
<p><span style="color:#ffff00;">%determining Landa 1<br />
lambda1=(-(-a-d)+sqrt((-a-d)^2-4*(a*d-b*c)))/2</span></p>
<p><span style="color:#ffff00;">%determining Landa 2<br />
lambda2=(-(-a-d)-sqrt((-a-d)^2-4*(a*d-b*c)))/2</span></p>
<p><span style="color:#ffff00;">xx=-1:.1:1;<br />
% invariant line 1<br />
p1=(xx*(lambda1-a))/b;<br />
% invariant line 2<br />
p2=(xx*(lambda2-a))/b;</span></p>
<p><span style="color:#ffff00;">[x,y]=meshgrid(-1:1/10:1,-1:1/10:1);<br />
u=a*x+b*y;<br />
v=c*x+d*y;<br />
w=sqrt(u.^2 +v.^2);quiver(x,y,u./w,v./w,.7);<br />
% if g is one then plot the variant lines<br />
if (g)<br />
hold on<br />
if (isreal(lambda1)==1) %tests to see if lambda1 is a real number<br />
plot(xx,p1,&#8217;r')<br />
end<br />
if (isreal(lambda2)==1) %tests to see if lambda2 is a real number<br />
plot(xx,p2,&#8217;r')<br />
end<br />
hold off<br />
end<br />
end</span></p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;">Now that we have that setup lets plot the vector field for the linear function <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%28x%2By%2Cx%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(x+y,x)' title='T[(x,y)]=(x+y,x)' class='latex' />. Using our Function we need to say Block5_1(a,b,c,d,g).  Where:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=a&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a' title='a' class='latex' /> = 1        <img src='http://s0.wp.com/latex.php?latex=b&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='b' title='b' class='latex' /> =1     <img src='http://s0.wp.com/latex.php?latex=c&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='c' title='c' class='latex' /> = 1      <img src='http://s0.wp.com/latex.php?latex=d&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='d' title='d' class='latex' />=0</p>
<p style="text-align:left;">Since we don&#8217;t want the variant line to show up yet, we want <img src='http://s0.wp.com/latex.php?latex=g&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='g' title='g' class='latex' /> = 0</p>
<p style="text-align:left;">The following was put into MATLAB and what is spit out (input was in yellow output gray):</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;"><span style="color:#ffff00;">Block5_1(1,1,1,0,0)</span></p>
<p style="text-align:left;">lambda1 =</p>
<p>1.6180</p>
<p>lambda2 =</p>
<p>-0.6180</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;">As a result from the following command we got:</p>
<p style="text-align:left;"><img class="aligncenter size-full wp-image-290" title="block5_1_v" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_v.jpg?w=450&#038;h=337" alt="block5_1_v" width="450" height="337" /></p>
<p style="text-align:left;">In this plot of vectors, they all seem to be pointing away from the coordinate (0,0). Also you can see that the vectors seem to split into four different sections. The top left corner seem to be going south-east and south-west. The top right corner is going from south-west to north west and north to northwest. The bottom left corner is going south to south-east and north-east to south-east. Finally the bottom right corner is going north-east and north-west. With these four sections, you can almost see the invariant lines will be. One should be from about (-0.8,1) to (0.8,0) and the other about (-1.1,-0.7) to (1,0.6). The only way to know for sure is graphing them with our predefined Function.</p>
<p style="text-align:left;">Here is what was put into MATLAB and what is spit out (input was in yellow output gray)::</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;"><span style="color:#ffff00;">Block5_1(1,1,1,0,1)</span></p>
<p style="text-align:left;">lambda1 =</p>
<p>1.6180</p>
<p>lambda2 =</p>
<p>-0.6180</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;">As a result from the following command we got:</p>
<p style="text-align:left;"><img class="aligncenter size-full wp-image-291" title="block5_11" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_11.jpg?w=450&#038;h=337" alt="block5_11" width="450" height="337" /></p>
<p style="text-align:left;">As predicted the variant lines are exactly where we said they would be. Using our equations we got from solving invariant lines algebraically and what MATLAB spit out for our <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' /> values, our invariant line equations are:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7Bc%281.168+-+1%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{c(1.168 - 1)}{1}' title='y=&#92;frac{c(1.168 - 1)}{1}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D+%5Cfrac%7By%281.168+-+0%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x= &#92;frac{y(1.168 - 0)}{1}' title='x= &#92;frac{y(1.168 - 0)}{1}' class='latex' /></p>
<p style="text-align:left;">AND    <img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7Bc%28-0.168+-+1%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{c(-0.168 - 1)}{1}' title='y=&#92;frac{c(-0.168 - 1)}{1}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D+%5Cfrac%7By%28-0.168+-+0%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x= &#92;frac{y(-0.168 - 0)}{1}' title='x= &#92;frac{y(-0.168 - 0)}{1}' class='latex' /></p>
<p style="text-align:left;">Now the differential equations corresponding to a flow for which the vectors in the vector field are tangent to the flow are as follows:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3Dx%2By&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=x+y' title='&#92;frac{dx}{dt}=x+y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3Dx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=x' title='&#92;frac{dy}{dt}=x' class='latex' /></p>
<p>Now we are going to repeat this for the linear functions <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%28ax%2Bby%2C+cx%2Bdy%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(ax+by, cx+dy)' title='T[(x,y)]=(ax+by, cx+dy)' class='latex' /> for several choices of integers <img src='http://s0.wp.com/latex.php?latex=a%2C+b%2C+c%2C+d&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a, b, c, d' title='a, b, c, d' class='latex' /> chosen randomly in the range <img src='http://s0.wp.com/latex.php?latex=-5+%5Cleq+a%2C+b%2C+c%2C+d+%5Cleq+5&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-5 &#92;leq a, b, c, d &#92;leq 5' title='-5 &#92;leq a, b, c, d &#92;leq 5' class='latex' />. Since our MATLAB Function is already capable of selecting random values from -5 to 5 we will just continue using this. As a refresher all we have to do for our function is input Block5_1(0,0,0,0,1) into MATLAB to get random plots. So lets do so.</p>
<p style="text-align:left;">The following was put into MATLAB and what is spit out (input was in yellow output gray):</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;"><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>-4</p>
<p>b =</p>
<p>-1</p>
<p>c =</p>
<p>-1</p>
<p>d =</p>
<p>1</p>
<p>lambda1 =</p>
<p>1.1926</p>
<p>lambda2 =</p>
<p>-4.1926</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;">Before we show the graph lets analyze what MATLAB gave us for random Numbers. It gave us:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=a&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a' title='a' class='latex' /> = -4        <img src='http://s0.wp.com/latex.php?latex=b&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='b' title='b' class='latex' /> =-1     <img src='http://s0.wp.com/latex.php?latex=c&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='c' title='c' class='latex' /> = -1      <img src='http://s0.wp.com/latex.php?latex=d&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='d' title='d' class='latex' />=1</p>
<p style="text-align:left;">And from this we get our linear function <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%28-4x-y%2C+-x%2By%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(-4x-y, -x+y)' title='T[(x,y)]=(-4x-y, -x+y)' class='latex' /></p>
<p style="text-align:left;">Now that we have established our Linear Function our vector field plot looks like so:</p>
<p style="text-align:left;"><img class="aligncenter size-full wp-image-298" title="block5_1_ran_v1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran_v1.jpg?w=450&#038;h=337" alt="block5_1_ran_v1" width="450" height="337" /></p>
<p style="text-align:left;">In this plot of vectors, they still seem to be pointing away from or pointing around the coordinate (0,0). Once again the vectors seem to split into four different sections. The top left corner seem to be going east to north-east almost all north. The top right corner is going from west to north-west almost all north. The bottom left corner is going east to south-east almost all south. Finally the bottom right corner is going west to south-west almost all south. With these four sections, you can almost see the invariant lines will be. One should be from about (-1.8,1) to (2.1,-1) and the other about (-1,-0.1) to (1,0.1). The only way to know for sure is graphing them with our predefined Function.</p>
<p style="text-align:left;">The following was put into MATLAB and what is spit out (input was in yellow output gray):</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;"><span style="color:#ffff00;">Block5_1(-4,-1,-1,1,1)</span></p>
<p>lambda1 =</p>
<p>1.1926</p>
<p>lambda2 =</p>
<p>-4.1926</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;">As a result from the following command we got:</p>
<p style="text-align:left;"><img class="aligncenter size-full wp-image-299" title="block5_1_ran" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran.jpg?w=450&#038;h=337" alt="block5_1_ran" width="450" height="337" /></p>
<p style="text-align:left;">As predicted the variant lines are exactly where we said they would be. The invariant lines seem to be where the vectors start to point towards each other. Using our equations we got from solving invariant lines algebraically and what MATLAB spit out for our <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' /> values, our invariant line equations are:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7Bc%281.1926+-+1%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{c(1.1926 - 1)}{1}' title='y=&#92;frac{c(1.1926 - 1)}{1}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D+%5Cfrac%7By%281.1926+-+0%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x= &#92;frac{y(1.1926 - 0)}{1}' title='x= &#92;frac{y(1.1926 - 0)}{1}' class='latex' /></p>
<p style="text-align:left;">AND    <img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7Bc%28-4.1926+-+1%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{c(-4.1926 - 1)}{1}' title='y=&#92;frac{c(-4.1926 - 1)}{1}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D+%5Cfrac%7By%28-4.1926+-+0%29%7D%7B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x= &#92;frac{y(-4.1926 - 0)}{1}' title='x= &#92;frac{y(-4.1926 - 0)}{1}' class='latex' /></p>
<p style="text-align:left;">Now the differential equations corresponding to a flow for which the vectors in the vector field are tangent to the flow are as follows:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D-4x-y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=-4x-y' title='&#92;frac{dx}{dt}=-4x-y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D-x%2By&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=-x+y' title='&#92;frac{dy}{dt}=-x+y' class='latex' /></p>
<p style="text-align:left;">Lets now continue and get another random example.</p>
<p style="text-align:left;">The following was put into MATLAB and what is spit out (input was in yellow output gray):</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;"><span style="color:#ffff00;">Block5_1(0,0,0,0,1)</span></p>
<p>a =</p>
<p>2</p>
<p>b =</p>
<p>2</p>
<p>c =</p>
<p>-3</p>
<p>d =</p>
<p>1</p>
<p>lambda1 =</p>
<p>1.5000 + 2.3979i</p>
<p>lambda2 =</p>
<p>1.5000 &#8211; 2.3979i</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;">Lets analyze what MATLAB gave us for random Numbers. It gave us:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=a&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a' title='a' class='latex' /> = 2        <img src='http://s0.wp.com/latex.php?latex=b&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='b' title='b' class='latex' /> =2     <img src='http://s0.wp.com/latex.php?latex=c&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='c' title='c' class='latex' /> = -3      <img src='http://s0.wp.com/latex.php?latex=d&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='d' title='d' class='latex' />=1</p>
<p style="text-align:left;">And from this we get our linear function <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%282x%2B2y%2C+-3x%2By%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(2x+2y, -3x+y)' title='T[(x,y)]=(2x+2y, -3x+y)' class='latex' /></p>
<p style="text-align:left;">Now that we have established our Linear Function our vector field plot looks like so:</p>
<p style="text-align:left;"><img class="aligncenter size-full wp-image-300" title="block5_1_ran2_v" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran2_v.jpg?w=450&#038;h=337" alt="block5_1_ran2_v" width="450" height="337" /></p>
<p style="text-align:left;">In this plot of vectors, they still seem to be pointing away from coordinate (0,0). This linear Function seems to be one of those special cases where there are no defined variant lines. There are no invariant lines because <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' /> is equal to two different complex numbers. As you can see from above <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' />=1.5000 + 2.3979i and 1.5000 &#8211; 2.3979i. Since both results are complex numbers they can&#8217;t be graphed.</p>
<p style="text-align:left;">Now the differential equations corresponding to a flow for which the vectors in the vector field are tangent to the flow are as follows:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D+2x+%2B+2y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}= 2x + 2y' title='&#92;frac{dx}{dt}= 2x + 2y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D-x3+%2B+y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=-x3 + y' title='&#92;frac{dy}{dt}=-x3 + y' class='latex' /></p>
<p style="text-align:left;">Lets now continue and get another random example.</p>
<p style="text-align:left;">The following was put into MATLAB and what is spit out (input was in yellow output gray):</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<pre><span style="color:#ffff00;">Block5_1(0,0,0,0,1)</span>

a =

     2

b =

    -1

c =

     1

d =

     4

lambda1 =

     3

lambda2 =

     3
______________________________________________________________________________________</pre>
<p style="text-align:left;">Before we show the graph lets analyze what MATLAB gave us for random Numbers. It gave us:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=a&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a' title='a' class='latex' /> = 2        <img src='http://s0.wp.com/latex.php?latex=b&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='b' title='b' class='latex' /> =-1     <img src='http://s0.wp.com/latex.php?latex=c&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='c' title='c' class='latex' /> = 1      <img src='http://s0.wp.com/latex.php?latex=d&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='d' title='d' class='latex' />=4</p>
<p style="text-align:left;">And from this we get our linear function <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3D%282x-y%2C+x%2B4y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]=(2x-y, x+4y)' title='T[(x,y)]=(2x-y, x+4y)' class='latex' /></p>
<p style="text-align:left;">Now that we have established our Linear Function our vector field plot looks like so:</p>
<p style="text-align:left;"><img class="aligncenter size-full wp-image-306" title="block5_1_ran31" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran31.jpg?w=450&#038;h=337" alt="block5_1_ran31" width="450" height="337" /></p>
<p style="text-align:left;">In this plot of vectors, they still seem to be pointing away from the coordinate (0,0). This time the vectors seem to split into two different sections. There seems to be two sets of vectors that line up across from each other pointing in the opposite direction. Since <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' /> is only has one solution this should be the only variant line. The line we think goes from (-1,1) to (1,-1)  The only way to know for sure is graphing them with our predefined Function.</p>
<p style="text-align:left;">The following was put into MATLAB and what is spit out (input was in yellow output gray):</p>
<p style="text-align:left;">______________________________________________________________________________________</p>
<p style="text-align:left;"><span style="color:#ffff00;">Block5_1(2,-1,1,4,1)</span></p>
<p>lambda1 =</p>
<pre>     3</pre>
<p>lambda2 =</p>
<pre>     3
______________________________________________________________________________________
As a result from the following command we got:
<img class="aligncenter size-full wp-image-307" title="block5_1_ran3_v2" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran3_v2.jpg?w=450&#038;h=337" alt="block5_1_ran3_v2" width="450" height="337" /></pre>
<p style="text-align:left;">As predicted the variant line are exactly where we said it would be. Using our equations we got from solving invariant lines algebraically and what MATLAB spit out for our <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' /> value, our invariant line equation are:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=y%3D%5Cfrac%7Bc%283+-+2%29%7D%7B-1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=&#92;frac{c(3 - 2)}{-1}' title='y=&#92;frac{c(3 - 2)}{-1}' class='latex' />       <img src='http://s0.wp.com/latex.php?latex=x%3D+%5Cfrac%7By%283+-+1%29%7D%7B4%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x= &#92;frac{y(3 - 1)}{4}' title='x= &#92;frac{y(3 - 1)}{4}' class='latex' /></p>
<p style="text-align:left;">Now the differential equations corresponding to a flow for which the vectors in the vector field are tangent to the flow are as follows:</p>
<p style="text-align:left;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D2x-y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=2x-y' title='&#92;frac{dx}{dt}=2x-y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3Dx%2B4y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=x+4y' title='&#92;frac{dy}{dt}=x+4y' class='latex' /></p>
<h1>PART 2</h1>
<p>For this part of the lab my partner and I will be going go through all the cases for the roots of the characteristic equation, describing the geometry of the solutions of the differential equations. Instead of using the examples from the book though my partner will be using our pre-made function and keep randomly going through numbers until we do every possibility. In each case we will also be describing the exact solutions to the differential equations obtained from MATLAB, and relate the form of those solutions to the geometry of the flow.</p>
<p>Our first Possible solution is when you have two positive roots. For this our Function had spit out the following (input was in yellow output gray):</p>
<p>________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>2</p>
<p>b =</p>
<p>-3</p>
<p>c =</p>
<p>0</p>
<p>d =</p>
<p>3</p>
<p>lambda1 =</p>
<p>3</p>
<p>lambda2 =</p>
<p>2<br />
________________________________________________________________________________________</p>
<p>This random gave us the random numbers we need to get two positive roots. The roots are 3 and 2. The linear equation is <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3A%3D%282x-3y%2C+3y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]:=(2x-3y, 3y)' title='T[(x,y)]:=(2x-3y, 3y)' class='latex' />. Now from this we get the two differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D2x-3y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=2x-3y' title='&#92;frac{dx}{dt}=2x-3y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D3y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=3y' title='&#92;frac{dy}{dt}=3y' class='latex' /></p>
<p>The plot for these differential equations is as follows:</p>
<p><img class="aligncenter size-full wp-image-311" title="block5_2_pp_r2" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_pp_r2.jpg?w=450&#038;h=337" alt="block5_2_pp_r2" width="450" height="337" /></p>
<p>One of the first things that my partner and I noticed about this plot is that all the vectors seem to be pointing away from the origin and away from the variant line (-1,0) to (1,0). Before making any conclusions though we are now going to try another example where we get two negative roots.</p>
<p style="text-align:left;">(input was in yellow output gray):</p>
<p>________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>1</p>
<p>b =</p>
<p>-2</p>
<p>c =</p>
<p>4</p>
<p>d =</p>
<p>-5</p>
<p>lambda1 =</p>
<p>-1</p>
<p>lambda2 =</p>
<p>-5</p>
<p>________________________________________________________________________________________</p>
<p>This random gave us the random numbers we need to get two negative roots. The roots were -1 and -5. The linear equation is <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3A%3D%28x-2y%2C+4x-5y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]:=(x-2y, 4x-5y)' title='T[(x,y)]:=(x-2y, 4x-5y)' class='latex' />. Now from this we get the two differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3Dx-2y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=x-2y' title='&#92;frac{dx}{dt}=x-2y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D4x-5y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=4x-5y' title='&#92;frac{dy}{dt}=4x-5y' class='latex' /></p>
<p>The plot for these differential equations is as follows:</p>
<p><img class="aligncenter size-full wp-image-313" title="block5_2_nn_r1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_nn_r1.jpg?w=450&#038;h=337" alt="block5_2_nn_r1" width="450" height="337" /></p>
<p>On this plot we noticed  that all the vectors seem to be pointing towards the origin or toward the invariant line (-1,-1) to (1,1). Also  Before making any conclusions though we are now going to try another example where we get two negative roots.</p>
<p style="text-align:left;">(input was in yellow output gray):</p>
<p>________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>-4</p>
<p>b =</p>
<p>0</p>
<p>c =</p>
<p>-5</p>
<p>d =</p>
<p>2</p>
<p>lambda1 =</p>
<p>2</p>
<p>lambda2 =</p>
<p>-4</p>
<p>________________________________________________________________________________________</p>
<p>This random gave us the random numbers we need to get two negative roots. The roots were 2 and -4. The linear equation is <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3A%3D%28-4x%2C+-5x%2B2y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]:=(-4x, -5x+2y)' title='T[(x,y)]:=(-4x, -5x+2y)' class='latex' />. Now from this we get the two differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D-4x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=-4x' title='&#92;frac{dx}{dt}=-4x' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D-5x%2B2y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=-5x+2y' title='&#92;frac{dy}{dt}=-5x+2y' class='latex' /></p>
<p>The plot for these differential equations is as follows:</p>
<p><img class="aligncenter size-full wp-image-316" title="block5_2_np_r" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_np_r.jpg?w=450&#038;h=337" alt="block5_2_np_r" width="450" height="337" /></p>
<p>This is the final circumstance when getting two roots. What we have been saying all along seems to still be true. If you split the plot into four sections, there are two sections that head inward but not pointing at the origin (bottom left and top right) and two sections that head away but not pointing directly away from the origin (bottom right and top left). In this case the origin is known as a saddle point. One of the differences between this and the two positive roots is that all vectors seem to be pointing toward the invariant line (0,-1) to (0,1) in one way or another. Now we will explore the circumstance of getting one root.  Using our function we found the following for a problem in which you get one root.</p>
<p style="text-align:left;">(input was in yellow output gray):</p>
<p>________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>3</p>
<p>b =</p>
<p>0</p>
<p>c =</p>
<p>0</p>
<p>d =</p>
<p>3</p>
<p>lambda1 =</p>
<p>3</p>
<p>lambda2 =</p>
<p>3</p>
<p>________________________________________________________________________________________</p>
<p>This random example gave us the random numbers to get one positive root. The root is 3. The linear equation is <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3A%3D%283x%2C+3y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]:=(3x, 3y)' title='T[(x,y)]:=(3x, 3y)' class='latex' />.Now from this we get the two differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D-3x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=-3x' title='&#92;frac{dx}{dt}=-3x' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D-3y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=-3y' title='&#92;frac{dy}{dt}=-3y' class='latex' /></p>
<p>The plot for these differential equations is as follows:</p>
<p><img class="aligncenter size-full wp-image-318" title="block5_2_pp_one" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_pp_one.jpg?w=450&#038;h=337" alt="block5_2_pp_one" width="450" height="337" /></p>
<p>Much like the Two positive roots, the one positive root goes outward from the origin also. One difference is this one goes perfectly outward. The two root example seemed to have turned a little bit. This one looks as if there has been an explosion in the origin and everythings just shooting outward. This one also doesn&#8217;t seem to have that just one clear variant line where all the vectors point away from. Now to see what the one negative root would does.</p>
<p style="text-align:left;">(input was in yellow output gray):</p>
<p>________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>-4</p>
<p>b =</p>
<p>0</p>
<p>c =</p>
<p>-3</p>
<p>d =</p>
<p>-4</p>
<p>lambda1 =</p>
<p>-4</p>
<p>lambda2 =</p>
<p>-4</p>
<p>________________________________________________________________________________________</p>
<p>This random example gave us the random numbers to get one negative root. The root is -4. The linear equation is <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3A%3D%28-4x%2C-3x-4y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]:=(-4x,-3x-4y)' title='T[(x,y)]:=(-4x,-3x-4y)' class='latex' />.Now from this we get the two differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D-4x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=-4x' title='&#92;frac{dx}{dt}=-4x' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D-3x-4y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=-3x-4y' title='&#92;frac{dy}{dt}=-3x-4y' class='latex' /></p>
<p>The plot for these differential equations is as follows:</p>
<p><img class="aligncenter size-full wp-image-319" title="block5_2_nn_one" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_nn_one.jpg?w=450&#038;h=337" alt="block5_2_nn_one" width="450" height="337" /></p>
<p>Much like the two negative roots, the one negative root goes inward towards the origin. This one doesn&#8217;t seem to have that just one clear variant line where all the vectors point towards to. This plot kind of makes a sink towards the origin. Now that we see one negative roots goes towards the origin and one positive root goes away, we are going to examine the imaginary roots to see if we get the same results as the two root examples.</p>
<p style="text-align:left;">(input was in yellow output gray):</p>
<p>________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>2</p>
<p>b =</p>
<p>-5</p>
<p>c =</p>
<p>1</p>
<p>d =</p>
<p>0</p>
<p>lambda1 =</p>
<p>1.0000 + 2.0000i</p>
<p>lambda2 =</p>
<p>1.0000 &#8211; 2.0000i</p>
<p>________________________________________________________________________________________</p>
<p>This random example gave us the random numbers to get positive complex roots. The root are 1.0000 + 2.0000i and 1.0000 &#8211; 2.0000i. The linear equation is <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3A%3D%282x-5y%2Cx%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]:=(2x-5y,x)' title='T[(x,y)]:=(2x-5y,x)' class='latex' />.Now from this we get the two differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D-2x-5y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=-2x-5y' title='&#92;frac{dx}{dt}=-2x-5y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D-x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=-x' title='&#92;frac{dy}{dt}=-x' class='latex' /></p>
<p>The plot for these differential equations is as follows:</p>
<p><img class="aligncenter size-full wp-image-321" title="block5_2_pp_c" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_pp_c.jpg?w=450&#038;h=337" alt="block5_2_pp_c" width="450" height="337" /></p>
<p>This plot isn&#8217;t really like any of the other plots. There dosn&#8217;t seem to be any defined variant line and the vectors seem to be going counter clockwise in like a vortex shape. They still seem to be going away from the origin though. This as been true for all examples so far. Now lets find a negative complex root.</p>
<p style="text-align:left;">(input was in yellow output gray):</p>
<p>________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">Block5_1(0,0,0,0,0)</span></p>
<p>a =</p>
<p>-5</p>
<p>b =</p>
<p>-4</p>
<p>c =</p>
<p>4</p>
<p>d =</p>
<p>0</p>
<p>lambda1 =</p>
<p>-2.5000 + 3.1225i</p>
<p>lambda2 =</p>
<p>-2.5000 &#8211; 3.1225i</p>
<p>________________________________________________________________________________________</p>
<p>This random example gave us the random numbers to get negative complex roots. The root are -2.5000 + 3.1225i and -2.5000 &#8211; 3.1225i. The linear equation is <img src='http://s0.wp.com/latex.php?latex=T%5B%28x%2Cy%29%5D%3A%3D%28-5x-4y%2C4x%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='T[(x,y)]:=(-5x-4y,4x)' title='T[(x,y)]:=(-5x-4y,4x)' class='latex' />.Now from this we get the two differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D-5x-4y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=-5x-4y' title='&#92;frac{dx}{dt}=-5x-4y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3D4x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=4x' title='&#92;frac{dy}{dt}=4x' class='latex' /></p>
<p>The plot for these differential equations is as follows:</p>
<p><img class="aligncenter size-full wp-image-322" title="block5_2_nn_c" src="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_nn_c.jpg?w=450&#038;h=337" alt="block5_2_nn_c" width="450" height="337" /></p>
<p>This plot isn&#8217;t really like any of the other plots. There dosn&#8217;t seem to be any defined variant line and the vectors seem to be going clockwise in like a vortex shape. They still seem to be going towards the origin though. This as been true for all examples so far. So this seems positive = outward and negative = inward. This concludes the examples for this block.</p>
<h4 style="text-align:center;">Conclusion</h4>
<p>This was a quite extensive block. It took many examples to understand geometrically what was happening. We feel though that we have a good understanding in Linear Systems of Differential Equations. We first did our function to help make this block a little bit easier and then went on to solve one example for all possible outcomes.</p>
<p style="text-align:center;">
<p style="text-align:center;">
<p style="text-align:center;">
<p style="text-align:center;">
<p style="text-align:center;">
<p style="text-align:center;">
<p style="text-align:left;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joshuamoranmth212s09.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joshuamoranmth212s09.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joshuamoranmth212s09.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joshuamoranmth212s09.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joshuamoranmth212s09.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joshuamoranmth212s09.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joshuamoranmth212s09.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joshuamoranmth212s09.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joshuamoranmth212s09.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joshuamoranmth212s09.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joshuamoranmth212s09.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joshuamoranmth212s09.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joshuamoranmth212s09.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joshuamoranmth212s09.wordpress.com/241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=241&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joshuamoranmth212s09.wordpress.com/2009/04/03/block-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6510b6bc84fa204c7f245dada42d037?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jmoran1</media:title>
		</media:content>

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

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_v.jpg" medium="image">
			<media:title type="html">block5_1_v</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_11.jpg" medium="image">
			<media:title type="html">block5_11</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran_v1.jpg" medium="image">
			<media:title type="html">block5_1_ran_v1</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran.jpg" medium="image">
			<media:title type="html">block5_1_ran</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran2_v.jpg" medium="image">
			<media:title type="html">block5_1_ran2_v</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran31.jpg" medium="image">
			<media:title type="html">block5_1_ran31</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_1_ran3_v2.jpg" medium="image">
			<media:title type="html">block5_1_ran3_v2</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_pp_r2.jpg" medium="image">
			<media:title type="html">block5_2_pp_r2</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_nn_r1.jpg" medium="image">
			<media:title type="html">block5_2_nn_r1</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_np_r.jpg" medium="image">
			<media:title type="html">block5_2_np_r</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_pp_one.jpg" medium="image">
			<media:title type="html">block5_2_pp_one</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_nn_one.jpg" medium="image">
			<media:title type="html">block5_2_nn_one</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_pp_c.jpg" medium="image">
			<media:title type="html">block5_2_pp_c</media:title>
		</media:content>

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/04/block5_2_nn_c.jpg" medium="image">
			<media:title type="html">block5_2_nn_c</media:title>
		</media:content>
	</item>
		<item>
		<title>Fourth Block</title>
		<link>http://joshuamoranmth212s09.wordpress.com/2009/03/29/fourth-block/</link>
		<comments>http://joshuamoranmth212s09.wordpress.com/2009/03/29/fourth-block/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 17:18:58 +0000</pubDate>
		<dc:creator>jmoran1</dc:creator>
				<category><![CDATA[MTH212]]></category>

		<guid isPermaLink="false">http://joshuamoranmth212s09.wordpress.com/?p=193</guid>
		<description><![CDATA[Variables Separable Differential Equations This is a short block that was designed to address a simple class of differential equations that clearly have exact solutions. These are the variables separable differential equations. A Separable differential equation explanation can be found here. For this Block My partner (Mike Bosse) and I have two tasks. 1. Choose [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=193&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3 style="text-align:center;">Variables Separable Differential Equations</h3>
<p>This is a short block that was designed to address a simple class of differential equations that clearly have exact solutions. These are the variables separable differential equations.</p>
<p>A Separable differential equation explanation can be found<a href="http://tutorial.math.lamar.edu/Classes/DE/Separable.aspx"> here.</a></p>
<p>For this Block My partner (Mike Bosse) and I have two tasks.</p>
<p>1. Choose 6 examples (total) from pp. 24, 25, 26, problems 12-16 pp. 76-77 of the text and carry out the integrations in the variables separable method to obtain exact solutions for these differential equations.</p>
<p>2. In each case, compare your exact solution with that obtained using dsolve in MATLAB</p>
<p>Here are the 6 problems that we chose to analyze:</p>
<p>1,) <img src='http://s0.wp.com/latex.php?latex=4xydx+%2B+%28x%5E2+%2B+1%29dy+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='4xydx + (x^2 + 1)dy = 0' title='4xydx + (x^2 + 1)dy = 0' class='latex' /></p>
<p>4.) <img src='http://s0.wp.com/latex.php?latex=2x%28y%5E2+%2B+1%29dx%2B%28x%5E4+%2B+1%29dy%3D0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='2x(y^2 + 1)dx+(x^4 + 1)dy=0' title='2x(y^2 + 1)dx+(x^4 + 1)dy=0' class='latex' />     <img src='http://s0.wp.com/latex.php?latex=y%281%29%3D1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(1)=1' title='y(1)=1' class='latex' /></p>
<p>5.) <img src='http://s0.wp.com/latex.php?latex=xydx+%2B+%28x%2B1%29dy+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='xydx + (x+1)dy = 0' title='xydx + (x+1)dy = 0' class='latex' /></p>
<p>6.) <img src='http://s0.wp.com/latex.php?latex=%5Csqrt%7By%5E2+%2B+1%7Ddx+%3D+xydy&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;sqrt{y^2 + 1}dx = xydy' title='&#92;sqrt{y^2 + 1}dx = xydy' class='latex' /></p>
<p>9.) <img src='http://s0.wp.com/latex.php?latex=y%27+%3D+10%5E%7Bx%2By%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y&#039; = 10^{x+y}' title='y&#039; = 10^{x+y}' class='latex' /></p>
<p>11.) <img src='http://s0.wp.com/latex.php?latex=y%27+%3D+cos%28y-x%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y&#039; = cos(y-x)' title='y&#039; = cos(y-x)' class='latex' /></p>
<h4 style="text-align:center;">PROBLEM 1</h4>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=4xydx+%3D+%28x%5E2+%2B+1%29dy+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='4xydx = (x^2 + 1)dy = 0' title='4xydx = (x^2 + 1)dy = 0' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%28x%5E2+%2B+1%29dy+%3D+-4xydx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(x^2 + 1)dy = -4xydx' title='(x^2 + 1)dy = -4xydx' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B1%7D%7By%7D%5Cfrac%7Bdy%7D%7Bdx%7D+%3D+-4x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{1}{y}&#92;frac{dy}{dx} = -4x' title='&#92;frac{1}{y}&#92;frac{dy}{dx} = -4x' class='latex' /></p>
<p>Now let’s integrate both sides with respect to x:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cint+%5Cfrac%7B1%7D%7By%7D%5Cfrac%7Bdy%7D%7Bdx%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int &#92;frac{1}{y}&#92;frac{dy}{dx}dx' title='&#92;int &#92;frac{1}{y}&#92;frac{dy}{dx}dx' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=%5Cint+%5Cfrac%7B-4x%7D%7B%28x%5E2%2B1%29%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int &#92;frac{-4x}{(x^2+1)}dx' title='&#92;int &#92;frac{-4x}{(x^2+1)}dx' class='latex' /></p>
<p>So once we have this we can simplify the problem by canceling out the <img src='http://s0.wp.com/latex.php?latex=dx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='dx' title='dx' class='latex' /> on the left hand side and then performing a U-Substitution:</p>
<p>Lets let <img src='http://s0.wp.com/latex.php?latex=u+%3D+x%5E2%2B1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='u = x^2+1' title='u = x^2+1' class='latex' /> for the right side of the problem so:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=lny+%3D+C1+%3D+-2ln%28x%5E2+%2B+1%29+%2B+C2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='lny = C1 = -2ln(x^2 + 1) + C2' title='lny = C1 = -2ln(x^2 + 1) + C2' class='latex' /></p>
<p>Now that we see this we can represent the sides by e and then solve for y:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y%3D%28e%5E%7Bln%28x%5E2%2B1%29%7D%29%5E%28-2%29%2Ae%5E%7BC%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y=(e^{ln(x^2+1)})^(-2)*e^{C}' title='y=(e^{ln(x^2+1)})^(-2)*e^{C}' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y+%3D+%5Cfrac%7BC%7D%7B%28x%5E2%2B1%29%5E%7B2%7D%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y = &#92;frac{C}{(x^2+1)^{2}}' title='y = &#92;frac{C}{(x^2+1)^{2}}' class='latex' /></p>
<p style="text-align:left;">Now all we need to do is show our results for dsolve. From previous blocks, we know that the dsolve method should give us an exact solution of what the problem should come out to be. Here is what we got when we typed the equation into MATLAB:</p>
<p style="text-align:left;">_______________________________________________________</p>
<p style="text-align:left;"><span style="color:#ffff00;">dsolve(’Dy=(-4*x*y)/(x^2+1)’,&#8217;x’)<br />
ans =<br />
C10/(x^2 + 1)^2</span></p>
<p style="text-align:left;">_______________________________________________________</p>
<p style="text-align:left;">As you can see they are the same answer. The answers don&#8217;t look exactly the same because of C10. But that is just a basic constant that is replaced by C in our equation.</p>
<h4 style="text-align:center;">PROBLEM 2</h4>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=tan%28x%29dy+%2B+2ydx+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='tan(x)dy + 2ydx = 0' title='tan(x)dy + 2ydx = 0' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=tan%28x%29dy+%3D+-2ydx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='tan(x)dy = -2ydx' title='tan(x)dy = -2ydx' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B1%7D%7B-2y%7D%5Cfrac%7Bdy%7D%7Bdx%7D+%3D+%5Cfrac%7B1%7D%7Btan%28x%29%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{1}{-2y}&#92;frac{dy}{dx} = &#92;frac{1}{tan(x)}' title='&#92;frac{1}{-2y}&#92;frac{dy}{dx} = &#92;frac{1}{tan(x)}' class='latex' /></p>
<p>Now we have to integrate both side by x to move on to the next step of the equation:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cint+%5Cfrac%7B1%7D%7B-2y%7Ddy+%3D+%5Cint+%5Cfrac%7B1%7D%7Btan%28x%29%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int &#92;frac{1}{-2y}dy = &#92;int &#92;frac{1}{tan(x)}dx' title='&#92;int &#92;frac{1}{-2y}dy = &#92;int &#92;frac{1}{tan(x)}dx' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=-%5Cfrac%7B1%7D%7B2%7Dlny+%2B+C1+%3D+%5Cint+%5Cfrac%7Bcos%28x%29%7D%7Bsin%28x%29%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-&#92;frac{1}{2}lny + C1 = &#92;int &#92;frac{cos(x)}{sin(x)}dx' title='-&#92;frac{1}{2}lny + C1 = &#92;int &#92;frac{cos(x)}{sin(x)}dx' class='latex' /></p>
<p>A U-Substitution is needed in order to simplify the problem so lets let <img src='http://s0.wp.com/latex.php?latex=u+%3D+sin%28x%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='u = sin(x)' title='u = sin(x)' class='latex' /> so if we do this we get <img src='http://s0.wp.com/latex.php?latex=du+%3D+cos%28x%29dx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='du = cos(x)dx' title='du = cos(x)dx' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=lny+%2B+C1+%3D+-2ln%28sin%28x%29%29+%2B+C2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='lny + C1 = -2ln(sin(x)) + C2' title='lny + C1 = -2ln(sin(x)) + C2' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y+%3D+%5Cfrac%7BC%7D%7B%28sin%28x%29%29%5E%7B2%7D%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y = &#92;frac{C}{(sin(x))^{2}}' title='y = &#92;frac{C}{(sin(x))^{2}}' class='latex' /></p>
<p>As you can see we let the sides again be the base e to simplify the problem to the final answer above where C again is represented as a constant.</p>
<p>Now that we have our final answer we can move onto the Dsolve method.  Here is the code that we entered into MATLAB in order to get the exact solution:</p>
<p>_______________________________________________________</p>
<p><span style="color:#ffff00;">dsolve(’Dy=(-2*y*cos(x))/(sin(x))’,&#8217;x’)<br />
ans =<br />
C14/sin(x)^2</span></p>
<p>_______________________________________________________</p>
<p>As you can see they were the same exact solution except for the same constant value representation. Overall the U-Substition method has worked well in solving most of these integrations.</p>
<h4 style="text-align:center;">PROBLEM 5</h4>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=xydx+%2B+%28x+%2B+1%29dy+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='xydx + (x + 1)dy = 0' title='xydx + (x + 1)dy = 0' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%28x+%2B+1%29dy+%3D+-xydx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(x + 1)dy = -xydx' title='(x + 1)dy = -xydx' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B1%7D%7By%7D%5Cfrac%7Bdy%7D%7Bdx%7D+%3D+%5Cfrac%7B-x%7D%7Bx%2B1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{1}{y}&#92;frac{dy}{dx} = &#92;frac{-x}{x+1}' title='&#92;frac{1}{y}&#92;frac{dy}{dx} = &#92;frac{-x}{x+1}' class='latex' /></p>
<p>Just as before, we are going to integrate both sides with respect to x in order to get <img src='http://s0.wp.com/latex.php?latex=dx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='dx' title='dx' class='latex' /> from the left side and so we can have our seperable variables to solve:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cint+%5Cfrac%7B1%7D%7By%7D%5Cfrac%7Bdy%7D%7Bdx%7Ddx+%3D+%5Cint+%5Cfrac%7B-x%7D%7Bx%2B1%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int &#92;frac{1}{y}&#92;frac{dy}{dx}dx = &#92;int &#92;frac{-x}{x+1}dx' title='&#92;int &#92;frac{1}{y}&#92;frac{dy}{dx}dx = &#92;int &#92;frac{-x}{x+1}dx' class='latex' /></p>
<p>Now we can rewrite the equation for a possible U-Substition:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=lny+%2B+C1+%3D+%5Cint+%5Cfrac%7B-x%7D%7Bx%2B1%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='lny + C1 = &#92;int &#92;frac{-x}{x+1}dx' title='lny + C1 = &#92;int &#92;frac{-x}{x+1}dx' class='latex' /></p>
<p>For this we used the U-Substitution method where we can represnt <img src='http://s0.wp.com/latex.php?latex=u+%3D+x+%2B+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='u = x + 1' title='u = x + 1' class='latex' />. Then we can solve for <img src='http://s0.wp.com/latex.php?latex=du&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='du' title='du' class='latex' /> and since <img src='http://s0.wp.com/latex.php?latex=du+%3D+dx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='du = dx' title='du = dx' class='latex' />, we can solve for what x is going to be. (<img src='http://s0.wp.com/latex.php?latex=x+%3D+u+-+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x = u - 1' title='x = u - 1' class='latex' />) Once we do all this, we get the following equation:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=lny+%2B+C1+%3D+-%28x+%2B+1%29+%2B+ln%28x+%2B+1%29+%2B+C2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='lny + C1 = -(x + 1) + ln(x + 1) + C2' title='lny + C1 = -(x + 1) + ln(x + 1) + C2' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y+%3D+e%5E%7B-x-1%2Bln%28x%2B1%29%2BC%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y = e^{-x-1+ln(x+1)+C}' title='y = e^{-x-1+ln(x+1)+C}' class='latex' /></p>
<p>Now all we have to do is simplify this into an equation where we can get rid of the natural log in order to produce the explicit solution:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y+%3D+C%2Ae%5E%7Blog%28x%2B1%29-x%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y = C*e^{log(x+1)-x}' title='y = C*e^{log(x+1)-x}' class='latex' /></p>
<p>Now that we have solved this problem using the U-Substition method we can now check our answer with the Dsolve method used in MATLAB. Here is what we typed in and what we received as an explicit solution.</p>
<p>_______________________________________________________</p>
<p><span style="color:#ffff00;">dsolve(&#8216;Dy=(-x*y)/(x+1)&#8217;,'x&#8217;)<br />
ans =<br />
C4*exp(log(x + 1) &#8211; x)</span></p>
<p>_______________________________________________________</p>
<p>So as we can see our answers were exactly the same as the dsolve method. With this we still know that the U-Substitution method is still the correct approach to these integrals.</p>
<h4 style="text-align:center;">PROBLEM 6</h4>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Csqrt%5B%5D%7By%5E2+%2B+1%7Ddx+%3D+xydy&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;sqrt[]{y^2 + 1}dx = xydy' title='&#92;sqrt[]{y^2 + 1}dx = xydy' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=xydy+%3D+%5Csqrt%5B%5D%7By%5E2+%2B+1%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='xydy = &#92;sqrt[]{y^2 + 1}dx' title='xydy = &#92;sqrt[]{y^2 + 1}dx' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7By%7D%7B%5Csqrt%5B%5D%7By%5E2+%2B+1%7D%7D%5Cfrac%7Bdy%7D%7Bdx%7D+%3D+%5Cfrac%7B1%7D%7Bx%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{y}{&#92;sqrt[]{y^2 + 1}}&#92;frac{dy}{dx} = &#92;frac{1}{x}' title='&#92;frac{y}{&#92;sqrt[]{y^2 + 1}}&#92;frac{dy}{dx} = &#92;frac{1}{x}' class='latex' /></p>
<p>We are going to integrate with respect to x. This will cancel out the <img src='http://s0.wp.com/latex.php?latex=dx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='dx' title='dx' class='latex' /> on the left hand side which makes it easier to get to the U-Substitution process :</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cint+%5Cfrac%7By%7D%7B%5Csqrt%5B%5D%7By%5E2+%2B+1%7D%7D%5Cfrac%7Bdy%7D%7Bdx%7Ddx+%3D+%5Cint+%5Cfrac%7B1%7D%7Bx%7Ddx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int &#92;frac{y}{&#92;sqrt[]{y^2 + 1}}&#92;frac{dy}{dx}dx = &#92;int &#92;frac{1}{x}dx' title='&#92;int &#92;frac{y}{&#92;sqrt[]{y^2 + 1}}&#92;frac{dy}{dx}dx = &#92;int &#92;frac{1}{x}dx' class='latex' /></p>
<p>Now we can use the U_Substitution method to get rid of the integrals. We let <img src='http://s0.wp.com/latex.php?latex=u+%3D+%5Csqrt%5B%5D%7By%5E2+%2B+1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='u = &#92;sqrt[]{y^2 + 1}' title='u = &#92;sqrt[]{y^2 + 1}' class='latex' />, so now we can solve for our du so <img src='http://s0.wp.com/latex.php?latex=du+%3D+%5Cfrac%7By%7D%7B%5Csqrt%5B%5D%7By%5E2+%2B1%7D%7Ddy&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='du = &#92;frac{y}{&#92;sqrt[]{y^2 +1}}dy' title='du = &#92;frac{y}{&#92;sqrt[]{y^2 +1}}dy' class='latex' /></p>
<p>Now that we have a understanding of what our U-Substition is going to be we can now proceed to solve the problem by plugging in the U-Substitution:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Csqrt%5B%5D%7By%5E2+%2B+1%7D+%3D+lnx+%2B+C&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;sqrt[]{y^2 + 1} = lnx + C' title='&#92;sqrt[]{y^2 + 1} = lnx + C' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y%5E2+%3D+%28lnx+%2B+C%29%5E2+-+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y^2 = (lnx + C)^2 - 1' title='y^2 = (lnx + C)^2 - 1' class='latex' /></p>
<p>Now you can see here that we have to take the square root of the right side in order to get rid of the <img src='http://s0.wp.com/latex.php?latex=y%5E2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y^2' title='y^2' class='latex' /> so we are going to get a plus &#8211; minus situation:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y+%3D+%5Cpm%5Csqrt%5B%5D%7B%28lnx+%2B+C%29%5E2+-+1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y = &#92;pm&#92;sqrt[]{(lnx + C)^2 - 1}' title='y = &#92;pm&#92;sqrt[]{(lnx + C)^2 - 1}' class='latex' /></p>
<p>As you can see we now have a solution that looks like it is in it’s simplest form.  We can now move onto the Dsolve method in order to check if our solution is that same as the explicit solution of Dsolve. So here is what we entered into MATLAB and what we got out as a result:</p>
<p>_______________________________________________________</p>
<p><span style="color:#ffff00;">dsolve(&#8216;Dy=(sqrt(y^2+1))/(x*y)&#8217;,'x&#8217;)<br />
ans =<br />
-((C17 + log(x))^2 &#8211; 1)^(1/2)<br />
((C17 + log(x))^2 &#8211; 1)^(1/2)<br />
i<br />
-i</span></p>
<p>_______________________________________________________</p>
<p>As you can see both of our solutions that we obtained came out to be the same. Because of this e know that the U-Substitution method was the correct method to use in order to solve for the integration and to reach the explicit solution.</p>
<h4 style="text-align:center;">PROBLEM 10</h4>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=x%5Cfrac%7Bdx%7D%7Bdt%7D+%2B+t+%3D+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x&#92;frac{dx}{dt} + t = 1' title='x&#92;frac{dx}{dt} + t = 1' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=x%5Cfrac%7Bdx%7D%7Bdt%7D+%3D+1+-+t&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x&#92;frac{dx}{dt} = 1 - t' title='x&#92;frac{dx}{dt} = 1 - t' class='latex' /></p>
<p>We are going to integrate both sides with respect to t (instead of x) in order to cancel out <img src='http://s0.wp.com/latex.php?latex=dt&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='dt' title='dt' class='latex' /> on the left hand side (which will make it easier to solve for the integration):</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cint+x%5Cfrac%7Bdx%7D%7Bdt%7Ddt+%3D+%5Cint+%281+-+t%29dt&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int x&#92;frac{dx}{dt}dt = &#92;int (1 - t)dt' title='&#92;int x&#92;frac{dx}{dt}dt = &#92;int (1 - t)dt' class='latex' /></p>
<p>Now rewritte in order to make the integral less complicated:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cint+xdx+%3D+%5Cint+%281+-+t%29dt&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int xdx = &#92;int (1 - t)dt' title='&#92;int xdx = &#92;int (1 - t)dt' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bx%5E2%7D%7B2%7D+%3D+t+-+%5Cfrac%7Bt%5E2%7D%7B2%7D+%2B+C&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{x^2}{2} = t - &#92;frac{t^2}{2} + C' title='&#92;frac{x^2}{2} = t - &#92;frac{t^2}{2} + C' class='latex' /></p>
<p>Now we simplify this in order to get to the lowest possible form of the explicit solution:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=x%5E2+%3D+2%2A%28%28t+-+%5Cfrac%7Bt%5E2%7D%7B2%7D%29+%2B+C%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x^2 = 2*((t - &#92;frac{t^2}{2}) + C)' title='x^2 = 2*((t - &#92;frac{t^2}{2}) + C)' class='latex' /></p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=x+%3D+%5Cpm%5Csqrt%5B%5D%7B2%7D%2A%5Csqrt%5B%5D%7BC+-+%5Cfrac%7Bt%5E2+-+2t%7D%7B2%7D%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x = &#92;pm&#92;sqrt[]{2}*&#92;sqrt[]{C - &#92;frac{t^2 - 2t}{2}}' title='x = &#92;pm&#92;sqrt[]{2}*&#92;sqrt[]{C - &#92;frac{t^2 - 2t}{2}}' class='latex' /></p>
<p>Our answer varied from MATLAB at first because what it did was make that <img src='http://s0.wp.com/latex.php?latex=t%5E2+-+2t&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='t^2 - 2t' title='t^2 - 2t' class='latex' /> as <img src='http://s0.wp.com/latex.php?latex=t%5E2+-+2t+%2B+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='t^2 - 2t + 1' title='t^2 - 2t + 1' class='latex' /> so they could factor the problem and make it easier. They used this <img src='http://s0.wp.com/latex.php?latex=%28x+-+1%29%5E2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='(x - 1)^2' title='(x - 1)^2' class='latex' />. We know they did this because the 1 factors out as a constant with the others. So this is what we attained as an aswer:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=x+%3D+%5Cpm%5Csqrt%5B%5D%7B2%7D%2A%5Csqrt%5B%5D%7BC+-+%5Cfrac%7B%28t+-+1%29%5E2%7D%7B2%7D%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x = &#92;pm&#92;sqrt[]{2}*&#92;sqrt[]{C - &#92;frac{(t - 1)^2}{2}}' title='x = &#92;pm&#92;sqrt[]{2}*&#92;sqrt[]{C - &#92;frac{(t - 1)^2}{2}}' class='latex' /></p>
<p>Now all we have left to do is use the Dsolve function in order to see if the MATLAB gets the same explicit solution.  This is what we typed into MATLAB and what it produced:</p>
<p>_______________________________________________________</p>
<p><span style="color:#ffff00;">dsolve(&#8216;Dy=(1-t)/(x)&#8217;,'t&#8217;)<br />
ans =<br />
2^(1/2)*(C21 &#8211; (t &#8211; 1)^2/2)^(1/2)<br />
-2^(1/2)*(C21 &#8211; (t &#8211; 1)^2/2)^(1/2</span></p>
<p>_______________________________________________________</p>
<p>Overall we can see that both of the explicit solution are the same and the method of integration worked out well the way we performed it.</p>
<h4 style="text-align:center;">PROBLEM 16</h4>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=x%5Cfrac%7Bdy%7D%7Bdx%7D+%2B+y+%3D+y%5E2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x&#92;frac{dy}{dx} + y = y^2' title='x&#92;frac{dy}{dx} + y = y^2' class='latex' /></p>
<p>First we begin to solve the problem by first seperating the variables to each side.</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=xdy+%3D+y%5E2+-+ydx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='xdy = y^2 - ydx' title='xdy = y^2 - ydx' class='latex' /></p>
<p>Now our variables are seperated and we can start our integration process:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=%5Cint+xdy+%3D+%5Cint+y%5E2+-+ydx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;int xdy = &#92;int y^2 - ydx' title='&#92;int xdy = &#92;int y^2 - ydx' class='latex' /></p>
<p>To solve for the integration we can simplify the problem:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=xy+%3D+x%28y%5E2+-+y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='xy = x(y^2 - y)' title='xy = x(y^2 - y)' class='latex' /></p>
<p>So all we do now is solve for our variable y:</p>
<p style="text-align:center;"><img src='http://s0.wp.com/latex.php?latex=y+%3D+%5Cfrac%7B1%7D%7B1+%2B+x%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y = &#92;frac{1}{1 + x}' title='y = &#92;frac{1}{1 + x}' class='latex' /></p>
<p>Now all we have left to do is use the Dsolve function in order to see if the MATLAB gets the same explicit solution.  This is what we typed into MATLAB and what it produced:</p>
<p>_______________________________________________________</p>
<p><span style="color:#ffff00;">dsolve(’ Dy= (y^2-y)/x’,’x’)</span></p>
<p><span style="color:#ffff00;">ans=</span></p>
<p><span style="color:#ffff00;">C1*1/1+x</span></p>
<p>_______________________________________________________</p>
<p>As you can see we get the same answer just the constant in our factored out when we solved for y.</p>
<h4 style="text-align:center;">Conclusion</h4>
<p>Overall we can see this was a very good chance to improve our integration skills. We feel more comfortable with the integration process. It made us use a lot of what we learned through calculus. Overall a very good block and glad we did it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joshuamoranmth212s09.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joshuamoranmth212s09.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joshuamoranmth212s09.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joshuamoranmth212s09.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joshuamoranmth212s09.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joshuamoranmth212s09.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joshuamoranmth212s09.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joshuamoranmth212s09.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joshuamoranmth212s09.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joshuamoranmth212s09.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joshuamoranmth212s09.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joshuamoranmth212s09.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joshuamoranmth212s09.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joshuamoranmth212s09.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=193&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joshuamoranmth212s09.wordpress.com/2009/03/29/fourth-block/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6510b6bc84fa204c7f245dada42d037?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jmoran1</media:title>
		</media:content>
	</item>
		<item>
		<title>Third Block</title>
		<link>http://joshuamoranmth212s09.wordpress.com/2009/03/04/third-block/</link>
		<comments>http://joshuamoranmth212s09.wordpress.com/2009/03/04/third-block/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 13:45:47 +0000</pubDate>
		<dc:creator>jmoran1</dc:creator>
				<category><![CDATA[MTH212]]></category>

		<guid isPermaLink="false">http://joshuamoranmth212s09.wordpress.com/?p=158</guid>
		<description><![CDATA[Systems of Non-Linear Differential Equations In this Block my partner and I (Mike Bosse) are going to address a major issue in using differential equations to model physical or biological phenomena: the nature of the solution curves to a system of coupled non-linear differential equations. These types of systems of differential equations arise in most [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=158&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Systems of Non-Linear Differential Equations</h1>
<p>In this Block my partner and I (Mike Bosse) are going to address a major issue in using differential equations to model physical or biological phenomena: the nature of the solution curves to a system of coupled non-linear differential equations. These types of systems of differential equations arise in most serious modeling of physical and biological phenomena. There are very few known exact methods of solution for these systems of differential equations. As a result, people working with these types of systems of differential equations have to resort to numerical methods for obtaining approximations to solution curves.</p>
<h3 style="text-align:center;">Edward Lorenz</h3>
<p><img class="aligncenter size-full wp-image-162" title="edward_lorenz" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/edward_lorenz.jpg?w=450" alt="edward_lorenz"   /></p>
<p>Edward Lorenz (May 23, 1917 &#8211; April 16th, 2008) he was known as one of the most famous mathematicians, and meteorologists  and the founder of his own theory known as the “Chaos Theory”, and from there he discovered his famous butterfly effect. Edward lorenz graduated from Harvard University in Cambridge, Massachusetts. His main love was weather where he worked in the army air corps as a weather forecaster. After his time in the army he became a professor at MIT until he died in his home at the age of 90 due to the deadly fatal disease known as cancer. Once he was in his chaos theory he noticed that his results were varying all over the place and through his work he came up with these three equations and they are known as his system of differential equations.</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D%3D%5Csigma%28y-x%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt}=&#92;sigma(y-x)' title='&#92;frac{dx}{dt}=&#92;sigma(y-x)' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D%3Dx%28%5Crho-z%29-y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt}=x(&#92;rho-z)-y' title='&#92;frac{dy}{dt}=x(&#92;rho-z)-y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdz%7D%7Bdt%7D%3Dxy-%5Cbeta+&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dz}{dt}=xy-&#92;beta ' title='&#92;frac{dz}{dt}=xy-&#92;beta ' class='latex' /></p>
<p>First thing that we need to do is clearly understand the objective of the block at hand so here I will give you the exact assignment objective that we received:</p>
<p>Objective:</p>
<ol>
<li> Explore how exact solutions to first order differential equations differ Euler approximations.</li>
<li> Experiment with Euler approximations to the Lorenz equations for various parameter values and initial conditions.</li>
<li>Choose one of the following:</li>
</ol>
<ul>
<li>The Lotka -Volterra predator prey equations  where y is the number of predators,  x is the number of prey,and α, β, γ, δ are paramaters that tune the interaction of the predators and prey.</li>
<li>Explore solutions of the predator-prey equations for varying paramater values and initial conditions.</li>
<li>Explore the behavior of the Rossler system of differential equations  <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D+%3D+-y-z+&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt} = -y-z ' title='&#92;frac{dx}{dt} = -y-z ' class='latex' />, <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%3D+x%2Bay&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} = x+ay' title='&#92;frac{dy}{dt} = x+ay' class='latex' />, <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdz%7D%7Bdt%7D+%3D+b%2Bz%2A%28x-c%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dz}{dt} = b+z*(x-c)' title='&#92;frac{dz}{dt} = b+z*(x-c)' class='latex' />  for various paramater values and initial conditions.</li>
</ul>
<p>First we are going to start off by exploring how exact solutions to first order differential equations differ from Euler approximations. As a starting point for Euler&#8217;s Method, we obtained code for MATLAB from Gary Davis. There was no problem with this code, but it just didn&#8217;t produce the kind of graphs we were looking for. We wanted one Plot in which we could see both the two dimensional plot and the three dimensional. We obtained this by using a MATLAB function called subplot. What subplot does is takes the amount of plots you want and graphs them in one area. The following is the combination of Gary&#8217;s code and subplot that we used.</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">% Euler’s method for a system of differential equations.<br />
% The differential equations are dy/dt = f(t,y) where y is a vector of unknown functions.<br />
function [ t, y ] = euler_system( f, t_range, y_initial, nstep )<br />
% We set a range of time values, from t(1) to t(2).<br />
t(1) = t_range(1);<br />
% We define dt by dividing the time range into an equal number of specified steps.<br />
dt = ( t_range(2) &#8211; t_range(1) ) / nstep;<br />
% We set the initial value of the vector y at the beginning time t(1).<br />
y(:,1) = y_initial;<br />
% We use Euler’s method to update the value of y at new time steps.<br />
% “feval” is used instead of “eval” because we are passing the name of f to the program.<br />
for i = 1 : nstep<br />
t(i+1) = t(i) + dt;<br />
y(:,i+1) = y(:,i) + dt * feval ( f, t(i), y(:,i) );<br />
end<br />
% The following command plots the components of y as functions of t.<br />
subplot(2,1,1);plot(t,y)<br />
% We also want a 3D plot of the vector components as they vary with t.<br />
subplot(2,1,2);plot3(y(1, : ) ,y(2, : ) ,y(3,: )</span></address>
<address>__________________________________________________________________________________________</address>
<p style="text-align:left;">
<p>Now we are going to use this code towards a system of differential equations. We are going to apply Euler’s method to do the Lorenz equations. We first need to create an m. file document that will be able to process Euler’s method with a simple line of code. For our code we will be using the current values.</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Csigma%3D+16&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;sigma= 16' title='&#92;sigma= 16' class='latex' />   <img src='http://s0.wp.com/latex.php?latex=%5Crho+%3D+30&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;rho = 30' title='&#92;rho = 30' class='latex' />    <img src='http://s0.wp.com/latex.php?latex=%5Cbeta+%3D+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;beta = 1' title='&#92;beta = 1' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=y%281%29%3Dx&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(1)=x' title='y(1)=x' class='latex' />   <img src='http://s0.wp.com/latex.php?latex=y%282%29%3Dy&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(2)=y' title='y(2)=y' class='latex' />     <img src='http://s0.wp.com/latex.php?latex=y%283%29%3Dz&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(3)=z' title='y(3)=z' class='latex' /></p>
<p>Now that we have the values we can make our .m file. We called the .m file lorenz_system. The following is our lorwnz_system:</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">function yprime = lorenz_system ( t, y )<br />
yprime = [ 16.0* (y(2)-y(1)); y(1)*(30.0-y(3))-y(2);y(1)*y(2)-1*y(3)];</span></address>
<p>___________________________________________________________________________________________</p>
<p>With this file and with the following MATLAB code we are able to plot our lorenz_system</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">y_init = [ .2; .7; .10];</span></address>
<address><span style="color:#ffff00;">[ t, y ] = euler_system ( ‘lorenz_system’, [ 0.0, 25.0 ], y_init, 2500 );</span></address>
<p>___________________________________________________________________________________________</p>
<p>As a result from the following MATLAB commands, we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-178" title="graph-1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/graph-1.jpg?w=450&#038;h=344" alt="graph-1" width="450" height="344" /></p>
<p>Now that we have set y values, we are going to try random y values.</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">y_init = [ rand(); rand(); rand() ];<br />
[ t, y ] = euler_system ( &#8216;lorenz_system&#8217;, [ 0.0, 20.0 ], y_init, 1000 )</span></address>
<p>___________________________________________________________________________________________</p>
<p>As a result from the following MATLAB commands, we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-180" title="random20example1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/random20example1.jpg?w=450&#038;h=336" alt="random20example1" width="450" height="336" />To see if we get something simialar again, we tried the same MATLAB commands and got the following:</p>
<p><img class="aligncenter size-full wp-image-181" title="random20example21" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/random20example21.jpg?w=450&#038;h=336" alt="random20example21" width="450" height="336" /></p>
<p>Overall you can see that our two random examples look very alike forming the same vortex shape while our set y values seems to be quite different.</p>
<p>Now that we see how Euler&#8217;s plots Lorenz equations, we will now use our next method we learned.This method is known as ODE45.</p>
<h4>ODE45</h4>
<p>As a result from our last block we saw that the Ode45 method was actually more acurate, where as Euler’s method always seemed to branch off near the end of the plot. So first for Ode45 we copied code from Gary and put it in an m.file  that we called g.m:</p>
<p>______________________________________________________________________________________</p>
<address><span style="color:#ffff00;"><code>function xdot = g(t,x)<br />
xdot = zeros(3,1);<br />
sig = 16.0;<br />
rho = 30.0;<br />
bet = 1;<br />
xdot(1) = sig*(x(2)-x(1));<br />
xdot(2) = rho*x(1)-x(2)-x(1)*x(3);<br />
xdot(3) = x(1)*x(2)-bet*x(3);</code></span></address>
<p>_______________________________________________________________________________________</p>
<p>Now that we have this we needed to create another m.file to show how the lorenz system would work. So we created another m.file called lorenz_demo and here is line of code that we created for that:</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;"><code>function lorenz_demo(time)<br />
% Usage: lorenz_demo(time)<br />
% time=end point of time interval<br />
% This function integrates the lorenz attractor<br />
% from t=0 to t=time<br />
[t,x] = ode45(’g’,[0 time],[1;2;3]);<br />
disp(’If you like Differential Equations press any key..’)<br />
pause<br />
plot3(x(:,1),x(:,2),x(:,3))<br />
print -deps lorenz.eps</code></span></address>
<address>_______________________________________________________________________________________</address>
<address> </address>
<p>Now that we have created this, we are able to run the file in MATLAB. The following is the MATLAB command:</p>
<p>_______________________________________________________________________________________</p>
<address><span style="color:#ffff00;">lorenz_demo(200);</span><br />
</address>
<p>_______________________________________________________________________________________</p>
<p>As a result form the the following command we get the following:</p>
<p><img class="aligncenter size-full wp-image-183" title="ode45_1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/ode45_1.jpg?w=450&#038;h=336" alt="ode45_1" width="450" height="336" />As you can see the graph had formed a shape almost as if it was a butterfly shape. We can really see how the graphs can be so random. We decided to do this procedure one more time with different numbers for our initial conditions. The following is the g.m file we used as our initial conditions:</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">function xdot = g(t,x)<br />
xdot = zeros(3,1);<br />
sig = 12.0;<br />
rho = 23.0;<br />
bet = 7.0;<br />
xdot(1) = sig*(x(2)-x(1));<br />
xdot(2) = rho*x(1)-x(2)-x(1)*x(3);<br />
xdot(3) = x(1)*x(2)-bet*x(3);</span></address>
<p>__________________________________________________________________________________________</p>
<p>Now doing the same command form before (&#8220;<span style="color:#ffff00;">lorenz_demo(200);</span>&#8220;) but using this new g file we get the following plot:</p>
<p><img class="aligncenter size-full wp-image-184" title="ode45_2" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/ode45_2.jpg?w=450&#038;h=336" alt="ode45_2" width="450" height="336" />Here we can see we have a completly different plot where we can see this one alost forms the shape of a spiral which is close to the vorex but not in the same manner.</p>
<h4>Rossler System of Differential Equations</h4>
<p>My partner and I decided to do the rossler system of equations because we saw this as a good example to clearly understand the works of the rossler system. Also we thought we would understand the calculations that involved x,y,and z as components. Here are the formulas for the rossler system of equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D+%3D+-y-z&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dx}{dt} = -y-z' title='&#92;frac{dx}{dt} = -y-z' class='latex' /> ,<img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%3D+x%2Bay&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dy}{dt} = x+ay' title='&#92;frac{dy}{dt} = x+ay' class='latex' />,<img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdz%7D%7Bdt%7D+%3D+b%2Bz%2A%28x-c%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{dz}{dt} = b+z*(x-c)' title='&#92;frac{dz}{dt} = b+z*(x-c)' class='latex' /></p>
<p>Now since we have a clear understanding of the equations we can create an m.file to represent the rossler system and one for the lorenz system. These files are known as Rossler_system.m and the other known as Lorenz_system.m. Now that we have this we can create our initial parameters as.</p>
<p><img src='http://s0.wp.com/latex.php?latex=a%3D0.3&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='a=0.3' title='a=0.3' class='latex' />  <img src='http://s0.wp.com/latex.php?latex=b%3D0.3&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='b=0.3' title='b=0.3' class='latex' />  <img src='http://s0.wp.com/latex.php?latex=c%3D8&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='c=8' title='c=8' class='latex' /></p>
<p>Using this information we can now create our Rossler_system.m file.</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">function yprime = rossler_system ( t, y )</span></address>
<address><span style="color:#ffff00;">yprime = [ (-y(2)-y(3)); y(1)+(.3*y(2)); .3+y(3)*(y(1)-8) ];</span></address>
<p>__________________________________________________________________________________________</p>
<p>For this part of the Block. We found that ploting both the 2-D and 3-D plots were unneccary. So we edited our code so that our euler_system function would only plot in 3-D. All we did was comment out the 2-D plot by putting a % sign in front of that current line. The following is the MATLAB function we used to plot:</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">y_init=[.4;1.2;.8];<br />
[ t, y ] = euler_system ( ‘rossler_system’, [ 0.0, 500.0 ], y_init, 10000 );</span></address>
<p>__________________________________________________________________________________________</p>
<p>As a result form the following command we get the following plot:<br />
<img class="aligncenter size-full wp-image-187" title="russ_11" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/russ_11.jpg?w=450&#038;h=356" alt="russ_11" width="450" height="356" />Now, just like before, we are going to plot two more examples using random y initial values and see if they vary in any way. Here is the formula for the random examples and the plots to follow:</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">y_init = [ rand(); rand(); rand() ];<br />
[ t, y ] = euler_system ( ‘rossler_system’, [ 0.0, 400.0 ], y_init, 10000 );</span></address>
<p>__________________________________________________________________________________________</p>
<p>RANDOM 1:</p>
<p><img class="aligncenter size-full wp-image-188" title="russ_2" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/russ_2.jpg?w=450&#038;h=356" alt="russ_2" width="450" height="356" /></p>
<p>RANDOM 2:<img class="aligncenter size-full wp-image-189" title="russ_3" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/russ_3.jpg?w=450&#038;h=356" alt="russ_3" width="450" height="356" /></p>
<p>As you can see we had the graphs vary only by the number of lines in each other and the amount of spacing in between the lines. This is because of the inital conditions that were given in the two random examples. We can now see how the Rossler equation can vary when using random numbers.</p>
<p>Now lets do the Ode45 method for the Rossler system of equations. Here is our new lorenz_demo function that we will use for this part of the Block:</p>
<p>_________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">function lorenz_demo(time)<br />
% Usage: rossler_demo(time)<br />
% time=end point of time interval<br />
% This function integrates the lorenz attractor<br />
% from t=0 to t=time<br />
[t,x] = ode45(’h&#8217;,[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 lorenz.eps</span></address>
<p>_________________________________________________________________________________________</p>
<p>In order for this function to work we needed to create a .m file with our initial condition values in which we called h.m:</p>
<p>_________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">function xdot = h(t,x)<br />
xdot = zeros(3,1);<br />
a = .3;<br />
b = .3;<br />
c = 8;<br />
xdot(1) = -x(2)-x(3);<br />
xdot(2) = x(1)+ a*x(2);<br />
xdot(3) = b + x(3)*(x(1) &#8211; c)</span></address>
<p>_________________________________________________________________________________________</p>
<p>The follwoing is the MATLAB command that we did that involved these .m files:</p>
<p>_________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">lorenz_demo(300);</span></address>
<p>_________________________________________________________________________________________</p>
<p>As a result form the following command we get the following plot:</p>
<h4><img class="aligncenter size-full wp-image-190" title="russ_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/03/russ_ode45.jpg?w=450&#038;h=356" alt="russ_ode45" width="450" height="356" />Conclusion</h4>
<p>Overall we can see we were able to attain a very good amount of information and understand how Lorenz used his equations in order to show random results. We feel as if we were able to learn something that was very complex and put it into a simple format that was easy to understand. Overall WE thought this block was a success and we feel that we attained a good amount of knowledge.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joshuamoranmth212s09.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joshuamoranmth212s09.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joshuamoranmth212s09.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joshuamoranmth212s09.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joshuamoranmth212s09.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joshuamoranmth212s09.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joshuamoranmth212s09.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joshuamoranmth212s09.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joshuamoranmth212s09.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joshuamoranmth212s09.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joshuamoranmth212s09.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joshuamoranmth212s09.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joshuamoranmth212s09.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joshuamoranmth212s09.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=158&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joshuamoranmth212s09.wordpress.com/2009/03/04/third-block/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6510b6bc84fa204c7f245dada42d037?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jmoran1</media:title>
		</media:content>

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

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

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

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

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

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

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

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

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

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/03/russ_ode45.jpg" medium="image">
			<media:title type="html">russ_ode45</media:title>
		</media:content>
	</item>
		<item>
		<title>Second Block</title>
		<link>http://joshuamoranmth212s09.wordpress.com/2009/02/20/second-block/</link>
		<comments>http://joshuamoranmth212s09.wordpress.com/2009/02/20/second-block/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:51:26 +0000</pubDate>
		<dc:creator>jmoran1</dc:creator>
				<category><![CDATA[MTH212]]></category>

		<guid isPermaLink="false">http://joshuamoranmth212s09.wordpress.com/?p=63</guid>
		<description><![CDATA[Error in Approximations This block requires two methods of approximations of differential equations. One is Euler&#8217;s Method and the other is Runge-Kutta order method. Euler&#8217;s Method uses the most basic of approximations to the derivative of an unkown function in a differential equation: it approximates the unkown function by a straight line for a very [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=63&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 style="text-align:center;">Error in Approximations</h1>
<p>This block requires two methods of approximations of differential equations. One is Euler&#8217;s Method and the other is</p>
<p>Runge-Kutta <img class="latex" title="4^{th}" src="http://l.wordpress.com/latex.php?latex=4%5E%7Bth%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0" alt="4^{th}" /> order method.</p>
<p>Euler&#8217;s Method uses the most basic of approximations to the derivative of an unkown function in a differential equation: it approximates the unkown function by a straight line for a very short increment in the independent variable.</p>
<p><a href="http://mathworld.wolfram.com/Runge-KuttaMethod.html">Runge-Kutta <img class="latex" title="4^{th}" src="http://l.wordpress.com/latex.php?latex=4%5E%7Bth%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0" alt="4^{th}" /> order method</a> is a method of numerically integrating ordinary differential equations by using a trial step at the midpoint of an interval to cancel out lower-order error terms. and the fourth-order formula is</p>
<ul>
<li><img src='http://s0.wp.com/latex.php?latex=k_1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='k_1' title='k_1' class='latex' />    =    <img src='http://s0.wp.com/latex.php?latex=hf%28x_n%2Cy_n%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='hf(x_n,y_n)' title='hf(x_n,y_n)' class='latex' /></li>
<li><img src='http://s0.wp.com/latex.php?latex=k_2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='k_2' title='k_2' class='latex' />    =    <img src='http://s0.wp.com/latex.php?latex=hf%28x_n%2B%5Cfrac%7B+1%7D%7B2%7Dh%2Cy_n%2B%5Cfrac%7B+1%7D%7B2%7Dk_1%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='hf(x_n+&#92;frac{ 1}{2}h,y_n+&#92;frac{ 1}{2}k_1)' title='hf(x_n+&#92;frac{ 1}{2}h,y_n+&#92;frac{ 1}{2}k_1)' class='latex' /></li>
<li><img src='http://s0.wp.com/latex.php?latex=k_3&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='k_3' title='k_3' class='latex' />    =    <img src='http://s0.wp.com/latex.php?latex=hf%28x_n%2B%5Cfrac%7B+1%7D%7B2%7Dh%2Cy_n%2B%5Cfrac%7B+1%7D%7B2%7Dk_2%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='hf(x_n+&#92;frac{ 1}{2}h,y_n+&#92;frac{ 1}{2}k_2)' title='hf(x_n+&#92;frac{ 1}{2}h,y_n+&#92;frac{ 1}{2}k_2)' class='latex' /></li>
<li><img src='http://s0.wp.com/latex.php?latex=k_4&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='k_4' title='k_4' class='latex' />    =    <img src='http://s0.wp.com/latex.php?latex=hf%28x_n%2Bh%2Cy_n%2Bk_3%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='hf(x_n+h,y_n+k_3)' title='hf(x_n+h,y_n+k_3)' class='latex' /></li>
<li><img src='http://s0.wp.com/latex.php?latex=y_%28n%2B1%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y_(n+1)' title='y_(n+1)' class='latex' />    =    <img src='http://s0.wp.com/latex.php?latex=y_n%2B%5Cfrac%7B+1%7D%7B6%7Dk_1%2B%5Cfrac%7B+1%7D%7B3%7Dk_2%2B%5Cfrac%7B+1%7D%7B3%7Dk_3%2B%5Cfrac%7B+1%7D%7B6%7Dk_4%2BO%28h%5E5%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y_n+&#92;frac{ 1}{6}k_1+&#92;frac{ 1}{3}k_2+&#92;frac{ 1}{3}k_3+&#92;frac{ 1}{6}k_4+O(h^5)' title='y_n+&#92;frac{ 1}{6}k_1+&#92;frac{ 1}{3}k_2+&#92;frac{ 1}{3}k_3+&#92;frac{ 1}{6}k_4+O(h^5)' class='latex' /></li>
</ul>
<p>MATLAB has built-in procedures for impelmenting Runge-Kutta, and modified Runge-Kutta, methods for numerical approximation of solutions of differential equations. The one we will use for this project is ode45</p>
<p>For this block my partner (Michael Bosse) and I, examined 6 first-order differential equations using MATLAB functions:</p>
<ol>
<li> Euler’s method</li>
<li>ode45</li>
<li>dsolve</li>
</ol>
<p>We also will compare and contrast each one to the other.  We had to choose two problems from each of the following sections:</p>
<ul>
<li>problems 2-5 on pp. 138-139  of the text</li>
<li> problems 6-11 on p. 139 of the text</li>
<li> problems 12-16 on p. 139 of the text</li>
</ul>
<h3 style="text-align:center;"><span style="text-decoration:underline;">Problem 3</span></h3>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=-y%5E2cos%28x%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-y^2cos(x)' title='-y^2cos(x)' class='latex' />,  <img src='http://s0.wp.com/latex.php?latex=y%280%29+%3D+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(0) = 1' title='y(0) = 1' class='latex' /></p>
<p>The first step to examining this example was to edit our Euler&#8217;s method Code from our previous block. With our previous block we were entering <!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--> euler ( function, x_range, y_initial, h ). Also in doing this we had to make the nstep be calculated according to whatever h we had. Then we decided to changed the code so that it would graph <strong><span style="color:#ff0000;">red</span></strong> The following is our newest euler method code.</p>
<p>___________________________________________________________________________________________</p>
<pre><span style="color:#ffff00;">% Euler’s method for a single differential equation.
% The differential equation is dy/dx = f(x,y)</span></pre>
<pre><span style="color:#ffff00;">  </span></pre>
<pre><span style="color:#ffff00;">function [ x, y ] = euler ( f, x_range, y_initial, h )</span></pre>
<pre><span style="color:#ffff00;">x(1)=x_range(1);</span></pre>
<pre><span style="color:#ffff00;">y(1)=y_initial; </span></pre>
<p><span style="color:#ffff00;"><br />
</span></p>
<p><span style="color:#ffff00;">% The program euler.m will ask for a range of x-values, from x(1) to x(2).x(1) = x_range(1); </span></p>
<pre><span style="color:#ffff00;">% We define dx by dividing this range into an equal number of specified steps</span></pre>
<pre><span style="color:#ffff00;">
</span></pre>
<pre><span style="color:#ffff00;">nstep=( x_range(2) - x_range(1) ) / h; </span></pre>
<pre><span style="color:#ffff00;">dx = ( x_range(2) - x_range(1) ) / nstep; </span></pre>
<pre><span style="color:#ffff00;"> </span></pre>
<pre><span style="color:#ffff00;">% We set the initial value of y at the beginning x-value x(1).y(1) = y_initial;  </span></pre>
<pre><span style="color:#ffff00;">% We use Euler’s method to update the value of y at new time steps.</span></pre>
<pre><span style="color:#ffff00;">% “feval” is used instead of “eval” because we are passing the name of the function f to the program.
</span></pre>
<pre><span style="color:#ffff00;">
for i = 1 : nstep
 x(i+1) = x(i) + dx;
 y(i+1) = y(i) + dx * feval ( f, x(i), y(i) );</span></pre>
<pre><span style="color:#ffff00;">end</span></pre>
<pre><span style="color:#ffff00;">
% The following command plots y as a function of x.</span></pre>
<pre><span style="color:#ffff00;">
plot(x,y,'r')</span></pre>
<pre><span style="color:#ffff00;"> xlabel('x')</span></pre>
<pre><span style="color:#ffff00;"> ylabel('y')</span></pre>
<p>___________________________________________________________________________________________</p>
<p>Our next step was to create an example file in which we named &#8220;problem_3_blk2&#8243;. This file was very similar to the one we did in the first block, but just used the problem three function. please see below:</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_3_blk2(x,y)</span></span></span></address>
<address> </address>
<address><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = -(y^2)*cos(x);<br />
end </span></span></span></address>
<p>___________________________________________________________________________________________</p>
<p>Now its time to execute our new euler.m file using our differential equation to create a curve in which we will be able to compare. To do this in MATLAB we said the following command.</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">euler(&#8216;problem_3_blk2&#8242;,[0,4.5],1,.1)</span></span></span></span></span></address>
<p>___________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We started our boundaries at 0 because the initial value of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> at <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 0 is 1 as the problem states.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-84" title="e_probelm_3_euler" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_3_euler.jpg?w=450&#038;h=337" alt="e_probelm_3_euler" width="450" height="337" /></p>
<p>This plot looks pretty good but still need to compare it with our other MATLAB functions to see how accurate it really is.</p>
<p>The next Function we looked at was ODE45. ODE45 is a built in MATLAB function that reauires an equation, area of bounds, and an initail point. So we used the same problem_3_blk2.m file and put that into ODE45. To be more specific here is what we typed into MATLAB:</p>
<p>_________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ode45(&#8216;problem_3_blk2&#8242;,[0,3],1)</span></address>
<p>_________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We were limited by our boundaries. We needed to start at zero and also because of the way this function is we couldn&#8217;t go past 4.5 without getting an error from ODE45.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-87" title="e_probelm_3_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_3_ode45.jpg?w=450&#038;h=337" alt="e_probelm_3_ode45" width="450" height="337" />With the exception of the boundaries, this plot looks quite similar to euler&#8217;s plot. But, before comparing we will graph the exact solution first by using the MATLAB dsolve function.</p>
<p>For this dsolve function we decided to do the function on the computers in class and then would graph them later on on a different computer. For this example we got this when we used the dsolve function</p>
<p>_________________________________________________________________________________________</p>
<address><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><span style="color:#ffff00;">dsolve(&#8216;Dy=-y^2*cos(x)&#8217;,'y(0)=1&#8242;,&#8217;x')<br />
ans =<br />
1/(sin(x) + 1)</span></address>
<p>_________________________________________________________________________________________</p>
<p>Now since we didn&#8217;t graph and use dsolve on the same computer, we decided to put the answer into a .m file and make it into a function similar to our problem_3_blk2.m file except this function would only require an x input instead of an x and y. We named this file problem_3_sol.m and here is what we put in it:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_3_sol(x)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = <span style="color:#ffff00;">1/(sin(x) + 1)</span>;<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Now that we had our explicit equation file setup we needed a way to plot it. After looking through the help files we found a built in function that would just do that. This function is called fplot. The input for fplot is as follows fplot(function, area of bound, we decided to change the color here to green). Here is what we put into MATLAB</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">fplot(&#8216;problem_3_sol&#8217;,[0,4.2],&#8217;g')</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-93" title="e_probelm_3_fplot" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_3_fplot.jpg?w=450&#038;h=337" alt="e_probelm_3_fplot" width="450" height="337" /></p>
<p>This plot looks very similar to both our ODE45 and Euler function. The best way to compare all three of these functions would be to plot them all together on one plot. So we decided to make a function that would do just that. In this function we made our <strong><span style="color:#ff0000;">EULER PLOT RED</span></strong>, <strong><span style="color:#0000ff;">ODE45 PLOT BLUE</span></strong>, and our <strong><span style="color:#008000;">DSOLVE PLOT GREEN</span></strong>. In doing this we also increased the width of each plot so you could see when the plots over lap easier. We used this function for all our examples and the inputs are exactly the same as our euler&#8217;s method inputs. The function also use both our problem_3_blk2.m and our problem_3_sol.m files.  The code can be found below:</p>
<p>__________________________________________________________________________________________</p>
<pre><span style="color:#ffff00;">function [ x, y ] = euler_ODE_dsolve ( f, x_range, y_initial, h ) </span></pre>
<pre><span style="color:#ffff00;">x(1)=x_range(1); </span></pre>
<pre><span style="color:#ffff00;">y(1)=y_initial;

nstep=( x_range(2) - x_range(1) ) / h;
 dx = ( x_range(2) - x_range(1) ) / nstep;</span></pre>
<pre><span style="color:#ffff00;"> </span></pre>
<pre><span style="color:#ffff00;">for i = 1 : nstep
 x(i+1) = x(i) + dx;
 y(i+1) = y(i) + dx * feval ( f, x(i), y(i) ); end</span></pre>
<pre><span style="color:#ffff00;">ode45(f,x_range,y_initial)
 f=strrep(f,'blk2','sol');hold on
 plot(x,y,'r')
 fplot(f,x_range,'g')
 set(findobj(gca,'Type','Line','Color','g'),'LineWidth',4);
 set(findobj(gca,'Type','Line','Color','r'),'LineWidth',3);
 set(findobj(gca,'Type','Line','Color','b'),'LineWidth',2);
 hold off
 xlabel('x')
 ylabel('y')</span></pre>
<p>__________________________________________________________________________________________</p>
<p>To use this function in MATLAB we type said the following command:</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">euler_ODE_dsolve(&#8216;problem_3_blk2&#8242;,[0,4.3],1,.1)</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-94" title="e_probelm_3_all" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_3_all.jpg?w=450&#038;h=337" alt="e_probelm_3_all" width="450" height="337" /></p>
<p style="text-align:left;">Now that all three functions are on one plot, it is easy to compare them. Eulers method seems to be further and further off as x increases, while ODE45 and DSOLVE seem to be right on. But Remember that ODE45 wouldn&#8217;t work after 4.5 so it isn&#8217;t perfect. Before making a conclusion we decided to try the next example first.</p>
<h3 style="text-align:center;">Problem 5</h3>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=ye%5E%28-x%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='ye^(-x)' title='ye^(-x)' class='latex' />,  <img src='http://s0.wp.com/latex.php?latex=y%280%29+%3D+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(0) = 1' title='y(0) = 1' class='latex' /></p>
<p>The first step we took in examining this problem was to simply plot eulers function since the code was already fixed for the previous problem. Before graphing thought we made our first function file for problem 5 in which we called problem_5_blk2.m. The following was what was put into that file:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_5_blk2(x,y)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = y*exp(-x);<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Since this file is all set, we next plotted Eulers Function. The following is the command we used to do just that.</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">euler(&#8216;problem_5_blk2&#8242;,[0,6.8],1,.1)</span></span></span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We started our boundaries at 0 because the initial value of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> at <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 0 is 1 as the problem states.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-97" title="e_probelm_5_euler" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_5_euler.jpg?w=450&#038;h=337" alt="e_probelm_5_euler" width="450" height="337" /></p>
<p>This plot looks good but still need to compare it with the other functions to see how accurate it is.</p>
<p>The next function that we plotted was ODE45. Since we have already know how to use ODE45 we simply just typed the following command into MATLAB:</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ode45(&#8216;problem_5_blk2&#8242;,[0,7],1)</span></address>
<p>___________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-98" title="e_probelm_5_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_5_ode45.jpg?w=450&#038;h=337" alt="e_probelm_5_ode45" width="450" height="337" /></p>
<p>This plot looks quite similar to euler&#8217;s plot. But, before comparing we will graph the exact solution first by using the MATLAB dsolve function.</p>
<p>As said before, we decided to do the function on the computers in class and then would plot them later on a different computer. For this example we got this when we used the dsolve function:</p>
<p>_________________________________________________________________________________________</p>
<address><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><span style="color:#ffff00;">dsolve(&#8216;Dy=y*exp(-x)&#8217;,'y(0)=1&#8242;,&#8217;x')<br />
ans =<br />
exp(1-exp(-x))<br />
</span></address>
<p>_________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: exp is <img src='http://s0.wp.com/latex.php?latex=e&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='e' title='e' class='latex' /></span></strong><span style="color:#00ff00;"> </span></span></span></span></span></span></span></p>
<p>Next we  to put the answer into a .m file and make it into a function similar to our problem_3_sol.m We named this file problem_5_sol.m and here is what we put in it:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_5_sol(x)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = </span></span></span><span style="color:#ffff00;">exp(1-exp(-x))</span><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">;<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Now that we had our explicit equation file setup we plotted it using fpolt. Here is what we put into MATLAB</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">fplot(&#8216;problem_5_sol&#8217;,[0,7],&#8217;g')</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-100" title="e_probelm_5_fplot1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_5_fplot1.jpg?w=450&#038;h=337" alt="e_probelm_5_fplot1" width="450" height="337" /></p>
<p>This plot looks very similar to both our ODE45 and Euler function. Just like before, the best way to compare is to plot all three at once. To do this we called our function again to accomplish this.</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">euler_ODE_dsolve(&#8216;problem_5_blk2&#8242;,[0,7],1,.1)</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-112" title="e_probelm_5_all" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_5_all.jpg?w=450&#038;h=337" alt="e_probelm_5_all" width="450" height="337" />Now that all three functions are on one plot, it is easy to compare them. Eulers method seems to be further and further off as x increases once again, while ODE45 and DSOLVE seem to be right on. But this time ODE45 seemed to work without any problem. We were starting to get and idea at this point but we wanted to try the rest of the examples first.</p>
<h3 style="text-align:center;">Problem 6</h3>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=xy%5E2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='xy^2' title='xy^2' class='latex' />,  <img src='http://s0.wp.com/latex.php?latex=y%280%29+%3D+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(0) = 1' title='y(0) = 1' class='latex' /></p>
<p>The first step we took in examining this problem was to simply plot eulers function since the code was already fixed for the previous problem. Before graphing thought we made our first function file for problem 6 in which we called problem_6_blk2.m. The following was what was put into that file:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_6_blk2(x,y)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = x*y^2;<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Since this file is all set, we next plotted Eulers Function. The following is the command we used to do just that.</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">euler(&#8216;problem_6_blk2&#8242;,[0,1.3],1,.1)</span></span></span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We started our boundaries at 0 because the initial value of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> at <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 0 is 1 as the problem states.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-119" title="e_probelm_6_euler" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_6_euler.jpg?w=450&#038;h=337" alt="e_probelm_6_euler" width="450" height="337" /></p>
<p>This plot looks good but still need to compare it with the other functions to see how accurate it is.</p>
<p>The next function that we plotted was ODE45. Since we have already know how to use ODE45 we simply just typed the following command into MATLAB:</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ode45(&#8216;problem_6_blk2&#8242;,[0,1.3],1)</span></address>
<p>___________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We were limited by our boundaries. We needed to start at zero and also because of the way this function is we couldn&#8217;t go past 1.3 without getting an error from ODE45.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-129" title="e_probelm_6_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_6_ode45.jpg?w=450&#038;h=337" alt="e_probelm_6_ode45" width="450" height="337" /></p>
<p>This plot looks quite similar to euler&#8217;s plot. But, before comparing we will graph the exact solution first by using the MATLAB dsolve function.</p>
<p>As said before, we decided to do the function on the computers in class and then would plot them later on a different computer. For this example we got this when we used the dsolve function:</p>
<p>_________________________________________________________________________________________</p>
<address><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><span style="color:#ffff00;">dsolve(&#8216;Dy=x*y*y&#8217;,'y(0)=1&#8242;,&#8217;x')<br />
ans =<br />
-1/(x^2/2-1)<br />
</span></address>
<p>_________________________________________________________________________________________</p>
<p>Next we  to put the answer into a .m file and make it into a function similar to our problem_3_sol.m We named this file problem_6_sol.m and here is what we put in it:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_6_sol(x)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = </span></span></span><span style="color:#ffff00;">-1/(x^2/2-1)</span><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">;<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Now that we had our explicit equation file setup we plotted it using fpolt. Here is what we put into MATLAB</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">fplot(&#8216;problem_6_sol&#8217;,[-3,3],&#8217;g')</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-131" title="e_probelm_6_fplot" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_6_fplot.jpg?w=450&#038;h=337" alt="e_probelm_6_fplot" width="450" height="337" /></p>
<p>This plot looks very similar to both our ODE45 and Euler function from the range 0 to 1.3.  Seeing this from further away you can see why ODE45 wouldn&#8217;t work after 1.3. This the second time seeing this. It seems that ODE45 dosn&#8217;t work if the differential equation goes to infinity. Anyways, just like before the best way to compare is to plot all three at once. To do this we called our function again to accomplish this.</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">euler_ODE_dsolve(&#8216;problem_6_blk2&#8242;,[0,1.3],1,.1)</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-132" title="e_probelm_6_all" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_6_all.jpg?w=450&#038;h=337" alt="e_probelm_6_all" width="450" height="337" /></p>
<p>Now that all three functions are on one plot, it is easy to compare them. Eulers method seems to be further and further off as x increases, while ODE45 and DSOLVE seem to be right on. Similar to every example so far. But Remember that ODE45 wouldn&#8217;t work after 1.3 so it isn&#8217;t perfect.</p>
<h3 style="text-align:center;">Problem 10</h3>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=x%2By&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x+y' title='x+y' class='latex' />,  <img src='http://s0.wp.com/latex.php?latex=y%280%29+%3D+0&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(0) = 0' title='y(0) = 0' class='latex' /></p>
<p>The first step we took in examining this problem was to simply plot eulers function since the code was already fixed for the previous problem. Before graphing thought we made our first function file for problem 6 in which we called problem_6_blk2.m. The following was what was put into that file:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_10_blk2(x,y)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = x+y;<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Since this file is all set, we next plotted Eulers Function. The following is the command we used to do just that.</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">euler(&#8216;problem_10_blk2&#8242;,[0,3],0,.1)</span></span></span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We started our boundaries at 0 because the initial value of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> at <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 0 is 0 as the problem states.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-134" title="e_probelm_10_euler" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_10_euler.jpg?w=450&#038;h=337" alt="e_probelm_10_euler" width="450" height="337" /></p>
<p>This plot looks good but still need to compare it with the other functions to see how accurate it is.</p>
<p>The next function that we plotted was ODE45. Since we have already know how to use ODE45 we simply just typed the following command into MATLAB:</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ode45(&#8216;problem_10_blk2&#8242;,[0,3],0)</span></address>
<p>___________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We were limited by our boundaries. We needed to start at zero and also because of the way this function is we couldn&#8217;t go past 1.3 without getting an error from ODE45.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-136" title="e_probelm_10_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_10_ode45.jpg?w=450&#038;h=337" alt="e_probelm_10_ode45" width="450" height="337" /></p>
<p>This plot looks quite similar to euler&#8217;s plot. Once again ODE45 wouldn&#8217;t work past the 0 to 3ish area. But, before comparing we will graph the exact solution first by using the MATLAB dsolve function.</p>
<p>As said before, we decided to do the function on the computers in class and then would plot them later on a different computer. For this example we got this when we used the dsolve function:</p>
<p>_________________________________________________________________________________________</p>
<address><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><span style="color:#ffff00;">dsolve(&#8216;Dy=x+y&#8217;,'y(0)=0&#8242;,&#8217;x')<br />
ans =<br />
exp(x)-x-1<br />
</span></address>
<p>_________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: exp is <img src='http://s0.wp.com/latex.php?latex=e&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='e' title='e' class='latex' /></span></strong></span></span></span></span></span></span></p>
<p>Next we  to put the answer into a .m file and make it into a function similar to our problem_3_sol.m We named this file problem_10_sol.m and here is what we put in it:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_10_sol(x)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = </span></span></span><span style="color:#ffff00;">exp(x)-x-1</span><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">;<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Now that we had our explicit equation file setup we plotted it using fpolt. Here is what we put into MATLAB</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">fplot(&#8216;problem_10_sol&#8217;,[-8,4.5],&#8217;g')</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-137" title="e_probelm_10_fplot" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_10_fplot.jpg?w=450&#038;h=337" alt="e_probelm_10_fplot" width="450" height="337" /></p>
<p>This plot looks very similar to both our ODE45 and Euler function from the range 0 to 3.  Seeing this from further away you can see why ODE45 wouldn&#8217;t work after 3ish. This the third time seeing this. It seems that ODE45 dosn&#8217;t work if the differential equation goes to infinity. Anyways, just like before the best way to compare is to plot all three at once. To do this we called our function again to accomplish this.</p>
<p>__________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">euler_ODE_dsolve(&#8216;problem_10_blk2&#8242;,[0,3],0,.1)</span><br />
</address>
<p>__________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-138" title="e_probelm_10_all" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_10_all.jpg?w=450&#038;h=337" alt="e_probelm_10_all" width="450" height="337" /></p>
<p>Now that all three functions are on one plot, it is easy to compare them. Eulers method seems to be further and further off as x increases, while ODE45 and DSOLVE seem to be right on. Similar to every example so far. But Remember that ODE45 isn&#8217;t perfect.</p>
<h3 style="text-align:center;">Problem 13</h3>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=x%5E3y-x%5E2y%5E2&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x^3y-x^2y^2' title='x^3y-x^2y^2' class='latex' />,  <img src='http://s0.wp.com/latex.php?latex=y%28-1%29+%3D+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(-1) = 1' title='y(-1) = 1' class='latex' /></p>
<p>The first step we took in examining this problem was to simply plot eulers function since the code was already fixed for the previous problem. Before graphing thought we made our first function file for problem 13 in which we called problem_13_blk2.m. The following was what was put into that file:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_13_blk2(x,y)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = x^3*y-x^2*y^2;<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Since this file is all set, we next plotted Eulers Function. The following is the command we used to do just that.</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">euler(&#8216;problem_13_blk2&#8242;,[-1,5],0,.01)</span></span></span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We started our boundaries at -1 because the initial value of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> at <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = -1 is 1 as the problem states.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-141" title="e_probelm_13_euler1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_13_euler1.jpg?w=450&#038;h=337" alt="e_probelm_13_euler1" width="450" height="337" /></p>
<p>This plot looks good but still need to compare it with the other functions to see how accurate it is.</p>
<p>The next function that we plotted was ODE45. Since we have already know how to use ODE45 we simply just typed the following command into MATLAB:</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ode45(&#8216;problem_13_blk2&#8242;,[-1,5],1)</span></address>
<p>___________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-142" title="e_probelm_13_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_13_ode45.jpg?w=450&#038;h=337" alt="e_probelm_13_ode45" width="450" height="337" /></p>
<p>This plot looks quite similar to euler&#8217;s plot. We did have a problem with the next part though. Dsolve didn&#8217;t seem to work for this problem. We put the equation into dsolve and this is what we got:</p>
<p>_________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">dsolve(&#8216;Dy=x^3*y-x^2*y^2&#8242;,&#8217;y(-1)=1&#8242;,&#8217;x')<br />
ans =<br />
1/(int(y^2*exp(y^4)^(1/4), y = 0..x)/exp(x^4/4) &#8211; (exp(1/4)*(int(y^2*exp(y^4)^(1/4), y = 0..-1)/exp(1/4) &#8211; 1))/exp(x^4/4))</span></address>
<p>_________________________________________________________________________________________</p>
<p>Unfortunately we could not graph this function. So instead we decided to compare ODE45 and euler&#8217;s method. What we did was just take out the fplot of our Plot all three one on plot function. This is what the code looked like:</p>
<p>_________________________________________________________________________________________</p>
<pre><span style="color:#ffff00;">function [ x, y ] = euler_ODE ( f, x_range, y_initial, h ) </span></pre>
<pre><span style="color:#ffff00;">x(1)=x_range(1); </span></pre>
<pre><span style="color:#ffff00;">y(1)=y_initial;

nstep=( x_range(2) - x_range(1) ) / h;
 dx = ( x_range(2) - x_range(1) ) / nstep;</span></pre>
<pre><span style="color:#ffff00;"> </span></pre>
<pre><span style="color:#ffff00;">for i = 1 : nstep
 x(i+1) = x(i) + dx;
 y(i+1) = y(i) + dx * feval ( f, x(i), y(i) ); end</span></pre>
<pre><span style="color:#ffff00;">ode45(f,x_range,y_initial)
 f=strrep(f,'blk2','sol');hold on
 plot(x,y,'r')
 set(findobj(gca,'Type','Line','Color','r'),'LineWidth',3);
 set(findobj(gca,'Type','Line','Color','b'),'LineWidth',2);
 hold off
 xlabel('x')
 ylabel('y')</span></pre>
<p>_________________________________________________________________________________________</p>
<p>The following is the command that we used to plot ODE45 and Euler using this function:</p>
<p>_________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">euler_ODE(&#8216;problem_13_blk2&#8242;,[-1,5],1,.01)</span></p>
<p>_________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-144" title="e_probelm_13_euler_ode451" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_13_euler_ode451.jpg?w=450&#038;h=337" alt="e_probelm_13_euler_ode451" width="450" height="337" /></p>
<p>Instead of Eulers method being further and further off as x increases, it seems to be right on with ODE45. Part of the reason is for Eulers Method the h had to be changed in order for this function to plot and the lower the h, better the result. Although we couldn&#8217;t plot or get an exact dsolve, euler&#8217;s method and ODE45 are great ways to get at least an approximation. They seem be most usefull on hard differental equations.</p>
<h3 style="text-align:center;">Problem 14</h3>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=x%5E3e%5Ey%2B3x%5E2sin%28y%29&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x^3e^y+3x^2sin(y)' title='x^3e^y+3x^2sin(y)' class='latex' />,  <img src='http://s0.wp.com/latex.php?latex=y%28-1%29+%3D+1&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y(-1) = 1' title='y(-1) = 1' class='latex' /></p>
<p>The first step we took in examining this problem was to simply plot eulers function since the code was already fixed for the previous problem. Before plotting we made a function file for problem 14 in which we called problem_14_blk2.m. The following was what was put into that file:</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">function yprime = problem_14_blk2(x,y)</span></span></span></p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">yprime = x^3*exp(y)+3*x^2*sin(y);<br />
end</span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p>Since this file is all set, we next plotted Eulers Function. The following is the command we used to do just that.</p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;">euler(&#8216;problem_14_blk2&#8242;,[-.5,5],1,.01)</span></span></span></span></span></p>
<p>__________________________________________________________________________________________</p>
<p><span style="color:#888888;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><span style="color:#ffff00;"><span style="color:#c0c0c0;"><strong><span style="color:#00ff00;">NOTE: </span></strong><span style="color:#00ff00;">We started our boundaries at -0.5 because the initial value of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> at <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = -1 is 1 as the problem states.</span></span></span></span></span></span></span></p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-147" title="e_probelm_14_euler" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_14_euler.jpg?w=450&#038;h=337" alt="e_probelm_14_euler" width="450" height="337" /></p>
<p>This plot looks good but still need to compare it with the other functions to see how accurate it is.</p>
<p>The next function that we plotted was ODE45. Since we have already know how to use ODE45 we simply just typed the following command into MATLAB:</p>
<p>___________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">ode45(&#8216;problem_14_blk2&#8242;,[-0.5,5],1)</span></address>
<p>___________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-148" title="e_probelm_14_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_14_ode45.jpg?w=450&#038;h=337" alt="e_probelm_14_ode45" width="450" height="337" /></p>
<p>This plot looks quite similar to euler&#8217;s plot. We did have a problem with the next part though. Dsolve didn&#8217;t seem to work for this problem. We put the equation into dsolve and this is what we got:</p>
<p>_________________________________________________________________________________________</p>
<address><span style="color:#ffff00;">dsolve(&#8216;Dy=x^3*exp(y)+3*x^2*sin(y)&#8217;,'y(-0.5)=1&#8242;,&#8217;x')<br />
Warning: Explicit solution could not be found.<br />
&gt; In dsolve at 156</p>
<p>ans =</p>
<p>[ empty sym ]</p>
<p></span><br />
</address>
<p>_________________________________________________________________________________________</p>
<p>So instead we decided to compare ODE45 and euler&#8217;s method. Using the same function from the previous problem where we took out fplot, we did the following command:</p>
<p>_________________________________________________________________________________________</p>
<p><span style="color:#ffff00;">euler_ODE(&#8216;problem_14_blk2&#8242;,[-0.5,5],1,.01)</span></p>
<p>_________________________________________________________________________________________</p>
<p>As a result from the following command in MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-149" title="e_probelm_14_euler_ode45" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_14_euler_ode45.jpg?w=450&#038;h=337" alt="e_probelm_14_euler_ode45" width="450" height="337" /></p>
<p>Once again instead of Eulers method being further and further off as x increases, it seems to be right on with ODE45. Part of the reason is for Eulers Method the h had to be changed in order for this function to plot and the lower the h, better the result. Although we couldn&#8217;t plot or get an exact dsolve, euler&#8217;s method and ODE45 are great ways to get at least an approximation. They seem be most usefull on hard differental equations.</p>
<p style="text-align:center;">CONCLUSION</p>
<p style="text-align:left;">Although solving the differental equation and plotting that seems the be the best way to get a result, as we proved sometimes its not possible to do that. Euler&#8217;s method isn&#8217;t to most accurate all the time  but it does a good job in putting you in the right ballpark. Overall when unable to solve a differenial equation Euler&#8217;s Method or ODE45 are two great alteratives to give you that general idea.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joshuamoranmth212s09.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joshuamoranmth212s09.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joshuamoranmth212s09.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joshuamoranmth212s09.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joshuamoranmth212s09.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joshuamoranmth212s09.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joshuamoranmth212s09.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joshuamoranmth212s09.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joshuamoranmth212s09.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joshuamoranmth212s09.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joshuamoranmth212s09.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joshuamoranmth212s09.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joshuamoranmth212s09.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joshuamoranmth212s09.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=63&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joshuamoranmth212s09.wordpress.com/2009/02/20/second-block/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6510b6bc84fa204c7f245dada42d037?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jmoran1</media:title>
		</media:content>

		<media:content url="http://l.wordpress.com/latex.php?latex=4%5E%7Bth%7D&#38;bg=ffffff&#38;fg=000000&#38;s=0" medium="image">
			<media:title type="html">4^{th}</media:title>
		</media:content>

		<media:content url="http://l.wordpress.com/latex.php?latex=4%5E%7Bth%7D&#38;bg=ffffff&#38;fg=000000&#38;s=0" medium="image">
			<media:title type="html">4^{th}</media:title>
		</media:content>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/02/e_probelm_14_euler_ode45.jpg" medium="image">
			<media:title type="html">e_probelm_14_euler_ode45</media:title>
		</media:content>
	</item>
		<item>
		<title>First Block</title>
		<link>http://joshuamoranmth212s09.wordpress.com/2009/02/02/first-block/</link>
		<comments>http://joshuamoranmth212s09.wordpress.com/2009/02/02/first-block/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 23:58:49 +0000</pubDate>
		<dc:creator>jmoran1</dc:creator>
				<category><![CDATA[MTH212]]></category>

		<guid isPermaLink="false">http://joshuamoranmth212s09.wordpress.com/?p=3</guid>
		<description><![CDATA[EXAMPLE 1 The example that my partner (Mike Bosse) and I choose was = .  This example came from page 94 in our textbook A Course In Ordinary Differential Equations by Randall J. Swift and Stephen A. Wirkus. The first step we took to for this differential equation was plotting the vector field. To do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=3&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3 style="text-align:center;"><strong>EXAMPLE 1</strong></h3>
<p>The example that my partner (Mike Bosse) and I choose was <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+y-1%7D%7Bx-1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ y-1}{x-1}' title='&#92;frac{ y-1}{x-1}' class='latex' />.  This example came from page 94 in <em>our textbook A Course In Ordinary Differential Equations</em> by Randall J. Swift and Stephen A. Wirkus.</p>
<p>The first step we took to for this differential  equation was plotting the vector field. To do this we used the help of Gary Davis&#8217;s code as a starting point and MATLAB. To help make the code more appropriate for our example we changed <img src='http://s0.wp.com/latex.php?latex=DY+&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='DY ' title='DY ' class='latex' /> equal to our function <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+y-1%7D%7Bx-1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ y-1}{x-1}' title='&#92;frac{ y-1}{x-1}' class='latex' />. Then we looked at our solutions <img src='http://s0.wp.com/latex.php?latex=-5%3Cx%3C5&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-5&lt;x&lt;5' title='-5&lt;x&lt;5' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=-5%3Cy%3C5&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-5&lt;y&lt;5' title='-5&lt;y&lt;5' class='latex' />. To accomplish this we changed the input values into the meshgrid function.  meshgrid works like this: meshgrid(x,y), where x is your properties for x-axis on the grid and y is the properties for the y-axis on the grid.</p>
<p>The code that we did in MATLAB for the differental equation <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+dy%7D%7Bdx%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ dy}{dx}  ' title='&#92;frac{ dy}{dx}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+y-1%7D%7Bx-1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ y-1}{x-1}' title='&#92;frac{ y-1}{x-1}' class='latex' /> can be found below:</p>
<p>__________________________________________________________________________________________</p>
<pre><span style="color:#ff9900;">[X,Y]=meshgrid(-5:0.4:5,-5:0.4:5); % o.4 is the step size for the grid
DY=((Y-1)./(X-1);
DX=ones(size(DY)) ;
DW=sqrt(DX.^2+DY.^2);
quiver(X,Y,DX./DW,DY./DW,0.5,'.');
xlabel('x');
ylabel('y');
</span>_______________________________________________________________________________________________________</pre>
<p>As a result from this code from MATLAB we got the following plot:<br />
<img class="aligncenter size-full wp-image-21" title="example1_vectors" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/example1_vectors.jpg?w=450&#038;h=337" alt="example1_vectors" width="450" height="337" /></p>
<p>From the plot we can see that all the action seems to happen around the area where <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> is equal to one. We obtained this plot by saving it as a jpeg.  If we were to put an imaginary line down <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 1, we would see the vector field being split into two regions. The left region points towards the imaginary line while the region on the right points away from the from it. This is because dividing by zero is undefined. When <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> is 1 you get <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+y-1%7D%7B1-1%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ y-1}{1-1}' title='&#92;frac{ y-1}{1-1}' class='latex' /> which is equal to <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B+y-1%7D%7B0%7D&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='&#92;frac{ y-1}{0}' title='&#92;frac{ y-1}{0}' class='latex' />. Also since everything happens around <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 1 we didn&#8217;t feel the need to expand our graph out any further.</p>
<p>Now that we have obtained the vector field for this differential equation, we used Euler&#8217;s method to obtain a numerical approximation to a solution curve, first choosing an initial condition of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> equal to zero.</p>
<h4 style="text-align:center;">Euler&#8217;s Method</h4>
<p style="text-align:left;">Euler&#8217;s Method is the simplest method of obtaining a numerical solution of a differential equation.  Once again, in order to do this method we used code from Gary Davis as a starting point. What we did was copied the code into something called a .m file in MATLAB. In doing this, we made our own function called euler. This way we could keep using this function for future examples. We also created another .m file that the euler function could refer to for the right differential equation. This was done this way to more generalize the Euler function.</p>
<p style="text-align:left;">In copying the code we ran into a few problems. The problem was on line 17 of the code which was y(i+1)=y(i)+dx*feval(f,x(i),y(i) )<strong>; </strong>Once we saw this we had no clue what to do until one of the student’s from the class said at the beginning of the function to define <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> as set variable’s which were equal to zero so <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 0 and <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> =0. But, this also didn&#8217;t work. So after using the trying a few things and looking at the code, we came up with our own solution. With setting <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> equal to zero, the function didn&#8217;t care what value you passed to it, it set both initials to zero. So after seeing this we set <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' />(1) to x_range(1) and <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' />(1) to y_inital. This solved the problem.</p>
<p style="text-align:left;">The following is the code for the euler.m file, or the euler function.</p>
<pre style="text-align:left;">___________________________________________________________________________________</pre>
<pre style="text-align:left;"><span style="color:#ff9900;">% Euler’s method for a single differential equation.
% The differential equation is dy/dx = f(x,y)

function [ x, y ] = euler ( f, x_range, y_initial, nstep )</span></pre>
<pre style="text-align:left;"><span style="color:#ff9900;">x(1)=x_range(1);</span></pre>
<pre style="text-align:left;"><span style="color:#ff9900;">y(1)=y_initial;</span></pre>
<pre style="text-align:left;"><span style="color:#ff9900;">% The program euler.m will ask for a range of x-values, from x(1) to x(2).x(1) = x_range(1);

% We define dx by dividing this range into an equal number of specified steps

dx = ( x_range(2) - x_range(1) ) / nstep; % We set the initial value of y at the beginning x-value</span></pre>
<pre style="text-align:left;"><span style="color:#ff9900;">x(1).y(1) = y_initial; % We use Euler’s method to update the value of y at new time steps.

% “feval” is used instead of “eval” because we are passing the name of the function f to the program.

for i = 1 : nstep
x(i+1) = x(i) + dx;
y(i+1) = y(i) + dx * feval ( f, x(i), y(i) ); end

% The following command plots y as a function of x.

plot(x,y)
xlabel('x')
ylabel('y')</span></pre>
<pre style="text-align:left;">___________________________________________________________________________________</pre>
<p style="text-align:left;">For this equation it is asking for four things to be passed to it. (f, x_range, y_initial, nstep) f is the differential equation, x_range is something called and array with asks from where to where on the x-axis do you want to see ploted, y_inital is the inital value of y to start from, and finally nstep is the number of steps to do eulers method. The higher the steps the more accurate your curve will be.</p>
<p style="text-align:left;">Next, we have the code for the differential equation file in which we called example1.m:</p>
<pre style="text-align:left;">___________________________________________________________________________________</pre>
<pre style="text-align:left;"><span style="color:#ff9900;">function yprime = example1(x,y)
yprime = (y-1)./(x-1);</span></pre>
<pre style="text-align:left;"><span style="color:#ff9900;">end</span></pre>
<p>________________________________________________________________________</p>
<p>Now executing the <span style="color:#808080;"><strong>euler</strong></span> m-file and calling the specific differential equation that we called<span style="color:#000000;"><strong> <span style="color:#808080;">example1</span></strong></span>.m, we will produce a vector of numerical values for x and y. These numerical values to plot an approximation to a solution curve to the differential equation. To do this in MATLAB we said the following command:</p>
<p>________________________________________________________________________</p>
<p><span style="color:#ff9900;">euler(&#8216;example1&#8242;,[0,12],.001,60);</span></p>
<p>________________________________________________________________________</p>
<p><span style="color:#ffff00;"><strong>PLEASE NOTE:</strong></span><span style="color:#ffff00;"> In order for this to work in MATLAB you MUST have both m-files in the same location on your computer. For example they must be in the same folder. Also make sure <em>example1</em> is in single quotes</span></p>
<p>As a result from the following command in MATLAB we got the following Curve:</p>
<p><img class="aligncenter size-full wp-image-41" title="exampl1_line" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/exampl1_line.jpg?w=450&#038;h=337" alt="exampl1_line" width="450" height="337" /></p>
<p>This curve is pretty consistent with the vector field and for this differential equation all the action is around <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='x' title='x' class='latex' /> = 1. So there was no need to widen out this curve. To make sure that the curve and the vector field were consistent we decided to do both on one plot. Combining Gary Davis&#8217;s code and both the vector field and curve code, we came up with the following:</p>
<pre>_________________________________________________________________________
<span style="color:#ff9900;">[x,y]=euler('example1',[-1,12],.001,60);
[X,Y]=meshgrid(-1:.5:12,-1:.5:16); %Use CAPITALS to avoid re-assigning x and y
DY=(Y-1)./(X-1);
DX=ones(size(DY));
DW=sqrt(DX.^2+DY.^2);
quiver(X,Y,DX./DW,DY./DW,0.5); % Plot the vector field for the differential equation hold on
plot(x,y) % Plot the numerical solution curve over the vector field hold off
xlabel('x')
ylabel('y')</span></pre>
<p>_________________________________________________________________________</p>
<p>After typing this into MATLAB we see the numerically computed solution curve and the vector field tangent to the solution curve. Here is the plot:</p>
<p><img class="aligncenter size-full wp-image-44" title="y_x2" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/y_x2.jpg?w=450&#038;h=337" alt="y_x2" width="450" height="337" /></p>
<h3 style="text-align:center;">EXAMPLE 2</h3>
<p>For this example we used the same steps as the first one except the equation was one that Gary Davis had given us which was <img src='http://s0.wp.com/latex.php?latex=frac%7B+dy%7D%7Bdt%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='frac{ dy}{dt}  ' title='frac{ dy}{dt}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=y%5E2+%2B+t&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y^2 + t' title='y^2 + t' class='latex' />.</p>
<p>The first step we took to for this differential  equation was plotting the vector field. This time for graphing the vector feild we just copied our previous code from EXAMPLE 1 and edited so that it suited <img src='http://s0.wp.com/latex.php?latex=frac%7B+dy%7D%7Bdt%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='frac{ dy}{dt}  ' title='frac{ dy}{dt}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=y%5E2+%2B+t&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y^2 + t' title='y^2 + t' class='latex' />. This was pretty easy to do since we had already worked out all the bugs thanks to the first example. We looked at our solutions <img src='http://s0.wp.com/latex.php?latex=-7.6%3Ct%3C1.8&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-7.6&lt;t&lt;1.8' title='-7.6&lt;t&lt;1.8' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=-4%3Cy%3C4&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='-4&lt;y&lt;4' title='-4&lt;y&lt;4' class='latex' />. After plotting this function a few times we thought that this range got the best result and where you can really see what is happening. The following is the code that was put into MATLAB for this differential equation:</p>
<p>__________________________________________________________________________________________</p>
<pre><span style="color:#ff9900;">[T,Y]=meshgrid(-7.6:0.6:1.8,-4:0.6:4); % o.6 is the step size for the grid
DY=Y^2 + T;
DT=ones(size(DY)) ;
DW=sqrt(DT.^2+DY.^2);
quiver(T,Y,DT./DW,DY./DW,0.5,'.');
xlabel('t');
ylabel('y');
</span>
_______________________________________________________________________________________________________</pre>
<p>As a result from this code from MATLAB we got the following plot:</p>
<p><img class="aligncenter size-full wp-image-47" title="example2_vectors1" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/example2_vectors1.jpg?w=450&#038;h=337" alt="example2_vectors1" width="450" height="337" />From this plot we can see that all of the action happens from <img src='http://s0.wp.com/latex.php?latex=t&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='t' title='t' class='latex' /> = -8 to <img src='http://s0.wp.com/latex.php?latex=t&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='t' title='t' class='latex' /> = 0. Since <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> is the variable that is getting squared from the differential equation<img src='http://s0.wp.com/latex.php?latex=frac%7B+dy%7D%7Bdt%7D++&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='frac{ dy}{dt}  ' title='frac{ dy}{dt}  ' class='latex' /> = <img src='http://s0.wp.com/latex.php?latex=y%5E2+%2B+t&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y^2 + t' title='y^2 + t' class='latex' />, this plot makes sense.</p>
<p style="text-align:left;">Now that we have obtained the vector field for this differential equation, we used Euler&#8217;s method to obtain a numerical approximation to a solution curve, first choosing an initial condition of <img src='http://s0.wp.com/latex.php?latex=y&amp;bg=0a0a0a&amp;fg=cccccc&amp;s=0' alt='y' title='y' class='latex' /> equal to zero.</p>
<p style="text-align:left;">Since we already know that our euler function is generalized all we had to do was create a new m-file that had this differential equation. The Following is what was in that m-file and we decided to call it example2.m:</p>
<pre style="text-align:left;">___________________________________________________________________________________</pre>
<pre style="text-align:left;"><span style="color:#ff9900;">function yprime = example2(t,y)
yprime = y.*y + t;</span></pre>
<pre style="text-align:left;"><span style="color:#ff9900;">end</span></pre>
<p>________________________________________________________________________</p>
<p style="text-align:left;">Next we apply example 2 to our already made euler function we get the following that we used in MATLAB:</p>
<p>________________________________________________________________________</p>
<p><span style="color:#ff9900;">euler(&#8216;example2&#8242;,[-4,1.8],.001,60);</span></p>
<p>________________________________________________________________________</p>
<p><span style="color:#ffff00;"><strong>REMEMBER:</strong></span><span style="color:#ffff00;"> In order for this to work in MATLAB you MUST have both m-files in the same location on your computer. For example they must be in the same folder. Also make sure <em>example1</em> is in single quotes</span></p>
<p>As a result from the following command in MATLAB we got the following Curve:</p>
<p><img class="aligncenter size-full wp-image-48" title="example2_line" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/example2_line.jpg?w=450&#038;h=337" alt="example2_line" width="450" height="337" /></p>
<p>This curve makes sense and is very similar to the vector field. But, to make sure we decided to graph both in the same plot just to make sure. All we had to do was copy the code from example 1 and apply it to this differential equation. In doing that we get the following:</p>
<pre>_________________________________________________________________________
<span style="color:#ff9900;">[x,t]=euler('example2',[-7.6,1.8],.001,60);
[X,T]=meshgrid(-47.6:.5:1.8,-4:.5:4); %Use CAPITALS to avoid re-assigning x and y
DY=Y.*Y+T;
DX=ones(size(DY));
DW=sqrt(DT.^2+DY.^2);
quiver(T,Y,DT./DW,DY./DW,0.5); % Plot the vector field for the differential equation hold on
plot(t,y) % Plot the numerical solution curve over the vector field hold off
xlabel('t')
ylabel('y')</span></pre>
<p>_________________________________________________________________________</p>
<p>After typing this into MATLAB we see the numerically computed solution curve and the vector field tangent to the solution curve. Here is the plot:</p>
<p><img class="aligncenter size-full wp-image-49" title="example2_combo" src="http://joshuamoranmth212s09.files.wordpress.com/2009/02/example2_combo.jpg?w=450&#038;h=337" alt="example2_combo" width="450" height="337" /></p>
<p>As you can see the Curve goes in the direction of the vector field.</p>
<p>Overall you can see that my partner and I learned a great deal about MATLAB in the first two week block and even though we ran into a few minor errors and mistakes we were able to make sense of what we were doing and feel confident about it.</p>
<table border="0" cellspacing="0" cellpadding="0" width="128">
<tbody>
<tr>
<td width="64" valign="bottom">
<p align="right">1</p>
</td>
<td width="64" valign="bottom">
<p align="right">50</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">2</p>
</td>
<td width="64" valign="bottom">
<p align="right">60</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">3</p>
</td>
<td width="64" valign="bottom">
<p align="right">70</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">4</p>
</td>
<td width="64" valign="bottom">
<p align="right">80</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">5</p>
</td>
<td width="64" valign="bottom">
<p align="right">90</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">6</p>
</td>
<td width="64" valign="bottom">
<p align="right">100</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">7</p>
</td>
<td width="64" valign="bottom">
<p align="right">110</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">8</p>
</td>
<td width="64" valign="bottom">
<p align="right">120</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">9</p>
</td>
<td width="64" valign="bottom">
<p align="right">130</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">10</p>
</td>
<td width="64" valign="bottom">
<p align="right">140</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">11</p>
</td>
<td width="64" valign="bottom">
<p align="right">150</p>
</td>
</tr>
<tr>
<td width="64" valign="bottom">
<p align="right">12</p>
</td>
<td width="64" valign="bottom">
<p align="right">160</p>
</td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joshuamoranmth212s09.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joshuamoranmth212s09.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joshuamoranmth212s09.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joshuamoranmth212s09.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joshuamoranmth212s09.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joshuamoranmth212s09.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joshuamoranmth212s09.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joshuamoranmth212s09.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joshuamoranmth212s09.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joshuamoranmth212s09.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joshuamoranmth212s09.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joshuamoranmth212s09.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joshuamoranmth212s09.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joshuamoranmth212s09.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joshuamoranmth212s09.wordpress.com&amp;blog=6345358&amp;post=3&amp;subd=joshuamoranmth212s09&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joshuamoranmth212s09.wordpress.com/2009/02/02/first-block/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6510b6bc84fa204c7f245dada42d037?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jmoran1</media:title>
		</media:content>

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

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

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

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

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

		<media:content url="http://joshuamoranmth212s09.files.wordpress.com/2009/02/example2_combo.jpg" medium="image">
			<media:title type="html">example2_combo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
