(15 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
<font size="3px"> This method is often used to find a second solution of an ODE, provided that one solution is given. | <font size="3px"> This method is often used to find a second solution of an ODE, provided that one solution is given. | ||
− | '''Example:''' | + | '''Example:''' Solve the ODE <math>t^2 (lnt+1) \frac{d^2y}{dt^2} + t(2lnt+1) \frac{dy}{dt} -y=0</math>, one of the solutions is <math>y=\frac{1}{t}</math>. Find a second solution. |
'''Solution:''' Try a general solution <math>y=\frac{x}{t}</math>, where <math>x=x(t)</math>, <math>y=y(t)</math>. | '''Solution:''' Try a general solution <math>y=\frac{x}{t}</math>, where <math>x=x(t)</math>, <math>y=y(t)</math>. | ||
− | |||
Find the first and second derivative to <math>y</math>, hence <math>\frac{dy}{dt}=\frac{\frac{dx}{dt}}{t} - \frac{x}{t^2}</math>, <math>\frac{d^2y}{dt^2}=\frac{2x}{t^3} - \frac{2\frac{dx}{dt}}{t^2} + \frac{\frac{d^2y}{dt^2}}{t}</math>. | Find the first and second derivative to <math>y</math>, hence <math>\frac{dy}{dt}=\frac{\frac{dx}{dt}}{t} - \frac{x}{t^2}</math>, <math>\frac{d^2y}{dt^2}=\frac{2x}{t^3} - \frac{2\frac{dx}{dt}}{t^2} + \frac{\frac{d^2y}{dt^2}}{t}</math>. | ||
+ | |||
+ | Substitute them into ODE, hence <math>t^2 (lnt+1) (\frac{2x}{t^3} - \frac{2\frac{dx}{dt}}{t^2} + \frac{\frac{d^2x}{dt^2}}{t}) + t (2lnt+1) (\frac{\frac{dx}{dt}}{t} - \frac{x}{t^2}) - \frac{x}{t} = 0 </math>, | ||
+ | |||
+ | Simplify it to have <math>\frac{d^2x}{dt^2} t (lnt+1) - \frac{dx}{dt} = 0</math>. | ||
+ | |||
+ | Let <math>\frac{dx}{dt}=z</math>, then <math>\frac{dz}{dt} (lnt+1) - \frac{z}{t} =0 </math>, | ||
+ | |||
+ | Solve the ODE in the first order by separating variables, hence <math>\frac{dx}{dt} = z=A(lnt+1)</math>, where <math>A</math> is a non-zero real number. | ||
+ | |||
+ | Integrate with respect to <math>t</math>, hence <math>x=At lnt + B</math>, where <math>A</math>, <math>B</math> are non-zero real numbers. | ||
+ | |||
+ | Plug it back to the general solution, <math>y=\frac{x}{t} = A lnt + \frac{B}{t}</math>. | ||
+ | |||
+ | known that one of the solutions is <math>y=\frac{1}{t}</math>, hence the second solution is <math>y=lnt</math>. </font> | ||
'''<font size="4px"> 8.2 Cauchy-Euler Equation </font>''' | '''<font size="4px"> 8.2 Cauchy-Euler Equation </font>''' | ||
− | <font size="3px"> | + | <font size="3px"> If an ODE is given in or can be rearranged to the form <math>at^2 \frac{d^2y}{dx^2} + bt \frac{dy}{dx} +cy=f(t)</math>, where <math>f(t)</math> is a known function, it is a Cauchy-Euler equation and the below method can be applied. |
+ | |||
+ | '''Example:''' Solve the ODE <math>2t^2 \frac{d^2y}{dt^2} + 4t \frac{dy}{dt} + 5y = 17t^2</math>. | ||
+ | |||
+ | |||
+ | '''Solution:''' First consider the homogeneous equation <math>2t^2 \frac{d^2y}{dt^2} + 4t \frac{dy}{dt} + 5y = 0</math>. | ||
+ | |||
+ | Imitate the form of <math>17t^2</math> to try the solution <math>y=t^k</math>, where <math>k</math> is a real number. | ||
+ | |||
+ | Find the first and second derivative, hence <math>\frac{dy}{dt} = kt^{t-1}</math>, <math>\frac{d^2y}{dt^2}= k(k-1)t^{k-2}</math>. | ||
+ | |||
+ | Substitute into the ODE, hence <math>2t^2 k(k-1) t^{k-2} + 4tk t^{k-1} + 5t^k = 0</math>. | ||
+ | |||
+ | Simplify it to have <math>t^k (2k^2 +2k +5)=0 </math>. | ||
+ | |||
+ | As <math>t=0</math>, <math>y=0</math> is not a trivial solution, we have <math>2k^2 +2k +5=0 </math>. | ||
+ | |||
+ | Solve the algebraic equation to have <math>k=- \frac{1}{2} ± \frac{3}{2}i </math>. | ||
+ | |||
+ | These are complex conjugate roots, hence we have the general solution for the homogeneous equation <math>y_h = t^{-\frac{1}{2}} [A cos(\frac{3}{2} lnt) + B sin(\frac{3}{2} lnt)]</math>. | ||
+ | |||
+ | |||
+ | ''Note: If we have distinct real roots for <math>k</math>, then the general solution is <math>y_h = At^{k_1}+Bt^{k_2}</math>;'' | ||
+ | |||
+ | ''If we have repeated real roots for <math>k</math>, then the general solution is <math>y_h = t^k (A lnt +B)</math>;'' | ||
+ | |||
+ | ''If we have complex conjugate roots for <math>k</math>, then the general solution is <math>y_h =t^{\rho} [Acos(\omega lnt) + Bsin(\omega lnt)]</math>, where <math>k=\rho ± i\omega </math>.'' | ||
+ | |||
+ | ''We don't prove them here.'' | ||
+ | |||
+ | |||
+ | Now try particular solution <math>y_p = Ct^2</math> to the given ODE, | ||
+ | |||
+ | Find the first and second derivative, hence <math>\frac{dy_p}{dt}=2Ct</math>, <math>\frac{d^2y_p}{dt^2} = 2C</math>. | ||
+ | |||
+ | Substitute into the ODE to have <math> 2t^2 (2C) + 4t (2Ct) + 5C t^2 = 17t^2 </math>, hence <math>C=1</math>. | ||
+ | |||
+ | So, the particular solution is <math>y_p = t^2 </math>. | ||
+ | |||
+ | The general solution for Cauchy-Euler equation is <math>y=y_h + y_p</math>, hence it is <math>y= t^{-\frac{1}{2}} [A cos(\frac{3}{2} lnt) + B sin(\frac{3}{2} lnt)] + t^2 </math>. | ||
+ | |||
+ | |||
+ | '''<font size="4px"> 8.3 Variation of Constants </font>''' | ||
+ | |||
+ | <font size="3px"> The method of variation of constants applies when: | ||
+ | |||
+ | '''·''' An ODE is given in the form <math> a \frac{d^y}{dt^2} + b \frac{dy}{dt} + cy= f(t)</math>, where <math>a</math>, <math>b</math>, <math>c</math> are functions with respect to <math>t</math>, and <math>f(t)</math> is a known function; | ||
+ | |||
+ | '''·''' Two linearly independent solutions of the homogeneous ODE are known, and we need to find the particular solutions to the given ODE. | ||
+ | |||
+ | |||
+ | '''Example:''' Solve the ODE <math>t \frac{d^2y}{dt^2} -(2t+1)\frac{dy}{dt} +2y = 2t^2 -3 </math>, two linearly independent solutions of the homogeneous differential equation are <math>y(t)=2t+1</math>, <math>y(t)=e^{2t}</math>. It is known that <math>\frac{d}{dt} [-\frac{1}{4t} e^{-2t} (2t^2 +2t -3)] = \frac{1}{4t^2} e^{-2t} (4t^3 + 2t^2 -6t-3)</math>. | ||
+ | |||
+ | |||
+ | '''Solution:''' Set the particular solution <math>y_p = u_1 (2t+1) + u_2 e^{2t} </math>, | ||
+ | |||
+ | Find the first derivative <math>\frac{dy_p}{dt} = \frac{du_1}{dt} (2t+1) +2u_1 + \frac{du_2}{dt} e^{2t} + u_2 2 e^{2t}</math>. | ||
+ | |||
+ | Set '''<math>\frac{du_1}{dt} (2t+1) + \frac{du_2}{dt} e^{2t} = 0</math>''' to be equation ①. | ||
+ | |||
+ | Then <math>\frac{dy_p}{dt} = 2u_1 + 2u_2 e^{2t}</math>, the second derivative is <math>\frac{d^2y}{dt^2} = 2\frac{du_1}{dt} + 2\frac{du_2}{dt} e^{2t} + 4u_2 e^{2t} </math>. | ||
+ | Substitute into ODE to have <math>t (2\frac{du_1}{dt} + 2\frac{du_2}{dt} e^2t + 4u_2 e^{2t}) - (2t+1)(2u_1 + 2u_2 e^{2t}) + 2u_1 (2t+1) +2u_2 e^{2t} = 2t^2 -3 </math>. | ||
− | '''< | + | Simplify it to have '''<math>\frac{du_1}{dt} + \frac{du_2}{dt} t e^{2t} = t^2 - \frac{3}{2} </math>''' as equation ②. |
− | < | + | Treat ① and ② as a linear system of algebraic equations to solve out <math>\begin{cases} |
+ | u_1 = -\frac{3}{4t} - \frac{1}{2}t \\ | ||
+ | \frac{du_2}{dt} = \frac{1}{4t^2} e^{-2t} (4t^3 + 2t^2 -6t -3) \end{cases} </math>. | ||
+ | From the hint, <math>u_2 = \int \frac{1}{4t^2} e^{-2t} (4t^3 + 2t^2 -6t -3)dt = -\frac{1}{4t} e^{-2t} (2t^2 +2t-3)</math>. | ||
− | + | Plug them back to <math>y_p = u_1 (2t+1) + u_2 e^{2t}</math> to have <math>y_p = - (\frac{3}{4t} + \frac{1}{2}t)(2t+1) + [- \frac{1}{4t} e^{-2t} (2t^2 + 2t -3)] e^{2t}</math>. | |
− | < | + | Simplify it to have the required particular solution <math>y_p = -t^2 -t-2</math>. |
− | '''<font size="4px"> 8. | + | '''<font size="4px"> 8.4 References</font>''' |
<font size="3px">Institute of Natural and Mathematical Science, Massey University. (2017). ''160.204 Differential Equations I: Course materials.'' Auckland, New Zealand. | <font size="3px">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. </font> | Robinson, J. C. (2003). ''An introduction to ordinary differential equations.'' New York, NY., USA: Cambridge University Press. </font> |
Latest revision as of 18:49, 22 November 2017
Advanced Methods to Solve 2nd-Order ODEs
8.0 Abstract
Slightly we are moving to our last tutorial for the introduction of ordinary differential equations. This tutorial will give three particular methods to solve ODEs in the second order, which was also mentioned in 5.0. Theories are boring, we will be processing with sample questions.
8.1 Reduction of Order Method
This method is often used to find a second solution of an ODE, provided that one solution is given.
Example: Solve the ODE $ t^2 (lnt+1) \frac{d^2y}{dt^2} + t(2lnt+1) \frac{dy}{dt} -y=0 $, one of the solutions is $ y=\frac{1}{t} $. Find a second solution.
Solution: Try a general solution $ y=\frac{x}{t} $, where $ x=x(t) $, $ y=y(t) $.
Find the first and second derivative to $ y $, hence $ \frac{dy}{dt}=\frac{\frac{dx}{dt}}{t} - \frac{x}{t^2} $, $ \frac{d^2y}{dt^2}=\frac{2x}{t^3} - \frac{2\frac{dx}{dt}}{t^2} + \frac{\frac{d^2y}{dt^2}}{t} $.
Substitute them into ODE, hence $ t^2 (lnt+1) (\frac{2x}{t^3} - \frac{2\frac{dx}{dt}}{t^2} + \frac{\frac{d^2x}{dt^2}}{t}) + t (2lnt+1) (\frac{\frac{dx}{dt}}{t} - \frac{x}{t^2}) - \frac{x}{t} = 0 $,
Simplify it to have $ \frac{d^2x}{dt^2} t (lnt+1) - \frac{dx}{dt} = 0 $.
Let $ \frac{dx}{dt}=z $, then $ \frac{dz}{dt} (lnt+1) - \frac{z}{t} =0 $,
Solve the ODE in the first order by separating variables, hence $ \frac{dx}{dt} = z=A(lnt+1) $, where $ A $ is a non-zero real number.
Integrate with respect to $ t $, hence $ x=At lnt + B $, where $ A $, $ B $ are non-zero real numbers.
Plug it back to the general solution, $ y=\frac{x}{t} = A lnt + \frac{B}{t} $.
known that one of the solutions is $ y=\frac{1}{t} $, hence the second solution is $ y=lnt $.
8.2 Cauchy-Euler Equation
If an ODE is given in or can be rearranged to the form $ at^2 \frac{d^2y}{dx^2} + bt \frac{dy}{dx} +cy=f(t) $, where $ f(t) $ is a known function, it is a Cauchy-Euler equation and the below method can be applied.
Example: Solve the ODE $ 2t^2 \frac{d^2y}{dt^2} + 4t \frac{dy}{dt} + 5y = 17t^2 $.
Solution: First consider the homogeneous equation $ 2t^2 \frac{d^2y}{dt^2} + 4t \frac{dy}{dt} + 5y = 0 $.
Imitate the form of $ 17t^2 $ to try the solution $ y=t^k $, where $ k $ is a real number.
Find the first and second derivative, hence $ \frac{dy}{dt} = kt^{t-1} $, $ \frac{d^2y}{dt^2}= k(k-1)t^{k-2} $.
Substitute into the ODE, hence $ 2t^2 k(k-1) t^{k-2} + 4tk t^{k-1} + 5t^k = 0 $.
Simplify it to have $ t^k (2k^2 +2k +5)=0 $.
As $ t=0 $, $ y=0 $ is not a trivial solution, we have $ 2k^2 +2k +5=0 $.
Solve the algebraic equation to have $ k=- \frac{1}{2} ± \frac{3}{2}i $.
These are complex conjugate roots, hence we have the general solution for the homogeneous equation $ y_h = t^{-\frac{1}{2}} [A cos(\frac{3}{2} lnt) + B sin(\frac{3}{2} lnt)] $.
Note: If we have distinct real roots for $ k $, then the general solution is $ y_h = At^{k_1}+Bt^{k_2} $;
If we have repeated real roots for $ k $, then the general solution is $ y_h = t^k (A lnt +B) $;
If we have complex conjugate roots for $ k $, then the general solution is $ y_h =t^{\rho} [Acos(\omega lnt) + Bsin(\omega lnt)] $, where $ k=\rho ± i\omega $.
We don't prove them here.
Now try particular solution $ y_p = Ct^2 $ to the given ODE,
Find the first and second derivative, hence $ \frac{dy_p}{dt}=2Ct $, $ \frac{d^2y_p}{dt^2} = 2C $.
Substitute into the ODE to have $ 2t^2 (2C) + 4t (2Ct) + 5C t^2 = 17t^2 $, hence $ C=1 $.
So, the particular solution is $ y_p = t^2 $.
The general solution for Cauchy-Euler equation is $ y=y_h + y_p $, hence it is $ y= t^{-\frac{1}{2}} [A cos(\frac{3}{2} lnt) + B sin(\frac{3}{2} lnt)] + t^2 $.
8.3 Variation of Constants
The method of variation of constants applies when:
· An ODE is given in the form $ a \frac{d^y}{dt^2} + b \frac{dy}{dt} + cy= f(t) $, where $ a $, $ b $, $ c $ are functions with respect to $ t $, and $ f(t) $ is a known function;
· Two linearly independent solutions of the homogeneous ODE are known, and we need to find the particular solutions to the given ODE.
Example: Solve the ODE $ t \frac{d^2y}{dt^2} -(2t+1)\frac{dy}{dt} +2y = 2t^2 -3 $, two linearly independent solutions of the homogeneous differential equation are $ y(t)=2t+1 $, $ y(t)=e^{2t} $. It is known that $ \frac{d}{dt} [-\frac{1}{4t} e^{-2t} (2t^2 +2t -3)] = \frac{1}{4t^2} e^{-2t} (4t^3 + 2t^2 -6t-3) $.
Solution: Set the particular solution $ y_p = u_1 (2t+1) + u_2 e^{2t} $,
Find the first derivative $ \frac{dy_p}{dt} = \frac{du_1}{dt} (2t+1) +2u_1 + \frac{du_2}{dt} e^{2t} + u_2 2 e^{2t} $.
Set $ \frac{du_1}{dt} (2t+1) + \frac{du_2}{dt} e^{2t} = 0 $ to be equation ①.
Then $ \frac{dy_p}{dt} = 2u_1 + 2u_2 e^{2t} $, the second derivative is $ \frac{d^2y}{dt^2} = 2\frac{du_1}{dt} + 2\frac{du_2}{dt} e^{2t} + 4u_2 e^{2t} $.
Substitute into ODE to have $ t (2\frac{du_1}{dt} + 2\frac{du_2}{dt} e^2t + 4u_2 e^{2t}) - (2t+1)(2u_1 + 2u_2 e^{2t}) + 2u_1 (2t+1) +2u_2 e^{2t} = 2t^2 -3 $.
Simplify it to have $ \frac{du_1}{dt} + \frac{du_2}{dt} t e^{2t} = t^2 - \frac{3}{2} $ as equation ②.
Treat ① and ② as a linear system of algebraic equations to solve out $ \begin{cases} u_1 = -\frac{3}{4t} - \frac{1}{2}t \\ \frac{du_2}{dt} = \frac{1}{4t^2} e^{-2t} (4t^3 + 2t^2 -6t -3) \end{cases} $.
From the hint, $ u_2 = \int \frac{1}{4t^2} e^{-2t} (4t^3 + 2t^2 -6t -3)dt = -\frac{1}{4t} e^{-2t} (2t^2 +2t-3) $.
Plug them back to $ y_p = u_1 (2t+1) + u_2 e^{2t} $ to have $ y_p = - (\frac{3}{4t} + \frac{1}{2}t)(2t+1) + [- \frac{1}{4t} e^{-2t} (2t^2 + 2t -3)] e^{2t} $.
Simplify it to have the required particular solution $ y_p = -t^2 -t-2 $.
8.4 References
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.