(9 intermediate revisions by the same user not shown)
Line 54: Line 54:
  
  
''' <big><big><big> 3.3 The Exact Differential Equation for <math>f(x,y)+g(x,y)\frac{dy}{dx}=0</math> </big></big></big> '''
+
''' <big><big><big> 3.3 The Exact Differential Equation <math>f(x,y)+g(x,y)\frac{dy}{dx}=0</math> </big></big></big> '''
  
 
''' <font size="4px"> 3.3.1 Concept </font> '''
 
''' <font size="4px"> 3.3.1 Concept </font> '''
Line 64: Line 64:
  
  
By the expansion of Taylor series, <math>\psi (x,y(x))</math> can always be written as <math>f_1(x)g_1(y)+f_2(x)g_2(y)+...+f_n(x)g_n(y)</math>. Then still finding its derivative but now by product rule, we have <math>\frac{d\psi}{dx}=f'_1(x)g_1(y)+f_1(x)g'_1(y)\frac{dy}{dx}+f'_2(x)g_2(y)+f_2(x)g'_2(y)\frac{dy}{dx}+...+f'_n(x)g_n(y)+f_n(x)g'_n(y)\frac{dy}{dx}=0</math>.
+
A function <math>\psi (x,y(x))</math> can always be separated as <math>f_1(x)g_1(y)+f_2(x)g_2(y)+...+f_n(x)g_n(y)</math>. Then still finding its derivative but now by product rule, we have <math>\frac{d\psi}{dx}=f'_1(x)g_1(y)+f_1(x)g'_1(y)\frac{dy}{dx}+f'_2(x)g_2(y)+f_2(x)g'_2(y)\frac{dy}{dx}+...+f'_n(x)g_n(y)+f_n(x)g'_n(y)\frac{dy}{dx}=0</math>.
  
  
Rearrange the above function, we have <math>\frac{d\psi}{dx}=[f'_1(x)g_1(y)+f'_2(x)g_2(y)+...+f'_n(x)g_n(y)]+[f_1(x)g'_1(y)+f_2(x)g'_2(y)+f_n(x)g'_n(y)]\frac{dy}{dx}=0</math>. This is where our standard form for exact differential equation <math>f(x,y)+g(x,y)\frac{dy}{dx}=0</math> basically comes from.  
+
Rearrange the above function, we have <math>\frac{d\psi}{dx}=[f'_1(x)g_1(y)+f'_2(x)g_2(y)+...+f'_n(x)g_n(y)]+[f_1(x)g'_1(y)+f_2(x)g'_2(y)+f_n(x)g'_n(y)]\frac{dy}{dx}=0</math>. This is where our standard form for exact differential equations <math>f(x,y)+g(x,y)\frac{dy}{dx}=0</math> basically comes from.  
  
  
Line 76: Line 76:
  
  
This is a perceptual understanding of exact differential equation. </font>
+
This is a perceptual understanding of exact differential equations. </font>
  
  
 
''' <font size="4px"> 3.3.2 Example </font> '''
 
''' <font size="4px"> 3.3.2 Example </font> '''
 +
 
<font size="3px"> We want to solve the differential equation <math>xy+\frac{x^2}{2}\frac{dy}{dx}=0</math>.
 
<font size="3px"> We want to solve the differential equation <math>xy+\frac{x^2}{2}\frac{dy}{dx}=0</math>.
  
Comparing with the standard form <math>f(x,y)+g(x,y)\frac{dy}{dx}=0</math>, we have <math>f(x,y)=xy</math>, <math>g(x,y)=\frac{x^2}{2}</math>. Find their derivatives, <math>\frac{∂f}{∂y}=x=\frac{x^2}{2}</math>. So this differential equation is exact.
+
Comparing with the standard form <math>f(x,y)+g(x,y)\frac{dy}{dx}=0</math>, we have <math>f(x,y)=xy</math>, <math>g(x,y)=\frac{x^2}{2}</math>. Find their derivatives, <math>\frac{∂f}{∂y}=x=\frac{∂g}{∂x}</math>. So this differential equation is exact.
 +
 
 +
Set <math>\frac{∂F}{∂x}=f=xy</math>, then do the integration <math>F=\int xydx=\frac{x^2}{2}+h(y)</math> to obtain the main part of the solution. As we did the integration with respect to <math>x</math>, <math>h(y)</math> here is only a constant. The next several steps are to find this constant.
 +
 
 +
Calculate the partial derivative of <math>F</math> with respect to <math>y</math> to get <math>\frac{∂F}{∂y}=\frac{x^2}{2}+\frac{dh}{dy}</math>, which is equal to <math>g(x,y)=\frac{x^2}{2}</math> (<math>\frac{∂f}{∂y}=\frac{∂g}{∂x}</math> is already checked).
 +
 
 +
This gives us <math>\frac{x^2}{2}+\frac{dh}{dy}=\frac{x^2}{2}</math>. So <math>\frac{dh}{dy}=0</math>, <math>h</math> must be a real constant A. Plug it back to the previous <math>F</math>, then <math>F=\frac{x^2}{2}+A</math>.
 +
 
 +
Since either <math>f(x,y)</math>, <math>g(x,y)</math>, or <math>F</math> are set by us to solve the equation (originally it only has <math>x</math>, <math>y</math> and the differential term <math>\frac{dy}{dx}</math>), we need to get rid of them and have <math>y(x)</math> as a final solution. Hence, give our <math>F</math> function a value <math>C</math> such that <math>F=C</math>, where <math>C</math> is a real constant. This gives us <math>\frac{x^2y}{2}+A=C</math>, <math>\frac{x^2y}{2}=B</math>, where <math>B=C-A</math>.
 +
 
 +
Rearrange the function to have out general solution in the <math>y(x)</math> form, <math>y=\frac{D}{x^2}</math>, where <math>D</math> is a real constant.
 +
 
 +
Now it's your turn: We have an initial value y(1)=4 to this differential equation. Find the explicit solution.</font>
 +
 
 +
 
 +
''' <big><big><big> 3.4 Exercises </big></big></big> '''
 +
 
 +
<font size="3px">Solve the following differential equations, using the methods above.
 +
 
 +
'''&#183;''' <math>t\frac{dy}{dt}=ylnt</math>, <math>y(1)=0</math>.
 +
 
 +
'''&#183;''' <math>3xy+y^2=(2x^2+xy)\frac{dy}{dx} </math>, <math>y(1)=0</math>.
  
Set <math>\frac{∂F}{∂x}=f=xy</math>, then do the integration <math>F=\int xydx=\frac{x^2}{2}+h(y)</math>. As we did the integration with respect to <math>x</math>, <math>h(y)</math> here is only a constant.
+
'''&#183;''' <math>\frac{dy}{dt}+t^2y=2te^{-3t^2}</math>, <math>y(1)=0</math>
</font>
+
  
  
''' <big><big><big> 3.5 References </big></big></big> '''
+
''' <small><big><big> 3.5 References </big></big></small> '''
  
 
<font size="3px">Exact Equations Intuition. ''Khan Academy.'' Retrieved from https://www.khanacademy.org/math/differential-equations/first-order-differential-equations/exact-equations/v/exact-equations-intuition-1-proofy on 15 Nov 2017.
 
<font size="3px">Exact Equations Intuition. ''Khan Academy.'' Retrieved from https://www.khanacademy.org/math/differential-equations/first-order-differential-equations/exact-equations/v/exact-equations-intuition-1-proofy on 15 Nov 2017.

Latest revision as of 14:31, 17 November 2017

Basic Methods to Solve 1st-Order ODEs

A slecture by Yijia Wen

3.0 Abstract

By now we have known what is a differential equation and how its solutions conduct. It's time to solve it, like plenty of linear equations we have done before.


3.1 Separable Equation for $ \frac{dy}{dt}=f(y)g(t) $

3.3.1 Concept

The easiest method is to separate the variables. This method is switching the variables to make the same variable on the same side, in order to integral on both sides and solve out the function (solution) The standard form of differential equation to use this method is like $ \frac{dy}{dt}=f(y)g(t) $, where $ f(y) $ and $ g(t) $ are easy to be separated out.

3.3.2 Example

We want to solve the differential equation $ \frac{dy}{dt}=-2yt $, with the initial value $ y(0)=1 $.

Now we start separating our variables. We put all items with respect to our dependent variable $ y $ on the left hand side of the equation, and all with respect to our independent variable $ t $ on the right hand side. Hence we get $ \frac{1}{y}dy=-2tdt $.

Integrate on both sides $ \int\frac{1}{y}dy=\int-2tdt $ and get $ ln|y|=-t^2+C $, where $ C $ is a constant.

Reconstruct this equation, $ y=e^{-t^2+C}=e^C e^{-t^2}=Ae^{-t^2} $, where $ A $ is a constant, $ A=e^C $.

Plug in the initial value $ y(0)=1 $. We have $ Ae^0=1 $, so $ A=1 $.

So the final solution is $ y=e^{-t^2} $. This corresponds to the concept we built up in the previous tutorials: The solution to a differential equation is a function.


3.2 Integrating Factor for $ \frac{dy}{dt}+p(t)y=q(t) $

3.2.1 Concept

Those differential equations that can be solved by the above method are pretty special (and easy). There is a more common form for first-ordered differential equations: $ \frac{dy}{dt}+p(t)y=q(t) $, where $ p(t) $ and $ q(t) $ are polynomials with respect to $ t $. Sometimes we have coefficients for $ \frac{dy}{dt} $, just divide them on both sides to obtain the standard form. This method is constructing a "trivial" derivative of a function, then integrating on both sides to obtain the final solution.

3.2.2 Example

We want to solve the differential equation $ t\frac{dy}{dt}=te^{2t}-y $, with the initial value $ y(0.5)=4 $. Divide the coefficient $ t $ of $ \frac{dy}{dt} $, we have $ \frac{dy}{dt}+\frac{1}{t}y=e^{2t} $.

The key part for this method is to find the multiplier, which is known as integrating factor, to construct the derivative structure. The hardworking mathematicians found an effective integrating factor, $ e^{\int p(t)dt} $. In this case, $ p(t)=\frac{1}{t} $. So our integrating factor $ I=e^{\int \frac{1}{t}dt}=e^{ln|t|}=|t| $. From our initial condition, when $ t=0.5 $, $ y=4 $. Hence $ t>0 $. So $ I=t $.

Multiply the factor on both sides of the equation, $ t\frac{dy}{dt}+y=te^{2t} $.

Apply the inverse of product rule for calculating derivative $ fg'+f'g=\frac{d}{dx} $. Replace $ f $ by $ I=t $, and replace $ g $ by $ y $ to obtain $ t\frac{dy}{dt}+y=ty'+t'y=\frac{d}{dt}(ty) $. Hence we have $ \frac{d}{dt}(ty)=te^{2t} $.

Integrate on both sides, $ ty=\int te^{2t}dt=\frac{t}{2}e^{2t}-\frac{1}{4}e^{2t}+C $.

Rearrange the equation to have $ y=\frac{1}{2}e^{2t}-\frac{1}{4t}e^{2t}+\frac{C}{t} $.

Plug in the initial value $ y(0.5)=4 $ to have $ y=\frac{1}{2}e-\frac{1}{2}e+2C=2C=4 $, $ C=2 $.

Therefore, the explicit solution to the differential equation is $ y=\frac{1}{2}e^{2t}-\frac{1}{4t}e^{2t}+\frac{2}{t} $.



3.3 The Exact Differential Equation $ f(x,y)+g(x,y)\frac{dy}{dx}=0 $

3.3.1 Concept

An exact differential equation is a certain type of differential equation. So first of all, what does "exact" mean?


Suppose we have a compound function $ \psi (x,y(x))=C $, where $ y $ is a function of $ x $ and $ C $ is a constant. Finding its derivative, we have $ \frac{d}{dx}\psi (x,y(x))=\frac{∂\psi}{∂x}+\frac{∂\psi}{dy} \frac{dy}{dx}=0 $ by chain rule.


A function $ \psi (x,y(x)) $ can always be separated as $ f_1(x)g_1(y)+f_2(x)g_2(y)+...+f_n(x)g_n(y) $. Then still finding its derivative but now by product rule, we have $ \frac{d\psi}{dx}=f'_1(x)g_1(y)+f_1(x)g'_1(y)\frac{dy}{dx}+f'_2(x)g_2(y)+f_2(x)g'_2(y)\frac{dy}{dx}+...+f'_n(x)g_n(y)+f_n(x)g'_n(y)\frac{dy}{dx}=0 $.


Rearrange the above function, we have $ \frac{d\psi}{dx}=[f'_1(x)g_1(y)+f'_2(x)g_2(y)+...+f'_n(x)g_n(y)]+[f_1(x)g'_1(y)+f_2(x)g'_2(y)+f_n(x)g'_n(y)]\frac{dy}{dx}=0 $. This is where our standard form for exact differential equations $ f(x,y)+g(x,y)\frac{dy}{dx}=0 $ basically comes from.


"Exact" here can be understood as "the partial derivatives for $ f(x,y) $ and $ g(x,y) $ are exactly the same". This derives the MOST IMPORTANT property to check if a differential equation is exact: $ \frac{∂f}{∂y}=\frac{∂g}{∂x} $. If the partial derivative of the differential term is equal to the partial derivative of the rest term, then the differential equation is exact.


In Oxford English Dictionary, "exact" in science is defined as "using accurate measurements and following set rules". Here is another intuitive explanation from the perspective of language. You don't need to know the Mandarin language, just kinda feel the pattern of these characters. "Exact" here means "正合", where "正" is formed with all horizontal and vertical character strokes and gives you a feeling of "straightforward, not skewed", and "合" comes with those "straightforward, not skewed" strokes in the bottom and is topped with two strokes going up and finally being together. "Being together" is also what the character "合" basically means. The terms of this kind of equations just come from different places, meet at somewhere (to make $ \frac{∂f}{∂y}=\frac{∂g}{∂x} $), and achieve a unity of the huge nature and human beings.


This is a perceptual understanding of exact differential equations.


3.3.2 Example

We want to solve the differential equation $ xy+\frac{x^2}{2}\frac{dy}{dx}=0 $.

Comparing with the standard form $ f(x,y)+g(x,y)\frac{dy}{dx}=0 $, we have $ f(x,y)=xy $, $ g(x,y)=\frac{x^2}{2} $. Find their derivatives, $ \frac{∂f}{∂y}=x=\frac{∂g}{∂x} $. So this differential equation is exact.

Set $ \frac{∂F}{∂x}=f=xy $, then do the integration $ F=\int xydx=\frac{x^2}{2}+h(y) $ to obtain the main part of the solution. As we did the integration with respect to $ x $, $ h(y) $ here is only a constant. The next several steps are to find this constant.

Calculate the partial derivative of $ F $ with respect to $ y $ to get $ \frac{∂F}{∂y}=\frac{x^2}{2}+\frac{dh}{dy} $, which is equal to $ g(x,y)=\frac{x^2}{2} $ ($ \frac{∂f}{∂y}=\frac{∂g}{∂x} $ is already checked).

This gives us $ \frac{x^2}{2}+\frac{dh}{dy}=\frac{x^2}{2} $. So $ \frac{dh}{dy}=0 $, $ h $ must be a real constant A. Plug it back to the previous $ F $, then $ F=\frac{x^2}{2}+A $.

Since either $ f(x,y) $, $ g(x,y) $, or $ F $ are set by us to solve the equation (originally it only has $ x $, $ y $ and the differential term $ \frac{dy}{dx} $), we need to get rid of them and have $ y(x) $ as a final solution. Hence, give our $ F $ function a value $ C $ such that $ F=C $, where $ C $ is a real constant. This gives us $ \frac{x^2y}{2}+A=C $, $ \frac{x^2y}{2}=B $, where $ B=C-A $.

Rearrange the function to have out general solution in the $ y(x) $ form, $ y=\frac{D}{x^2} $, where $ D $ is a real constant.

Now it's your turn: We have an initial value y(1)=4 to this differential equation. Find the explicit solution.


3.4 Exercises

Solve the following differential equations, using the methods above.

· $ t\frac{dy}{dt}=ylnt $, $ y(1)=0 $.

· $ 3xy+y^2=(2x^2+xy)\frac{dy}{dx} $, $ y(1)=0 $.

· $ \frac{dy}{dt}+t^2y=2te^{-3t^2} $, $ y(1)=0 $


3.5 References

Exact Equations Intuition. Khan Academy. Retrieved from https://www.khanacademy.org/math/differential-equations/first-order-differential-equations/exact-equations/v/exact-equations-intuition-1-proofy on 15 Nov 2017.

Institute of Natural and Mathematical Science, Massey University. (2017). 160.204 Differential Equations I: Course materials. Auckland, New Zealand.

Robinson, J. C. (2003). An introduction to ordinary differential equations. New York, NY., USA: Cambridge University Press.

Alumni Liaison

Have a piece of advice for Purdue students? Share it through Rhea!

Alumni Liaison