create account

Mathematics - First-order Differential equation exercises by drifter1

View this thread on: hive.blogpeakd.comecency.com
· @drifter1 · (edited)
$16.11
Mathematics - First-order Differential equation exercises
<html>
<p><img src="http://freevector.co/wp-content/uploads/2013/03/10699-stretching-exercises1.png" width="400" height="400"/></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;Hello it's a me drifter1! Today we will do some <strong>exercises </strong>in the <strong>first-order differential equations</strong> that we covered in my two previous posts. I highly suggest you to read about them first, but don't worry we will get very in depth in most of them, so it's not important to know them perfectly!</p>
<p>So, without further do, let's get straight into it!</p>
<h2>Separable ( P(x)*dx + Q(y)*dy = 0 )</h2>
<p><em>1) y' = x^3/y^2</em></p>
<p><br></p>
<p>y' = dy/dx = x^3/y^2 =&gt;</p>
<p>x^3*dx = y^2 * dy. Separable ODE</p>
<p>And so we find the integral on both sides</p>
<p>integral (x^3*dx) = integral (y^2 * dy ) =&gt;</p>
<p>x^4/4 = y^3/3 + c1 =&gt;</p>
<p>y^3 = 3x^4/4 + 3c1 = 3x^4/4 + c2 =&gt;</p>
<p><strong>y = root-3(3x^4/4 + c2)</strong></p>
<p><br></p>
<p><em>2) (xy^2 - x) dx = (y+x^2y) dy</em></p>
<p><br></p>
<p>We take x as a common term for the left side and y for the right side.</p>
<p>That way:</p>
<p>x(y^2 - 1)dx = y(1 + x^2)dy =&gt;</p>
<p>x /( 1+x^2) dx = y / (y^2 - 1) dy. Separable ODE.</p>
<p>So, we take the integral in both sides.</p>
<p>integral [ x /( 1+x^2) dx ] = integral [ y / (y^2 - 1) dy ].</p>
<p>Both are ln(x) cases, because both are of the form: f'(x)/f(x) = ln(f(x))</p>
<p>That way we get:</p>
<p>1/2 ln|1+x^2| = 1/2 ln|y^2 - 1| + c1.</p>
<p>Let's suppose c1 as lnc and also take the coefficients of the ln's and put them as exponents.</p>
<p>That way we can do the following:</p>
<p>ln(x^2 + 1)^1/2 = ln(y^2 - 1)^1/2 + lnc =&gt;</p>
<p>ln(root(x^2 + 1) = ln(root(y^2 - 1)*c).</p>
<p>Supposing y^2 &gt;= 1 we then get:</p>
<p><strong>root(x^2 + 1) = root(y^2-1)*c</strong></p>
<p>From this final equation we can find our y solution</p>
<p><br></p>
<h2>Homogeneous ( y' = P(x,y) / Q(x,y), P/Q is 0-order homogeneous )</h2>
<p><em>1) y' = (x - y)/(x + 2y)</em></p>
<p><br></p>
<p>P(λx, λy) = λx - λy = λ(x - y) = λ P(x, y)</p>
<p>and</p>
<p>Q(λx, λy) = λx + 2λy = λ(x+2y) = λ Q(x, y)</p>
<p>This means that the quotient P/Q is 0-order homogeneous and so we have a homogeneous ODE.</p>
<p>Diving the numerator and denominator with x!= 0 we get:</p>
<p>y' = (x-y/x)/[(x+2y)/x] =&gt;</p>
<p>y' = (1 - y/x)/(1 + 2y/x). A function of y/x.</p>
<p>We substitute y/x with u = y/x and get:</p>
<p>y = ux =&gt; y' = (ux)'= u'x + u.</p>
<p>That way our given equation now is:</p>
<p>y' = u'x + u = (1 - u)/(1 + 2u) =&gt;</p>
<p>(du/dx) x + u = (1 - u)/(1 + 2u) =&gt;</p>
<p>(du/dx) x = (1 - u - 2u^2) /(1 + 2u) =&gt;</p>
<p>[(1 + 2u) / (1 - u - 2u^2)] du = (1/x) dx. A separable ODE.</p>
<p>By finding the integral in both sides we get:</p>
<p>integral [(1 + 2u) / (1 - u - 2u^2)] du = integral [ (1/x) dx ].</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;The left one is an Rational integral and needs to be solved with a special technique I covered <a href="https://steemit.com/mathematics/@drifter1/mathematical-analysis-integration-techniques-for-rational-functions">here</a>.</p>
<p>The right one is a basic ln(x) case.</p>
<p>Solving the left one (that I will not do now for simplicity) you get:</p>
<p>−2ln|2u−1|/3 − ln|u+1|/3 + c = ln|x|.</p>
<p>Substituting u back to u = y/x we then get our final solution:</p>
<p><strong>−2ln|2(y/x)−1|/3 − ln|(y/x)+1|/3 + c = ln|x|.</strong></p>
<p>From there we can find y if we want.</p>
<p><br></p>
<p><em>2) xy' - y = xe^(y/x)</em></p>
<p><br></p>
<p>Let's first move y to the other side:</p>
<p>xy' = xe^(y/x) + y</p>
<p>Dividing with x!=0 we get:</p>
<p>y' = e^(y/x) + y/x = F(x, y) (I)</p>
<p>where F(x, y) is off course homogeneous of 0-order.</p>
<p>Let's substitute using u = y/x =&gt; y = ux =&gt; y' = u'x + u.</p>
<p>From (I) we get:</p>
<p>y' = u'x + u = e^u + u =&gt;</p>
<p>u'x = e^u =&gt;</p>
<p>(du/dx) x = e^u =&gt;</p>
<p>e^(-u)du = (1/x) dx. Separable ODE</p>
<p>Finding the simple integral from both sides we get:</p>
<p>integral[ e^(-u)du ] = integral [ (1/x) dx ] =&gt;</p>
<p>-e^(-u) = ln|x| + c1 = ln|x| + lnc.</p>
<p>Substituting back using u = y/x and doing the ln addition we finally get:</p>
<p><strong>-e^(-y/x) = ln|cx|</strong></p>
<p><br></p>
<h2>Exact ( P(x, y)*dx + Q(x, y)*dy = 0, P'y == Q'x )</h2>
<p><em>1) (x - 2xy - 5)*dx -(x^2 +3y - 2)*dy = 0</em></p>
<p><br></p>
<p>Derivating P using y (partial derivative) we get:</p>
<p>P'y = (x - 2xy - 5)'y = 0 - 2x - 0 = -2x</p>
<p>Derivating Q using x (partial derivative) we get:</p>
<p>Q'x = [-(x^2 +3y - 2)]'x = -2x + 0 - 0 = -2x</p>
<p>P'y == Q'x and so we have an exact ODE.</p>
<p>Let's now find the solution using the method we discussed in part 1.</p>
<p>f(x, y) = integral[P(x,y)dx] = f1(x, y) + c1(y) =&gt;</p>
<p>f(x, y) = integral[x - 2xy - 5]dx = x^2/2 - x^2*y - 5x + c1(y) (I)</p>
<p>f'y = Q(x, y) and so from (I) we have:</p>
<p>[ x^2/2 - x^2*y - 5x + c1(y) ]'y = -(x^2 +3y - 2) =&gt;</p>
<p>0 - x^2 - 0 + c1'(y) = -x^2 -3y + 2 =&gt;</p>
<p>c1'(y) = -3y + 2 =&gt;</p>
<p>c1(y) = integral(-3y + 2)dy = -3y^2/2 + 2y + c2 (II)</p>
<p>From (I) and (II) we now have:</p>
<p>f(x, y) = x^2/2 - x^2*y - 5x -3y^2/2 + 2y + c2.</p>
<p>Because f(x, y) = c =&gt;</p>
<p><strong>&nbsp;x^2/2 - x^2*y - 5x -3y^2/2 + 2y = c</strong></p>
<p>This is our final solution!</p>
<p><br></p>
<p><em>2) 2yy' +2x + x^2 + y^2 = 0</em></p>
<p><br></p>
<p>By writing y' as dy/dx we can get to the form:</p>
<p>(2x + x^2 + y^2)dx + 2ydy = 0</p>
<p>P'y = 2y and Q'x = 0</p>
<p>This means that P'y != Q'x and so the given ODE is not exact.</p>
<p>Let's find the correct integrating factor (μ) to multiply with.</p>
<p>If μ = μ(x) then:</p>
<p>(P'y - Q'x)/Q : function of x</p>
<p>We have that:</p>
<p>(P'y - Q'x)/Q = (2y - 0)/2y = 1. A function of x!</p>
<p>So, μ = e^integral(1*dx) = e^x</p>
<p>Multiplying our ODE with e^x we get:</p>
<p>2ye^xdy +e^x(2x + x^2 + y^2)dx = 0.</p>
<p>Q'x = 2ye^x and P'y = 2ye^x</p>
<p>This means that we now have an exact ODE!</p>
<p>f(x, y) = integral[2ye^xdx] = 2ye^x - 2*integral(e^xdx) = 2ye^x - 2*e^x + c(y) (I)</p>
<p>(<a href="https://steemit.com/mathematics/@drifter1/mathematics-mathematical-analysis-integration-by-parts-technique">by parts technique</a>)</p>
<p>f'y = Q(x, y) =&gt;</p>
<p>[2ye^x - 2*e^x + c(y) ]'y = e^x (2x + x^2 + y^2) =&gt;</p>
<p>2e^x - 0 + c'(y) = e^x (2x + x^2 + y^2) &nbsp;=&gt;</p>
<p>c'(y) = e^x (2x + x^2 + y^2) - 2e^x =&gt;</p>
<p>c(y) = integral[e^x (2x + x^2 + y^2) - 2e^x ]dy =&gt;</p>
<p>c(y) = e^x*(2xy + x^2y + y^3/3) - 2ye^x) + c2 (II)</p>
<p><br>
From (I) and (II) we get:</p>
<p>f(x, y) = 2ye^x - 2*e^x + e^x*(2xy + x^2y + y^3/3) - 2ye^x) + c2 =&gt;</p>
<p><strong>2ye^x - 2*e^x + e^x*(2xy + x^2y + y^3/3) - 2ye^x) = c</strong></p>
<p><br></p>
<blockquote>That was some quick mafs! ;P</blockquote>
<p><br></p>
<h2>Linear ( y' + P(x)*y = Q(x) )</h2>
<p><em>1) y' = x (x^2 - 2y)</em></p>
<p><br></p>
<p>Let's solve it using the first method.</p>
<p>y' = x^3 - 2xy =&gt;</p>
<p>y' + 2xy = x^3 &nbsp;&nbsp;&nbsp;&nbsp;[of the form: y' + P(x)*y = Q(x)]</p>
<p>Let's use the two equations we talked about last time.</p>
<p>u = e^integral[P(x)dx] = e^integral[2xdx] = e^(x^2) + c</p>
<p>y = (1/u)* integral[u*Q(x)dx] =&gt;</p>
<p>y = e^(-x^2)*integral[e^(x^2)*x^3dx].</p>
<p>The integral can be solved using "by parts" and we get the solution:</p>
<p>y =1/2 * e^(-x^2) * [(x^2 − 1)*e^(x^2)] + c =&gt;</p>
<p><strong>y = 1/2 * e^(-x^2) * [x^2*e^(x^2) - e^(x^2)] + c</strong></p>
<p><br></p>
<p><em>2) xy' + x + y = 0</em></p>
<p><br></p>
<p>Let's solve this one with the second method.</p>
<p>Dividing with x!=0 we get:</p>
<p>y' + 1 + y/x = 0 =&gt;</p>
<p>y' + (1/x)*u = -1 &nbsp;&nbsp;&nbsp;[of the form: y' + P(x)*y = Q(x)]</p>
<p>We will substitute using y = gY.</p>
<p>Let's use the equations for g and Y to find them.</p>
<p>g = e^[-integral(Pdx)] = e^[-integral(1/xdx)] =&gt;</p>
<p>g = &nbsp;e^(-lnx) = e^ln(x^-1) =&gt;</p>
<p>g = x^(-1) = 1/x</p>
<p>Y = integral[(Q/g)dx] + c = integral[-1/(1/x)dx] +c =&gt;</p>
<p>Y = -integral(xdx) = -x^2/2 + c.</p>
<p>That way:</p>
<p>y = gY = 1/x*(-x^2/2 + c) =&gt;</p>
<p><strong>y = -x/2 + c/x</strong></p>
<p><br></p>
<h2>Bernoulli ( y' + P(x)*y + Q(x)*y^a = 0, a != 0, 1 )</h2>
<p><em>xy' - (1 - xy)y = 0</em></p>
<p><br></p>
<p>Let's do some calculations to end up with the correct form.</p>
<p>xy' - y + xy^2 = 0 =&gt;</p>
<p>y' - (1/x)y + y^2 = 0 &nbsp;[of the form: y' + P(x)y +Q(x)y^a = 0]</p>
<p>a = 2 and so we substitute using u = y^(1-2) = y^(-1) = 1/y.</p>
<p>u' = (-y')/y^2 =&gt;</p>
<p>u' = u^2*[(1/x)(1/u) - 1/u^2] =&gt; ... =&gt;</&gt;p>
<p>u' = - u/x + 1 =&gt; u' +(1/x)u = 1 [linear ODE]</p>
<p>To solve the linear we substitute using u = gU.</p>
<p>g = e^(-lnx) = 1/x</p>
<p>U = integral(1/(1/x))dx = integral(x)dx = x^2/2 + c.</p>
<p>That way u = 1/x * (x^2/2 + c) &nbsp;=&gt; u = x/2 + c/x</p>
<p>(almost the same as in the previous example)</p>
<p>By substituting y with 1/u we now get our final solution:</p>
<p><strong>y = 1 / (x/2 + c/x)</strong></p>
<p><br></p>
<h2>Riccati ( &nbsp;y' + P(x)*y^2 + Q(x)*y + R(x) = 0 )</h2>
<p><em>y' = 1 - x - x^2 + (1 + 2x^2) y - xy^2 and &nbsp;y1 = x one solution</em></p>
<p><br></p>
<p>y1 = x = h.</p>
<p>We substitute using y = Y + h = Y + x.</p>
<p>y' = Y' + 1 =&gt;</p>
<p>1 - x - x^2 + (1 + 2x^2) (Y+x) - x(Y + x)^2 = Y' + 1 =&gt;</p>
<p>Y' + x(Y^2 + 2Yx + x^2) - (1+x^2)(Y+x) + x + x^3 = 0 =&gt; ... =&gt;</p>
<p>Y' + xY^2 - Y = 0 =&gt; Y' - Y + xY^2 = 0 [Bernoulli ODE]</p>
<p>We substitute using u = Y^(1-2) = 1/Y =&gt; u' = -Y'/Y^2.</p>
<p>u' = -u^2*(1/u - x/u^2) =&gt;&nbsp;</p>
<p>u' = -u + x =&gt; u' + u = x [Linear ODE]</p>
<p>So, we substitute again using u = gU.</p>
<p>g = e^(-integral(1dx)) = e^(-lnx) = 1/x.</p>
<p>U = integral(Q/g)dx = integral[x/(1/x)] dx = integral(x^2dx) = x^3/3 + c.</p>
<p>And so u = 1/x*(x^3/3 + c) = x^2/3 + c/x</p>
<p>Substituting back to Y we get:</p>
<p>Y = 1/u = 1/( x^2/3 + c/x)</p>
<p>And again to y we get:</p>
<p>y = Y + x =&gt;</p>
<p><strong>y = &nbsp;1/( x^2/3 + c/x) + x</strong></p>
<p><br></p>
<h3>Image sources:</h3>
<p><a href="http://freevector.co/wp-content/uploads/2013/03/10699-stretching-exercises1.png">http://freevector.co/wp-content/uploads/2013/03/10699-stretching-exercises1.png</a><br>
</p>
<h3>Previous posts of the series:</h3>
<p><a href="https://steemit.com/mathematics/@drifter1/mathematics-differential-equations-introduction">Introduction </a>-&gt; Definition and Applications</p>
<p><a href="https://steemit.com/mathematics/@drifter1/mathematics-ordinary-first-order-differential-equations-part-1">First-order part(1) </a>-&gt; &nbsp;Separable, homogeneous and exact 1st-order ODE's</p>
<p><a href="https://steemit.com/mathematics/@drifter1/mathematics-ordinary-first-order-differential-equations-part-2">First-order part(2)</a> -&gt; Linear, Bernoulli and Riccati first-order ODE's</p>
<p><br>
And this is actually it!</p>
<p>Next time we will get into linear 2nd-order DE's with constant coeffs.</p>
<p>Bye bye!</p>
</html>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 73 others
properties (23)
authordrifter1
permlinkmathematics-first-order-differential-equation-exercises
categorymathematics
json_metadata{"tags":["mathematics","steemiteducation","differential","equation","exercises"],"image":["http://freevector.co/wp-content/uploads/2013/03/10699-stretching-exercises1.png"],"links":["https://steemit.com/mathematics/@drifter1/mathematical-analysis-integration-techniques-for-rational-functions","https://steemit.com/mathematics/@drifter1/mathematics-mathematical-analysis-integration-by-parts-technique","http://freevector.co/wp-content/uploads/2013/03/10699-stretching-exercises1.png","https://steemit.com/mathematics/@drifter1/mathematics-differential-equations-introduction","https://steemit.com/mathematics/@drifter1/mathematics-ordinary-first-order-differential-equations-part-1","https://steemit.com/mathematics/@drifter1/mathematics-ordinary-first-order-differential-equations-part-2"],"app":"steemit/0.1","format":"html"}
created2018-03-06 18:53:12
last_update2018-03-06 19:14:45
depth0
children1
last_payout2018-03-13 18:53:12
cashout_time1969-12-31 23:59:59
total_payout_value12.440 HBD
curator_payout_value3.666 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11,001
author_reputation98,202,866,830,354
root_title"Mathematics - First-order Differential equation exercises"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id42,687,676
net_rshares4,041,790,008,758
author_curate_reward""
vote details (137)
@steemstem-bot ·
$0.57
<center><a href="www.steemit.com/@steemstem"><img src="https://media.discordapp.net/attachments/384404201544876032/405507994583957505/steemSTEM.png"></a><br><table><tr><th> </th><th> </th><th><a href="https://steemit.com/steemstem/@steemstem/helpful-guidelines-for-crafting-steemstem-content">Guidelines</a></th><th><a href="https://steemit.com/steemstem/@steemstem/steemstem-winter-2017-2018-project-update">Project Update</a></th><th> </th><th> </th></tr></table><br><a href="https://steemit.com/steemstem/@steemstem/being-a-member-of-the-steemstem-community"><b>Being A SteemStem Member</b></a></center>
👍  ,
properties (23)
authorsteemstem-bot
permlinkre-mathematics-first-order-differential-equation-exercises-20180307t010326
categorymathematics
json_metadata""
created2018-03-07 01:03:27
last_update2018-03-07 01:03:27
depth1
children0
last_payout2018-03-14 01:03:27
cashout_time1969-12-31 23:59:59
total_payout_value0.568 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length606
author_reputation3,811,533,615,496
root_title"Mathematics - First-order Differential equation exercises"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id42,747,113
net_rshares145,032,496,873
author_curate_reward""
vote details (2)