User:Egm6321.f10.team2.reserve/HW5

= Problem 5.4 Particular Solution by using Variation of Parameters Method =

From the lecture slide Mtg 27-2

Given
Linear, nonhomogeneous, first order differential equation


 * {| style="width:100%" border="0"

$$ \displaystyle \frac{dy}{dx}+P\left( x \right)y=Q\left( x \right)$$ (Eq 4.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Find
Particular solution using $$y\displaystyle \left( x \right)=A\left( x \right){{y}_{h}}(x)$$

To find homogeneous solution:
Homogeneous differential equation


 * {| style="width:100%" border="0"

$$ \displaystyle \frac{d{{y}_{h}}}{dx}+P\left( x \right){{y}_{h}}=0$$ (Eq 4.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

and the solution of homogeneous differential equation is


 * $${{y}_{h}}=A{{e}^{-\int\limits_ – ^{x}{P\left( t \right)dt}}}=A{{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}$$

where A is a constant of integration (King, page 512).

To find particular solution:
Assuming


 * {| style="width:100%" border="0"

$$ \displaystyle \left( x \right)=A\left( x \right){{y}_{h}}(x)=A(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}$$ (Eq 4.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

is solution of nonhomogeneous ODE (Eq4.1).

We determine A(x) by substituting Eq4.3 and its first derivative into Eq4.1. Differentiating Eq4.3, we obtain,


 * {| style="width:100%" border="0"

$$ \displaystyle \frac{d}{dx}=={A}'(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}-A(x)P(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}$$ (Eq 4.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Now $$\displaystyle $$ must satisfy (Eq4.1). We need to substitute $$\displaystyle $$ and $$\displaystyle $$ according to Eq4.3 and Eq4.4 into Eq4.1.


 * {| style="width:100%" border="0"

$$ \displaystyle \frac{d}{dx}+P\left( x \right){{y}_{p}}=Q\left( x \right)$$ (Eq 4.5)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


 * {| style="width:100%" border="0"

$$ \displaystyle \left[ {A}'(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}-A(x)P(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}} \right]+P(x)\left( A(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}} \right)=Q(x)$$ (Eq 4.6)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Second term and third term in the left side of Eq4.7 eliminate each other and we obtain


 * {| style="width:100%" border="0"

$$ \displaystyle {A}'(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}=Q(x)$$ (Eq 4.7)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

We rearrange Eq4.7


 * {| style="width:100%" border="0"

$$ \displaystyle {A}'(x)=Q(x){{e}^{\int\limits_ – ^ – {P\left( x \right)dx}}}$$ (Eq 4.8)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

If we integrate both sides Eq4.8, A(x) will be


 * {| style="width:100%" border="0"

$$ \displaystyle A(x)=\int{Q(x){{e}^{\int\limits_ – ^ – {P\left( x \right)dx}}}dx}$$ (Eq 4.9)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

If we put Eq4.9 into Eq4.3 in order to get the particular solution, we obtain


 * {| style="width:100%" border="0"

$$ \displaystyle \left( x \right)=A(x){{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}={{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}\left( \int{Q(x){{e}^{\int\limits_ – ^ – {P\left( x \right)dx}}}dx+C} \right)$$ (Eq 4.10)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Eliminate the constant $$\displaystyle C$$ we can derive particular solution,


 * {| style="width:100%" border="0"

$$ \displaystyle {{y}_{P}}={{e}^{-\int\limits_ – ^ – {P\left( x \right)dx}}}\int Q(x){{e}^{\int\limits_ – ^ – {P\left( x \right)dx}}}dx$$ (Eq 4.11)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * 
 * }

Now we can solve homework equation in Mtg10-4 as an example,


 * {| style="width:100%" border="0"

$$ \displaystyle \frac{dy}{dx}+xy=2x+3$$ (Eq 4.12)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Thus,


 * $$\displaystyle P\left( x \right)=x$$ and $$Q\left( x \right)=2x+3$$

If we solve the homogenous equation for $$\displaystyle P\left( x \right)=x$$,


 * {| style="width:100%" border="0"

$$ \displaystyle {{y}_{h}}=A{{e}^{-\frac{2}}}$$
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

then,


 * {| style="width:100%" border="0"

$$ \displaystyle ={{e}^{-\int\limits_ – ^{x}{tdt}}}\int\limits_ – ^{x}{(2s+3){{e}^{\int\limits_ – ^{s}{tdt}}}ds}={{e}^{-\frac{2}}}\left[ \int\limits_ – ^{x}{2s{{e}^{^{\frac{2}}}}ds}+\int\limits_ – ^{x}{3{{e}^{^{\frac{2}}}}ds} \right]$$ (Eq 4.13)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Integrating inside of bracket by using Wolfram Alpha, we obtain $$\displaystyle $$ shown below


 * {| style="width:100%" border="0"

$$ \displaystyle =2+3\sqrt{\frac{\pi }{2}}.{{e}^{-\frac{2}}}.erfi\left( \frac{x}{\sqrt{2}} \right)+{{C}_{1}}{{e}^{-\frac{2}}}$$ (Eq 4.14)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

where erfi(x) is the imaginary error function.

Then we extract particular solution from above,


 * {| style="width:100%" border="0"

$$ \displaystyle {{y}_{p}}=2+3\sqrt{\frac{\pi }{2}}.{{e}^{-\frac{2}}}.erfi\left( \frac{x}{\sqrt{2}} \right)$$ (Eq 4.15)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * 
 * }

= Problem 5.5 Solving Non-homogeneous Linear Second Order ODE with Constant Coefficients=

From the lecture slide Mtg 28 and Mtg 29-1

Given
The spring-dashpot system has the Equation of Motion like follows:


 * {| style="width:100%" border="0"

$$ \displaystyle {{a}_{2}}{y}''+{{a}_{1}}{y}'+{{a}_{0}}y=f(t)$$ (Eq 5.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle y$$ is a function of $$\displaystyle t$$, and $$\displaystyle {{a}_{2}}$$, $$\displaystyle {{a}_{1}}$$, $$\displaystyle {{a}_{0}}$$ are all constants making Eq 5.1 a linear second-order ODE with constant coeffiients.

Find
(1)Find PDEs for integrating factor $$\displaystyle H(t,y)$$ using condition 2nd of exactness stated in Mtg15

(2)Solve Eq 5.1 using trial solution for integrating factor such that $$\displaystyle h(t)={{e}^{\alpha t}}$$ where $$\displaystyle \alpha $$ is some constant. .

(1) Finding PDEs for integrating factor $$\displaystyle H(t,y)$$
Multiply $$\displaystyle H(t,y)$$ to both sides of the Eq 5.1,


 * {| style="width:100%" border="0"

$$ \displaystyle H(t,y){{a}_{2}}{y}''+H(t,y){{a}_{1}}{y}'+H(t,y){{a}_{0}}y=H(t,y)f(t)$$ (Eq 5.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

If we assume firstly $$\displaystyle H(t,y)$$ to be a function of only $$\displaystyle t$$(see Mtg 10), then we can just find some $$\displaystyle H(t)$$ to make the L.H.S of Eq 5.2 exact in order to change its form as,


 * {| style="width:100%" border="0"

$$ \displaystyle \frac{d\phi }{dt}=H(t)f(t)$$ (Eq 5.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

then we can integrate both sides to reduce the order of Eq 5.1. However, if the assumption "$$\displaystyle H(t,y)$$ is a function of only $$\displaystyle t$$" is not satisfid, we can't integrate the R.H.S of Eq 5.3. In this case, we should move $$\displaystyle f(t)$$ from R.H.S to L.H.S and try to find any $$\displaystyle H(t,y)$$ to make the whole thing exact.

Thus let


 * $$\displaystyle F=H(t){{a}_{2}}{y}+H(t){{a}_{1}}{y}'+H(t){{a}_{0}}y=f(t,y,p){y}+g(t,y,p)$$

in which,


 * $$\displaystyle \begin{align}

& f=H(t){{a}_{2}} \\ & g=H(t){{a}_{1}}{y}'+H(t){{a}_{0}}y \\ & p={y}' \\ \end{align}$$

Then we have,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & {{f}_{tt}}={{a}_{2}}{{H}_{tt}} \\ & {{f}_{ty}}={{a}_{2}}{{H}_{ty}} \\ & {{f}_{tp}}={{f}_{yp}}=0 \\ & {{f}_{y}}={{a}_{2}}{{H}_{y}} \\ & {{f}_{yy}}={{a}_{2}}{{H}_{yy}} \\ & {{g}_{tp}}={{a}_{1}}{{H}_{t}} \\ & {{g}_{yp}}={{a}_{1}}{{H}_{y}} \\ & {{g}_{pp}}=0 \\ & {{g}_{y}}={{a}_{1}}p{{H}_{y}}+{{a}_{0}}H+{{a}_{0}}y{{H}_{y}} \\ \end{align}$$ (Eqs 5.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting Eqs 5.4 into (1)&(2) in Mtg15, we have,


 * {| style="width:100%" border="0"

$$ \displaystyle {{a}_{2}}{{H}_{tt}}+2p{{a}_{2}}{{H}_{ty}}+{{p}^{2}}{{a}_{2}}{{H}_{yy}}={{a}_{1}}{{H}_{t}}-{{a}_{0}}H-{{a}_{0}}y{{H}_{y}}$$ (Eq 5.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


 * {| style="width:100%" border="0"

$$ \displaystyle 2{{a}_{2}}{{H}_{y}}=0$$ (Eq 5.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From Eq 5.6 we can see that the basic assumption is satisfied and if we substitute Eq 5.6 in to Eq 5.5, we have,


 * {| style="width:100%" border="0"

$$ \displaystyle {{a}_{2}}{{H}_{tt}}-{{a}_{1}}{{H}_{t}}+{{a}_{0}}H=0$$ (Eq 5.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

or


 * {| style="width:100%" border="0"

$$ \displaystyle {{a}_{2}}{H}''-{{a}_{1}}{H}'+{{a}_{0}}H=0$$ (Eq 5.8)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Since the integrating factor $$\displaystyle H(t,y)$$ turns out to be $$\displaystyle H(t)$$, the PDE governing $$\displaystyle H(t,y)$$ become an ODE given by Eq 5.8.

(2) Solve Eq 5.1 using trial solution for integrating factor such that $$\displaystyle h(t)={{e}^{\alpha t}}$$
Let's try an integrating factor like $$\displaystyle h(t)={{e}^{\alpha t}}$$ where $$\displaystyle \alpha$$ is a constant.

Multiply Eq 5.1 by $$\displaystyle h(t)={{e}^{\alpha t}}$$, we have,


 * {| style="width:100%" border="0"

$$ \displaystyle {{e}^{\alpha t}}\left( {{a}_{2}}{y}''+{{a}_{1}}{y}'+{{a}_{0}}y \right)={{e}^{\alpha t}}f(t)$$ (Eq 5.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

In order to reduce the order, we integrating Eq 5.9 according to $$\displaystyle t$$ and assume that the result can be written in such form:


 * {| style="width:100%" border="0"

$$ \displaystyle {{e}^{\alpha t}}\left( {{{\bar{a}}}_{1}}{y}'+{{{\bar{a}}}_{2}}y \right)=\int{{{e}^{\alpha t}}f(t)dt}$$ (Eq 5.10)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle {{{\bar{a}}}_{1}}$$ and $$\displaystyle {{{\bar{a}}}_{2}}$$ are assumed to be constants.

(2.1) Determine $$\displaystyle {{{\bar{a}}}_{1}}$$ and $$\displaystyle {{{\bar{a}}}_{1}}$$ according to $$\displaystyle {{a}_{2}}$$, $$\displaystyle {{a}_{1}}$$ and $$\displaystyle {{a}_{0}}$$
Differentiate Eq 5.10 we have,


 * {| style="width:100%" border="0"

$$ \displaystyle {{e}^{\alpha t}}\left[ {{{\bar{a}}}_{1}}{y}''+(\alpha {{{\bar{a}}}_{1}}+{{{\bar{a}}}_{0}}){y}'+\alpha {{{\bar{a}}}_{0}}y \right]={{e}^{\alpha t}}f(t)$$ (Eq 5.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Compare 5.11 and 5.9 we have,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & {{{\bar{a}}}_{1}}={{a}_{2}} \\ & {{{\bar{a}}}_{0}}={{a}_{1}}-\alpha {{a}_{2}} \\ & {{{\bar{a}}}_{0}}={{a}_{0}}/\alpha \\ \end{align}$$ (Eqs 5.12)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

from which we can see that the validity of Eq 5.10 relies on the value of $$\displaystyle \alpha $$.

(2.2) Find quadratic equation for $$\displaystyle \alpha $$
From Eqs 5.12 we have,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & {{a}_{1}}-\alpha {{a}_{2}}={{a}_{0}}/\alpha \\ \Rightarrow & {{a}_{2}}{{\alpha }^{2}}-{{a}_{1}}\alpha +{{a}_{0}}=0 \\ \end{align}$$ (Eq 5.13)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

(2.3) Derive a reduced - order equation from Eq 5.10
From Eq 5.10 we have,


 * {| style="width:100%" border="0"

$$ \displaystyle {y}'+\beta y=\frac{1}\int{{{e}^{\alpha t}}f(t)dt}$$ (Eq 5.14)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

where $$\displaystyle \beta ={{{\bar{a}}}_{0}}/{{{\bar{a}}}_{1}}$$

(2.4) Solve Eq 5.14 using Integrating Factor Method
From Mtg10 we know the integrating factor(for Eq 5.14) is,


 * {| style="width:100%" border="0"

$$ \displaystyle i(t)=\exp \int{\beta dt}={{e}^{\beta t}}$$ (Eq 5.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and the solution is:


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} y & =\frac{1}{i(t)}\int_ – ^{t}{\frac{i(\tau )}(\int_ – ^{\tau }{{{e}^{\alpha s}}f(s)ds}})d\tau \\ & =\frac\int_ – ^{t}{{{e}^{(\beta -\alpha )\tau }}(\int_ – ^{\tau }{{{e}^{\alpha s}}f(s)ds}})d\tau \end{align}$$ (Eq 5.16)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

(2.5) Show the relation between $$\displaystyle \alpha $$ and $$\displaystyle \beta $$
Since,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & \beta ={{{\bar{a}}}_{0}}/{{{\bar{a}}}_{1}} \\ & {{{\bar{a}}}_{0}}={{a}_{1}}-\alpha {{a}_{2}} \\ & {{{\bar{a}}}_{0}}={{a}_{0}}/\alpha \\ & {{{\bar{a}}}_{1}}={{a}_{2}} \\ \end{align}$$ (Eqs 5.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

So we have,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & \alpha \beta =\frac \\ & \alpha +\beta =\frac \\ \end{align}$$ (Eq 5.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

which means $$\displaystyle \alpha $$ and $$\displaystyle \beta $$ are the two roots of,


 * {| style="width:100%" border="0"

$$ \displaystyle {{\lambda }^{2}}-(\alpha +\beta )\lambda +\alpha \beta =0$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

or


 * {| style="width:100%" border="0"

$$ \displaystyle {{\lambda }^{2}}-\frac\lambda +\frac=0$$ (Eq 5.19)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

which is identical to Eq 5.13. And from Eq 5.17~Eq 5.19 we can conclude that $$\displaystyle \alpha $$ and $$\displaystyle \beta $$ are inseparable pairs so that we can't distiguish them from each other through the their governing equation and the sequense of two integrating factor $$\displaystyle h(t)$$ and $$\displaystyle i(t)$$ is arbitrary. We can also conclude that the final structure of solution must be symetric with respect to $$\displaystyle \alpha $$ and $$\displaystyle \beta $$, meaning exchanging the position of $$\displaystyle \alpha $$ and $$\displaystyle \beta $$ won't change the result.

When $$\displaystyle \alpha \ne \beta $$
Eq 5.16 can be expanded as,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} y & =\frac\int_ – ^{t}{{{e}^{(\beta -\alpha )\tau }}(\int_ – ^{\tau }{{{e}^{\alpha s}}f(s)ds}})d\tau \\ & =\frac\int_ – ^{t}{{{e}^{(\beta -\alpha )\tau }}\left( \int{{{e}^{\alpha \tau }}f(\tau )d\tau }+{{k}_{1}} \right)d\tau } \\ & =\frac\left[ \int_ – ^{t}{{{e}^{(\beta -\alpha )\tau }}\left( \int{{{e}^{\alpha \tau }}f(\tau )d\tau } \right)d\tau }+\int_ – ^{t}{{{e}^{(\beta -\alpha )\tau }}{{k}_{1}}d\tau } \right] \\ & =\frac\left[ \int{{{e}^{(\beta -\alpha )t}}\left( \int{{{e}^{\alpha t}}f(t)dt} \right)dt}+{{k}_{2}}+\frac{\beta -\alpha }{{e}^{(\beta -\alpha )t}} \right] \\ & =\frac{(\beta -\alpha ){_{1}}}{{e}^{-\alpha t}}+\frac{{e}^{-\beta t}}+\frac{{{{\bar{a}}}_{1}}}\int{{{e}^{(\beta -\alpha )t}}\left( \int{{{e}^{\alpha t}}f(t)dt} \right)dt} \end{align}$$ (Eq 5.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Note that Eq 5.20 is under the assumption that $$\alpha \ne \beta $$.

After conbination of constants, we have,


 * {| style="width:100%" border="0"

$$ \displaystyle y={{C}_{1}}{{e}^{-\alpha t}}+{{C}_{2}}{{e}^{-\beta t}}+\frac\int{{{e}^{(\beta -\alpha )t}}\left( \int{{{e}^{\alpha t}}f(t)dt} \right)dt}$$ (Eq 5.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

In which we can derive,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & y_{H}^{1}={{e}^{-\alpha t}} \\ & y_{H}^{2}={{e}^{-\beta t}} \\ & {{y}_{P}}=\frac\int{{{e}^{(\beta -\alpha )t}}\left( \int{{{e}^{\alpha t}}f(t)dt} \right)dt} \\ \end{align}$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

However, $$\displaystyle {{y}_{P}}$$ can be furthuer deduced as,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} {{y}_{P}} & =\frac\int{{{e}^{(\beta -\alpha )t}}\left( \int{{{e}^{\alpha t}}f(t)dt} \right)dt} \\ & =\frac{(\beta -\alpha ){{a}_{2}}}\int{\left( \int{{{e}^{\alpha t}}f(t)dt} \right)d\left( {{e}^{(\beta -\alpha )t}} \right)} \\ & =\frac{(\beta -\alpha ){{a}_{2}}}\left[ {{e}^{(\beta -\alpha )t}}\int{{{e}^{\alpha t}}f(t)dt}-\int{{{e}^{(\beta -\alpha )t}}{{e}^{\alpha t}}f(t)dt} \right] \\ & =\frac{(\beta -\alpha ){{a}_{2}}}\int{{{e}^{\alpha t}}f(t)dt}-\frac{(\beta -\alpha ){{a}_{2}}}\int{{{e}^{\beta t}}f(t)dt} \end{align}$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

This proved my statement "the final structure of solution must be symetric with respect to $$\displaystyle \alpha $$ and $$\displaystyle \beta $$".

In sum we have (when $$\displaystyle \alpha \ne \beta $$),


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & y={{C}_{1}}y_{H}^{1}+{{C}_{2}}y_{H}^{2}+{{y}_{P}} \\ & y_{H}^{1}={{e}^{-\alpha t}} \\ & y_{H}^{2}={{e}^{-\beta t}} \\ & {{y}_{P}}=\frac{(\beta -\alpha ){{a}_{2}}}\int{{{e}^{\alpha t}}f(t)dt}-\frac{(\beta -\alpha ){{a}_{2}}}\int{{{e}^{\beta t}}f(t)dt} \\ \end{align}$$ (Eq 5.22)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

When $$\displaystyle \alpha =\beta $$
Substitute the relation $$\displaystyle \alpha =\beta $$ into Eq 5.16,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} y= & \frac\int_ – ^{t}{{{e}^{(\alpha -\alpha )\tau }}(\int_ – ^{\tau }{{{e}^{\alpha s}}f(s)ds}})d\tau \\ & =\frac\int_ – ^{t}{\left( \int{{{e}^{\alpha \tau }}f(\tau )d\tau }+{{k}_{1}} \right)d\tau } \\ & =\frac\left[ \int_ – ^{t}{\left( \int{{{e}^{\alpha \tau }}f(\tau )d\tau } \right)d\tau }+\int_ – ^{t}{{{k}_{1}}d\tau } \right] \\ & =\frac\left[ \int{\left( \int{{{e}^{\alpha t}}f(t)dt} \right)dt}+{{k}_{2}}+{{k}_{1}}t \right] \\ & =\fract{{e}^{-\alpha t}}+\frac{{e}^{-\alpha t}}+\frac\int{\left( \int{{{e}^{\alpha t}}f(t)dt} \right)dt} \\ & =\fract{{e}^{-\alpha t}}+\frac{{e}^{-\alpha t}}+\frac\left( t\int{{{e}^{\alpha t}}f(t)dt}-\int{t{{e}^{\alpha t}}f(t)dt} \right) \end{align}$$ (Eq 5.20a)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

After conbination of constans we have


 * {| style="width:100%" border="0"

$$ \displaystyle y={{C}_{1}}t{{e}^{-\alpha t}}+{{C}_{2}}{{e}^{-\alpha t}}+\frac\left( t\int{{{e}^{\alpha t}}f(t)dt}-\int{t{{e}^{\alpha t}}f(t)dt} \right)$$ (Eq 5.21a)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

In which we can derive,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & y_{H}^{1}=t{{e}^{-\alpha t}} \\ & y_{H}^{2}={{e}^{-\alpha t}} \\ & {{y}_{P}}=\frac\left( t\int{{{e}^{\alpha t}}f(t)dt}-\int{t{{e}^{\alpha t}}f(t)dt} \right) \\ \end{align}$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

In sum we have (when $$\displaystyle \alpha =\beta $$),


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & y={{C}_{1}}y_{H}^{1}+{{C}_{2}}y_{H}^{2}+{{y}_{P}} \\ & y_{H}^{1}=t{{e}^{-\alpha t}} \\ & y_{H}^{2}={{e}^{-\alpha t}} \\ & {{y}_{P}}=\frac\left( t\int{{{e}^{\alpha t}}f(t)dt}-\int{t{{e}^{\alpha t}}f(t)dt} \right) \\ \end{align}$$ (Eq 5.22a)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

(2.7) Verify particular solution according to table in Mtg20, Fall2009
If $$\displaystyle \alpha \ne \beta$$, then from Eq 5.22 we know,


 * $$\displaystyle {{y}_{P}}=\frac{(\beta -\alpha ){{a}_{2}}}\int{{{e}^{\alpha t}}f(t)dt}-\frac{(\beta -\alpha ){{a}_{2}}}\int{{{e}^{\beta t}}f(t)dt}$$

If we substitute $$\displaystyle f(t)={{t}^{2}}$$ into the above equation, we have,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} {{y}_{P}} & =\frac{(\beta -\alpha ){{a}_{2}}}\int {{e}^{\alpha t}}f(t)dt-\frac{(\beta -\alpha ){{a}_{2}}}\int {{e}^{\beta t}}f(t)dt \\ & =\frac{(\beta -\alpha ){{a}_{2}}}\int {{e}^{\alpha t}}{{t}^{2}}dt-\frac{(\beta -\alpha ){{a}_{2}}}\int {{e}^{\beta t}}{{t}^{2}}dt \\ & =\frac{(\beta -\alpha ){{a}_{2}}}\left( \frac{{{\alpha }^{2}}{{t}^{2}}-2\alpha t+2} \right)-\frac{(\beta -\alpha ){{a}_{2}}}\left( \frac{{{\beta }^{2}}{{t}^{2}}-2\beta t+2} \right) \\ & =\frac{{{\alpha }^{2}}{{\beta }^{2}}{{t}^{2}}-(2{{\alpha }^{2}}\beta +2\alpha {{\beta }^{2}})t+2{{\alpha }^{2}}+2{{\beta }^{2}}+2\alpha \beta } \\ & =\frac{{{(\alpha \beta )}^{2}}{{t}^{2}}-2(\alpha +\beta )t+2{{(\alpha +\beta )}^{2}}-2\alpha \beta } \\ & =\frac{\frac{{{a}_{0}}^{2}}{{{a}_{2}}^{2}}{{t}^{2}}-2\frac{{{a}_{2}}^{2}}t+2\frac{{{a}_{1}}^{2}}{{{a}_{2}}^{2}}-2\frac{{{a}_{2}}^{2}}}{\frac{{{a}_{0}}^{3}}{{{a}_{2}}^{3}}{{a}_{2}}} \\ & =\frac{1}{{t}^{2}}-\frac{2{{a}_{1}}}{{{a}_{0}}^{2}}t+\frac{2{{a}_{1}}^{2}-2{{a}_{0}}{{a}_{2}}}{{{a}_{0}}^{3}} \\ \end{align}$$ (Eq 5.23)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

in which we utilize,


 * $$\displaystyle \begin{align}

\int{{{e}^{\alpha t}}{{t}^{2}}dt} & =\frac{1}{\alpha }\int{{{t}^{2}}d{{e}^{\alpha t}}} \\ & =\frac{\alpha }{{e}^{\alpha t}}-\frac{1}{\alpha }\int{2t{{e}^{\alpha t}}dt} \\ & =\frac{\alpha }{{e}^{\alpha t}}-\frac{2}\int{td}{{e}^{\alpha t}} \\ & =\frac{\alpha }{{e}^{\alpha t}}-\frac{2}t{{e}^{\alpha t}}+\frac{2}\int{{{e}^{\alpha t}}dt} \\ & =\frac{\alpha }{{e}^{\alpha t}}-\frac{2}t{{e}^{\alpha t}}+\frac{2}{{e}^{\alpha t}} \\ & =\frac{{{\alpha }^{2}}{{t}^{2}}-2\alpha t+2}{{e}^{\alpha t}} \\ \end{align}$$

Compare Eq 5.23 with Mtg20 slide of Fall 2009, we can see that Eq 5.23 has the same form with that in the slide which is a polynominal with at least order 2 according to $$\displaystyle t$$.

If $$\displaystyle \alpha=\beta$$, then from Eq 5.22a we know,


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & {{y}_{P}}=\frac\left( t\int {{e}^{\alpha t}}{{t}^{2}}dt-\int {{e}^{\alpha t}}{{t}^{3}}dt \right) \\ & =\frac\left( \frac{{{e}^{\alpha t}}({{\alpha }^{2}}{{t}^{3}}-2\alpha {{t}^{2}}+2t)}-\frac{{{e}^{\alpha t}}({{\alpha }^{3}}{{t}^{3}}-3{{\alpha }^{2}}{{t}^{2}}+6\alpha t-6)} \right) \\ & =\frac{{{\alpha }^{2}}{{t}^{2}}-4\alpha t+6} \\ & =\frac{\alpha \beta }{{t}^{2}}-\frac{2(\alpha +\beta )}t+\frac{2{{(\alpha +\beta )}^{2}}-2\alpha \beta } \\ & =\frac{1}{{t}^{2}}-\frac{2{{a}_{1}}}{{{a}_{0}}^{2}}t+\frac{2{{a}_{1}}^{2}-2{{a}_{0}}{{a}_{2}}}{{{a}_{0}}^{3}} \\ \end{align}$$ (Eq 5.23a)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

We can see that Eq 5.23a still has the same form with Eq 5.23 and that in the slide Mtg20. Thus the particular solution is verified.

(2.8) Solve L2-ODE-CC with $$\displaystyle f(t)=\exp (-{{t}^{2}})$$
If $$\displaystyle f(t)=\exp (-{{t}^{2}})$$, then Eqs 5.22 and Eqs 5.22a we derive


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & y_{H}^{1}=\left\{ \begin{align} & {{e}^{-\alpha t}}....................................................................................(\alpha \ne \beta ) \\ & t{{e}^{-\alpha t}}...................................................................................(\alpha =\beta ) \\ \end{align} \right. \\ & y_{H}^{2}={{e}^{-\beta t}} \\ & {{y}_{P}}=\left\{ \begin{align} & \frac{\sqrt{\pi }\left[ {{e}^{\frac{4}-\alpha t}}erf(\frac{\alpha }{2}-t)-{{e}^{\frac{4}-\beta t}}erf(\frac{\beta }{2}-t) \right]}{2{{a}_{2}}(\alpha -\beta )}...........................(\alpha \ne \beta ) \\ & -\frac{1}{2{{a}_{2}}}\sqrt{\pi }{{e}^{\frac{4}-\alpha t}}\left[ (t-\frac{\alpha }{2})erf(\frac{\alpha }{2}-t)-\frac{1}{\sqrt{\pi }}{{e}^{-\frac{4}}} \right].....................(\alpha =\beta ) \\ \end{align} \right. \\ \end{align}$$ (Eq 5.23)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

It has been mentioned that governing equation of $$\alpha $$ is indentical to Eq 5.19, and it has also been mentioned that the sequence of $$\displaystyle \alpha $$ and $$\displaystyle \beta $$ is arbitrary.

Case 1: $$\displaystyle (\gamma +1)(\gamma -2)=0$$
From the characteristic equation we can get information of $$\displaystyle \alpha $$ and $$\displaystyle \beta $$, which are the ratio of $$\displaystyle {{a}_{0}}$$ and $$\displaystyle {{a}_{1}}$$ with respect to $$\displaystyle {{a}_{2}}$$. However we can't derive information of $$\displaystyle {{a}_{2}}$$. In fact $$\displaystyle {{a}_{2}}$$ has nothing to do with characteristic equation since in the homogeneous case $$\displaystyle {{a}_{2}}$$ can always be the divisor of both sides(the R.H.S is zero so $$\displaystyle {{a}_{2}}$$ disappeared only left some ratios) and has no effect on the results if $$\displaystyle \alpha $$ and $$\displaystyle \beta $$ are fixed. But in the non-homogeneous case $$\displaystyle {{a}_{2}}$$ can be seen as part of the R.H.S(non-zero) and do have influence on the final result. As we can't get enough information to determine the value of $$\displaystyle {{a}_{2}}$$, we take it as 1:


 * $$\displaystyle {{a}_{2}}=1$$

From the characteristic equation we have the following L2-ODE-CC by refering Eq 5.13 and Eq 5.1:


 * $$\displaystyle {y}''-{y}'-2y={{e}^{-{{t}^{2}}}}$$

then


 * $$\displaystyle \begin{align}

& \left\{ \begin{align} & \alpha +\beta =\frac=-1 \\ & \alpha \beta =\frac=-2 \\ \end{align} \right. \\ & \Rightarrow \left\{ \begin{align} & \alpha =1 \\ & \beta =-2 \\ \end{align} \right. \\ \end{align}$$

Substitute these into Eq 5.23 we have the solution as, 'Bold text'
 * {| style="width:100%" border="0"

$$ \displaystyle y={{C}_{1}}{{e}^{-t}}+{{C}_{2}}{{e}^{2t}}+\frac{\sqrt{\pi }}{6}\left[ {{e}^{0.25-t}}erf(0.5-t)-{{e}^{1+2t}}erf(-1-t) \right]$$ (Eq 5.24)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

where $$\displaystyle {{C}_{1}}$$ and $$\displaystyle {{C}_{2}}$$ are some constants.

Case 2: $$\displaystyle {{(\gamma -4)}^{2}}=0$$
From the characteristic equation we have the following L2-ODE-CC by refering Eq 5.13 and Eq 5.1:


 * $$\displaystyle {y}''-8{y}'+16y={{e}^{-{{t}^{2}}}}$$

then,


 * $$:\displaystyle \begin{align}

& \left\{ \begin{align} & \alpha +\beta =\frac=-8 \\ & \alpha \beta =\frac=16 \\ \end{align} \right. \\ & \Rightarrow \alpha =\beta =-4 \\ \end{align}$$

Substitute this into Eq 5.23 we have,


 * {| style="width:100%" border="0"

$$ \displaystyle y={{C}_{1}}t{{e}^{4t}}+{{C}_{2}}{{e}^{4t}}-\frac{\sqrt{\pi }}{2}{{e}^{4+4t}}\left[ (t+2)erf(2+t)-\frac{1}{\sqrt{\pi }}{{e}^{-{{(2+t)}^{2}}}} \right]$$ (Eq 5.25)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

where $$\displaystyle {{C}_{1}}$$ and $$\displaystyle {{C}_{2}}$$ are some constants.

= Problem 5.8 L2_ODE_VC (Homogeneous) by using Reverse Engineering =

From the lecture slide Mtg 31-4

Given
Trial Solution: $$\displaystyle y=\frac$$ and Characteristic Equation: $$\displaystyle {{r}^{2}}+3=0$$

Find
Find L2_ODE_VC according to a trial solution and the characteristic equation given above

Solution
Wolfram Alpha used to find the derivatives of the trial solution $$\displaystyle y$$


 * {| style="width:100%" border="0"

$$ \displaystyle \left[ y=\frac \right].{{a}_{0}}(x)$$ (Eq 8.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


 * {| style="width:100%" border="0"

$$ \displaystyle \left[ \frac{d}{dx}\left( \frac \right)=\left( r-\frac{2}{x} \right)\left( \frac \right) \right].{{a}_{1}}(x)$$ (Eq 8.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


 * {| style="width:100%" border="0"

$$ \displaystyle \left[ \frac{d{{x}^{2}}}\left( \frac \right)=\left( {{r}^{2}}-\frac{4r}{x}+\frac{6} \right)\left( \frac \right) \right].{{a}_{2}}(x)$$ (Eq 8.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Adding Eq8.1, Eq8.2 and Eq8.3 each other with taking common parenthesis of $$\displaystyle y$$ will be equal to $$\displaystyle y$$ multiply by characteristic equation.


 * {| style="width:100%" border="0"

$$ \displaystyle \frac\left[ {{a}_{2}}\left( {{r}^{2}}-\frac{4r}{x}+\frac{6} \right)+{{a}_{1}}\left( r-\frac{2}{x} \right)+{{a}_{0}} \right]=\frac\left( {{r}^{2}}+3 \right)=0$$ (Eq 8.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

First expanding the inside of brackets and then rearranging and taking common parentheses of $$\displaystyle {{r}^{2}}$$, $$\displaystyle r$$ and 1, it will be


 * {| style="width:100%" border="0"

$$ \displaystyle {{r}^{2}}({{a}_{2}})+r\left( -\frac{4}{x}{{a}_{2}}+{{a}_{1}} \right)+1\left( \frac{6}{{a}_{2}}-\frac{2}{x}{{a}_{1}}+{{a}_{0}} \right)={{r}^{2}}+0.r+3$$ (Eq 8.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From the equality of both sides, we find the values of coefficients $$\displaystyle {{a}_{2}}$$, $$\displaystyle {{a}_{1}}$$, $$\displaystyle {{a}_{0}}$$.


 * {| style="width:100%" border="0"

$$ \displaystyle \begin{align} & {{a}_{2}}=1 \\ & {{a}_{1}}=\frac{4}{x} \\ & {{a}_{0}}=3+\frac{2} \\ \end{align}$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }


 * {| style="width:100%" border="0"

$$ \displaystyle {{r}^{2}}+3=0\Rightarrow {{r}_{1,2}}=\mp i\sqrt{3}$$ (Eq 8.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


 * {| style="width:100%" border="0"

$$ \displaystyle {{a}_{2}}(x){y}''+{{a}_{1}}(x){y}'+{{a}_{0}}(x)y=0$$ (Eq 8.7)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

is the general form of a second-order ordinary differential equation with coefficients.

If we substitute $$\displaystyle {{a}_{2}}$$, $$\displaystyle {{a}_{1}}$$, $$\displaystyle {{a}_{0}}$$ into Eq8.7, we obtain


 * {| style="width:100%" border="0"

$$ \displaystyle {y}''+\frac{4}{x}{y}'+(3+\frac{2})y=0$$ (Eq 8.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Multiply all equation with $$\displaystyle {{x}^{2}}$$ to eliminate denominators


 * {| style="width:100%" border="0"

$$ \displaystyle {{x}^{2}}{y}''+4x{y}'+\left( 3{{x}^{2}}+2 \right)y=0$$ (Eq 8.9)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

= References =