Lucas Kent e39465ad2f Changes to be committed:
new file:   Files/flashplayer_32_sa.exe
	new file:   favicon.ico
	new file:   globe.gif
	new file:   imgs/download.png
	new file:   imgs/zuck.jpg
	new file:   index.html
	new file:   other.ico
	new file:   script.js
	new file:   site.webmanifest
	new file:   sitemap.html
	new file:   styles/backround.css
	new file:   styles/border.css
	new file:   styles/fonts/Titillium_Web/OFL.txt
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf
	new file:   styles/fonts/webfontkit-20221027-163353/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2
	new file:   styles/fonts/webfontkit-20221027-165950/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2
	new file:   styles/style.css
	new file:   tools/2048/.gitignore
	new file:   tools/2048/.jshintrc
	new file:   tools/2048/CONTRIBUTING.md
	new file:   tools/2048/LICENSE.txt
	new file:   tools/2048/README.md
	new file:   tools/2048/Rakefile
	new file:   tools/2048/favicon.ico
	new file:   tools/2048/index.html
	new file:   tools/2048/js/animframe_polyfill.js
	new file:   tools/2048/js/application.js
	new file:   tools/2048/js/bind_polyfill.js
	new file:   tools/2048/js/classlist_polyfill.js
	new file:   tools/2048/js/game_manager.js
	new file:   tools/2048/js/grid.js
	new file:   tools/2048/js/html_actuator.js
	new file:   tools/2048/js/keyboard_input_manager.js
	new file:   tools/2048/js/local_storage_manager.js
	new file:   tools/2048/js/tile.js
    new file:   tools/2048/meta/apple-touch-icon.png
	new file:   tools/webretro/cores/neocd_libretro.js
	new file:   tools/webretro/cores/neocd_libretro.wasm
	new file:   tools/webretro/cores/nestopia_libretro.js
	new file:   tools/webretro/cores/nestopia_libretro.wasm
	new file:   tools/webretro/cores/o2em_libretro.js
	new file:   tools/webretro/cores/o2em_libretro.wasm
	new file:   tools/webretro/cores/opera_libretro.js
	new file:   tools/webretro/cores/opera_libretro.wasm
2022-11-02 08:40:01 -04:00

277 lines
18 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en"><!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
<!-- Mirrored from www.mathsisfun.com/calculus/separation-variables.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:49:24 GMT -->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- #BeginEditable "doctitle" -->
<title>Separation of Variables</title>
<meta name="description" content="Math explained in easy language, plus puzzles, games, quizzes, worksheets and a forum. For K-12 kids, teachers and parents.">
<style>
.integral { font: 170% Georgia, Arial; position: relative; top: 3px; padding: 0 1px 0 0.2rem;}
</style>
<!-- #EndEditable -->
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="HandheldFriendly" content="true">
<meta name="referrer" content="always">
<link rel="stylesheet" href="../style4.css">
<script src="../main4.js"></script>
<script>document.write(gTagHTML())</script>
</head>
<body id="bodybg" class="adv">
<div id="stt"></div>
<div id="adTop"></div>
<header>
<div id="hdr"></div>
<div id="tran"></div>
<div id="adHide"></div>
<div id="cookOK"></div>
</header>
<div class="mid">
<nav>
<div id="menuWide" class="menu"></div>
<div id="logo"><a href="../index.html"><img src="../images/style/logo-adv.svg" alt="Math is Fun"></a></div>
<div id="search" role="search"></div>
<div id="linkto"></div>
<div id="menuSlim" class="menu"></div>
<div id="menuTiny" class="menu"></div>
</nav>
<div id="extra"></div>
<article id="content" role="main">
<!-- #BeginEditable "Body" -->
<h1 class="center">Separation of Variables</h1>
<p class="center">Separation of Variables is a special method to solve some Differential Equations</p>
<div class="def">
<p>A <a href="differential-equations.html">Differential Equation</a> is an equation with a <a href="../sets/function.html">function</a> and one or more of its <a href="derivatives-introduction.html">derivatives</a>:</p>
<p class="center"><img src="images/diff-eq-sep-var.svg" alt="dy/dx = 5xy"><br>
Example: an equation with the function <b>y</b> and its
derivative<b> <span class="intbl"> <em>dy</em> <strong>dx</strong> </span></b> &nbsp;</p>
</div>
<h2>When Can I Use it?</h2>
<div class="center80">
<p style="float:left; margin: 0 10px 5px 0;"><img src="images/diff-eq-sep-var-a.svg" alt="Separation of Variables: dy/dx = 5xy becomes dy/y = 5x dx"></p>
<p>Separation of Variables can be used when:</p>
<p>All the y terms (including dy) can be moved to one side of the equation, and</p>
<p>All the x terms (including dx) to the other side.</p>
<div style="clear:both"></div>
</div>
<h2>Method</h2>
<p><strong>Three Steps:</strong></p>
<ul>
<li><strong>Step 1</strong> Move all the y terms (including dy) to one side of the equation and all the x terms (including dx) to the other side.</li>
<li><strong>Step 2 </strong>Integrate one side with respect to <b>y</b> and the other side with respect to <b>x</b>. Don't forget "+ C" (the constant of integration).</li>
<li><b>Step 3</b> Simplify</li>
</ul>
<div class="example">
<h3>Example: Solve this (k is a constant):</h3>
<p class="center larger">&nbsp; <span class="intbl"> <em>dy</em> <strong>dx</strong> </span> = ky</p>
<p><strong>Step 1</strong> Separate the variables by moving all the y terms to one side of the equation and all the x terms to the other side:</p>
<div class="tbl">
<div class="row"><span class="left">Multiply both sides by dx:</span><span class="right">&nbsp;dy = ky dx</span></div>
<div class="row"><span class="left">Divide both sides by y:</span><span class="right"> <span class="intbl"> <em>dy</em> <strong>y</strong> </span> = k dx</span></div>
</div>
<p><strong>Step 2 </strong><a href="integration-introduction.html">Integrate</a> both sides of the equation separately:</p>
<div class="tbl">
<div class="row"><span class="left">Put the integral sign in front:</span><span class="right"><span class="center"><span class="integral"></span> <span class="intbl"><em>dy</em> <strong>y</strong> </span> = <span class="integral"></span> k dx </span></span></div>
<div class="row"><span class="left">Integrate left side:</span><span class="right">&nbsp;ln(y) + C = <span class="center"><span class="integral"></span> k dx </span></span></div>
<div class="row"><span class="left">Integrate right side: </span><span class="right">&nbsp;ln(y) + C = kx + D </span></div>
</div>
<p>C is the constant of integration. And we use D for the other, as it is a different constant.</p>
<p>&nbsp;</p>
<p><strong>Step 3 </strong> Simplify:</p>
<div class="tbl">
<div class="row"><span class="left">We can roll the two constants into one (a=DC): </span><span class="right"><b>&nbsp;</b><span class="larger">ln(y) = kx + a </span></span></div>
<div class="row"><span class="left"><b>e<sup>(ln(y))</sup> = y</b> , so let's <a href="../algebra/exponents-logarithms.html">take exponents</a> on both sides:</span><span class="right"><span class="larger">y = e<sup>kx + a</sup> </span></span></div>
<div class="row"><span class="left"> And <b>e<sup>kx + a</sup> = e<sup>kx</sup> e<sup>a</sup></b> so we get:</span><span class="right"><span class="larger">y = e<sup>kx</sup> e<sup>a</sup></span></span></div>
<div class="row"><span class="left"><span class="larger"> <b>e<sup>a</sup></b></span> is just a constant so we replace it with <b>c</b>:</span><span class="right"><span class="larger">y = ce<sup>kx</sup></span></span></div>
</div>
<p>We have solved it:</p>
<p class="center"><span class="larger">y = ce<sup>kx</sup></span></p>
<p>This is a general type of first order differential equation which turns up in all sorts of unexpected places in real world examples.</p>
</div>
<p>We used <b>y</b> and <b>x</b>, but the same method works for other variable names, like this:</p>
<div class="example">
<p style="float:right; margin: 0 0 5px 10px;"><img src="images/rabbits.jpg" alt="rabbits" height="147" width="200"></p>
<h3>Example: Rabbits!</h3>
<p>The more rabbits you have the more baby rabbits you will get. Then those rabbits grow up and have babies too! The population will grow faster and faster.</p>
<p>The important parts of this are:</p>
<ul>
<li>the population <b>N</b> at any time <b>t</b></li>
<li>the growth rate <b>r</b></li>
<li>the population's rate of change <span class="larger"> <span class="center larger"> <span class="intbl"> <em>dN</em> <strong>dt</strong> </span> </span> </span></li>
</ul>
<p>The rate of change at any time equals the growth rate times the population:</p>
<p class="center larger"><span class="intbl"> <em>dN</em> <strong> dt</strong> </span> = rN</p>
<p>But hey! This is the same as the equation we just solved! It just has different letters:</p>
<ul>
<li>N instead of y</li>
<li>t instead of x</li>
<li>r instead of k</li>
</ul>
<p>So we can jump to a solution:</p>
<p class="center"><span class="larger">N = ce<sup>rt</sup></span></p>
<p>&nbsp;</p>
<p>And here is an example, the graph of <span class="center"><span class="larger">N = 0.3e<sup>2t</sup></span></span>:</p>
<p class="center"><img src="images/exponential-growth.gif" alt="exponential growth" height="213" width="233"><br>
Exponential Growth</p>
</div>
<p>There are other equations that follow this pattern such as <a href="../money/compound-interest.html">continuous compound interest</a>.</p>
<h2>More Examples</h2>
<p>OK, on to some different examples of separating the variables:</p>
<div class="example">
<h3>Example: Solve this:</h3>
<p class="center larger"><span class="intbl"><em>dy</em><strong>dx</strong></span> = <span class="intbl"><em>1</em><strong>y</strong></span></p>
<p>&nbsp;</p>
<p><strong>Step 1</strong> Separate the variables by moving all the y terms to one side of the equation and all the x terms to the other side:</p>
<div class="tbl">
<div class="row"><span class="left">Multiply both sides by dx:</span><span class="right">dy = (1/y) dx</span></div>
<div class="row"><span class="left">Multiply both sides by y:</span><span class="right"> y dy = dx</span></div>
</div>
<p><strong>Step 2 </strong><a href="integration-introduction.html">Integrate</a> both sides of the equation separately:</p>
<div class="tbl">
<div class="row"><span class="left">Put the integral sign in front:</span><span class="right"><span class="center"><span class="integral"></span> y dy = <span class="integral"></span> dx </span></span></div>
<div class="row"><span class="left">Integrate each side:</span><span class="right">&nbsp;(y<sup>2</sup>)/2 = x + C<span class="center"> </span></span></div>
</div>
<p>We integrated both sides in the one line.</p>
<p>We also used a shortcut of just one constant of integration <b>C.</b> This is perfectly OK as we could have +D on one, +E on the other and just say that C = ED.</p>
<p>&nbsp;</p>
<p><strong>Step 3 </strong> Simplify:</p>
<div class="tbl">
<div class="row"><span class="left">Multiply both sides by 2: </span><span class="right"><span class="larger">y<sup>2</sup> = 2(x + C)<span class="center"> </span></span></span></div>
<div class="row"><span class="left">Square root of both sides:</span><span class="right"><span class="larger">y = ±√(2(x + C))</span></span></div>
</div>
<p><i>Note: This is not the same as y = √(2x) + C, because the C was added <b>before</b> we took the square root. This happens a lot with differential equations. We cannot just add the C at the end of the process. It is added when doing the integration.</i></p>
<p>We have solved it:</p>
<p class="center"><span class="larger">y = ±√(2(x + C))</span></p>
</div>
<p>A harder example:</p>
<div class="example">
<h3>Example: Solve this:</h3>
<p class="center larger"><span class="intbl"><em>dy</em><strong>dx</strong></span> = <span class="intbl"><em>2xy</em><strong>1+x<sup>2</sup></strong></span></p>
<p>&nbsp;</p>
<p><strong>Step 1</strong> Separate the variables:</p>
<p>Multiply both sides by dx, divide both sides by y:</p>
<p class="center larger"><span class="intbl"><em>1</em><strong>y</strong></span> dy = <span class="intbl"><em>2x</em><strong>1+x<sup>2</sup></strong></span>dx</p>
<p><strong>Step 2 </strong><a href="integration-introduction.html">Integrate</a> both sides of the equation separately:</p>
<p class="center larger"><span class="integral"></span><span class="intbl"><em>1</em><strong>y</strong></span> dy = <span class="integral"></span><span class="intbl"><em>2x</em><strong>1+x<sup>2</sup></strong></span>dx</p>
<p>The left side is a simple logarithm, the right side can be integrated using substitution:</p>
<div class="tbl">
<div class="row"><span class="left">Let <b>u = 1 + x<sup>2</sup></b>, so <b>du = 2x dx</b>:</span><span class="right"><span class="integral"></span><span class="intbl"><em>1</em><strong>y</strong></span> dy = <span class="integral"></span><span class="intbl"><em>1</em><strong>u</strong></span>du</span></div>
<div class="row"><span class="left">Integrate:</span><span class="right">ln(y) = ln(u) + C</span></div>
<div class="row"><span class="left">Then we make <b>C = ln(k)</b>:</span><span class="right">ln(y) = ln(u) + ln(k)</span></div>
<div class="row"><span class="left">So we can get this:</span><span class="right">y = uk</span></div>
<div class="row"><span class="left">Now put u = 1 + x<sup>2</sup> back again:</span><span class="right">y = k(1 + x<sup>2</sup>) </span></div>
</div>
<p>&nbsp;</p>
<p><strong>Step 3 </strong> Simplify:</p>
<p>It is already as simple as can be. We have solved it:</p>
<p class="center"><span class="larger">y = k(1 + x<sup>2</sup>) </span></p>
</div>
<p>An even harder example: the famous <i><b>Verhulst Equation</b></i></p>
<div class="example">
<p style="float:right; margin: 0 0 5px 10px;"><img src="images/rabbits.jpg" alt="rabbits" height="147" width="200"></p>
<h3>Example: Rabbits Again!</h3>
<p>Remember our growth Differential Equation:</p>
<p class="center larger"><span class="intbl"><em>dN</em><strong>dt</strong></span> = rN</p>
<p class="center larger">&nbsp;</p>
<p>Well, that growth can't go on forever as they will soon run out of available food.</p>
<p>A guy called Verhulst included <b>k</b> (the maximum population the food can support) to get:</p>
<p class="center larger"><span class="intbl"><em>dN</em><strong>dt</strong></span> = rN(1N/k)</p>
<p class="center"><i><b>The Verhulst Equation</b></i></p>
<p>Can this be solved?</p>
<p>Yes, with the help of one trick ...</p>
<p>&nbsp;</p>
<p><strong>Step 1</strong> Separate the variables:</p>
<div class="tbl">
<div class="row"><span class="left">Multiply both sides by dt:</span><span class="right">&nbsp;dN = rN(1N/k) dt</span></div>
<div class="row"><span class="left">Divide both sides by <span class="larger">N(1-N/k)</span>:</span><span class="right"><span class="intbl"><em>1</em><strong>N(1N/k)</strong></span>dN = r dt</span></div>
</div>
<p>&nbsp;</p>
<p><strong>Step 2 </strong>Integrate:</p>
<p class="center larger"><span class="integral"></span><span class="intbl"><em>1</em><strong>N(1N/k)</strong></span>dN = <span class="integral"></span> r dt</p>
<p>Hmmm... the left side looks hard to integrate. In fact it can be done with a little trick<span class="left"> from <a href="../algebra/partial-fractions.html">Partial Fractions</a></span> ... we rearrange it like this:</p>
<div class="tbl">
<div class="row"><span class="left">We start with this:</span><span class="right"><span class="intbl"><em>1</em><strong>N(1N/k)</strong></span></span></div>
<div class="row"><span class="left">Multiply top and bottom by k:</span><span class="right"><span class="intbl"><em>k</em><strong>N(kN)</strong></span></span></div>
<div class="row"><span class="left">Now here is the trick, add <b>N</b> and <b>N</b> to the top:</span><span class="right"><span class="intbl"><em>N+kN</em><strong>N(kN)</strong></span></span></div>
<div class="row"><span class="left">and split it into two fractions<a href="../algebra/partial-fractions.html"></a>:</span><span class="right"><span class="intbl"><em>N</em><strong>N(kN)</strong></span> + <span class="intbl"><em>kN</em><strong>N(kN)</strong></span></span></div>
<div class="row"><span class="left">Simplify each fraction:</span><span class="right"><span class="intbl"><em>1</em><strong>kN</strong></span> + <span class="intbl"><em>1</em><strong>N</strong></span></span></div>
</div>
<p>Now it is a lot easier to solve. We can integrate each term separately, like this:</p>
<div class="tbl">
<div class="row"><span class="left">Our full equation is now:</span><span class="right"><span class="integral"></span><span class="intbl"><em>1</em><strong>kN</strong></span>dN + <span class="integral"></span><span class="intbl"><em>1</em><strong>N</strong></span>dN = <span class="integral"></span> r dt</span></div>
<div class="row"><span class="left">Integrate:</span><span class="right">ln(kN) + ln(N) = rt + C</span></div>
</div>
<p><i>(Why did that become <b>minus</b> ln(kN)? Because we are integrating with respect to N.)</i></p>
<p>&nbsp;</p>
<p><strong>Step 3 </strong> Simplify:</p>
<div class="tbl">
<div class="row"><span class="left">Negative of all terms:</span><span class="right">ln(kN) ln(N) = rt C</span></div>
<div class="row"><span class="left">Combine ln():</span><span class="right">ln((kN)/N) = rt C</span></div>
<div class="row"><span class="left">Now <a href="../algebra/exponents-logarithms.html">take exponents</a> on both sides:</span><span class="right">(kN)/N = e<sup>rtC</sup></span></div>
<div class="row"><span class="left"> Separate the powers of e:</span><span class="right"><span class="larger">(kN)/N = e<sup>rt</sup> e<sup>C</sup></span></span></div>
<div class="row"><span class="left"><b>e<sup>C</sup></b> is a constant, we can replace it with <b>A:</b></span><span class="right"><span class="larger">(kN)/N = Ae<sup>rt</sup></span></span></div>
</div>
<p>&nbsp;</p>
<p>We are getting close! Just a little more algebra to get N on its own:</p>
<div class="tbl">
<div class="row"><span class="left">Separate the fraction terms:</span><span class="right">(k/N)1 = Ae<sup>rt</sup></span></div>
<div class="row"><span class="left">Add 1 to both sides:</span><span class="right">k/N = 1 + Ae<sup>rt</sup></span></div>
<div class="row"><span class="left">Divide both by k:</span><span class="right">1/N = (1 + Ae<sup>rt</sup>)/k</span></div>
<div class="row"><span class="left">Reciprocal of both sides:</span><span class="right">N = k/(1 + Ae<sup>rt</sup>)</span></div>
</div>
<p>And we have our solution:</p>
<p class="center large">N = <span class="intbl"><em>k</em><strong>1 + Ae<sup>rt</sup></strong></span></p>
<p>&nbsp;</p>
<p class="center">Here is an <b>example</b>, the graph of <span class="large"><span class="intbl"><em>40</em><strong>1 + 5e<sup>2t</sup></strong></span></span></p>
<p class="center"><img src="images/verhulst.gif" alt="verhulst" height="216" width="297"><br>
It starts rising exponentially,<br>
then flattens out as it reaches k=40</p>
</div>
<p>&nbsp;</p>
<div class="questions">
<script>getQ(9409, 9410, 9411, 9412, 9413, 9414, 9415, 9416, 9417, 9418);</script>&nbsp;
</div>
<div class="related">
<a href="differential-equations.html">Differential Equation</a>
<a href="index.html">Calculus Index</a>
</div>
<!-- #EndEditable -->
</article>
<div id="adend" class="centerfull noprint"></div>
<footer id="footer" class="centerfull noprint"></footer>
<div id="copyrt">Copyright © 2020 MathsIsFun.com</div>
</div>
</body><!-- #EndTemplate -->
<!-- Mirrored from www.mathsisfun.com/calculus/separation-variables.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:49:25 GMT -->
</html>