# Problem R*6.1 Solve Nonhomogeneous L2-ODE-CC

From Mtg 33-1

## Given

Equation (1) p.32-5 is $\displaystyle a_2y''+a_1y'+a_0y=F(t)$.

Equation (1) p.16-5 is $\displaystyle f_{tt}+2pf_{ty}+p^2f_{yy}=g_{tp}+pg_{yp}-g_y$.

Equation (2) p.16-5 is $\displaystyle f_{tp}+pf_{yp}+2f_y=g_{pp}$.

## Find

$\displaystyle \bold {1)}$ Find the PDEs that govern the integrating factor $\displaystyle h(t,y)$ for equation (1) p.32-5. Can you solve these PDEs for $\displaystyle h(t,y)$?

$\displaystyle \bold {2.1)}$ Find $\displaystyle (\bar a_1, \ \bar a_0)$ in terms of $\displaystyle (a_0, \ a_1, \ a_2)$.

$\displaystyle \bold {2.2)}$ Find the quadratic equation for $\displaystyle \alpha$.

$\displaystyle \bold {2.3)}$ Find the reduced-order equation.

$\displaystyle \bold {2.4)}$ Use the IFM to solve (3) p.33-3.

$\displaystyle \bold {2.5)}$ Show that $\displaystyle \alpha \beta = \frac{a_0}{a_2}, \ \ \alpha + \beta = \frac{a_1}{a_2}$.

$\displaystyle \bold {2.6)}$ Deduce the particular solution $\displaystyle y_p(t)$ for general excitation $\displaystyle F(t)$.

$\displaystyle \bold {2.7)}$ Verify result with table of particular solutions for: $\displaystyle F(t)=t\exp(bt)$.

$\displaystyle \bold {2.8)}$ Solve the nonhomogeneous L2-ODE-CC (1) p.32-5 with $\displaystyle F(t)=\tanh t$.

For the coefficients $\displaystyle (a_0, \ a_1, \ a_2)$, consider two different characteristic equations:

$\displaystyle \bold {2.8.1)}$ $\displaystyle (r+1)(r-2)=0$.

$\displaystyle \bold {2.8.2)}$ $\displaystyle (r-4)^2=0$.

$\displaystyle \bold {2.9)}$ Determine the fundametal period of undamped free vibration, and plot the solution for the excitation $\displaystyle F(t)=\tanh t$ for about 5 periods, assuming zero initial conditions.

## Solution Part 1

$\displaystyle \bold {1)}$ We need equation (1) p.32-5 to satisfy the first exactness condition for N2-ODEs, $\displaystyle g(t,y,p)+f(t,y,p)y''=0$.

Hence, $\displaystyle f(t,y,p)=h(t,y)*a_2$

$\displaystyle g(t,y,p)=h(t,y)*[a_1y'+a_0y-F(t)]$.

Using the second exactness condition {equations (1)-(2) p. 16-5}, we obtain the following PDEs:

$\displaystyle a_2{h_{tt}}+2pa_2h_{ty}+p^2a_2h_{yy}=a_1h_t+\cancel{pa_1h_y}-\cancel{a_1ph_y}-a_0h-a_0yh_y-F(t)h_y$.

$\displaystyle 2a_2h_y=0$.

Combine the two equations to obtain

$\displaystyle a_2h_{tt}-a_1h_t+a_0h=0$.

The PDEs reduce to a single ODE that cannot be solved.

## Solution Part 2.1

We are given the trial solution as $\displaystyle h(t)=\exp(\alpha t)$.

So, $\displaystyle \int \exp(\alpha t)[a_2y''+a_1y'+a_0y]dt=\int \exp(\alpha t) F(t)dt$.

Then, $\displaystyle \int \exp(\alpha t)[a_2y''+a_1y'+a_0y]dt=\exp(\alpha t)[\cancel{\bar a_2}y''+\bar a_1y'+\bar a_0y]$.

Differentiate the RHS to obtain, $\displaystyle \int \exp(\alpha t)[a_2y''+a_1y'+a_0y]dt=\int \exp(\alpha t)[\bar a_1y''+(\bar a_1\alpha+\bar a_0)y'+(\bar a_0\alpha)y]dt$.

Equate the two sides to obtain the three expressions below.

$\displaystyle a_2=\bar a_1$.

$\displaystyle a_1=\bar a_1 \alpha+\bar a_0$.

$\displaystyle a_0=\bar a_0 \alpha$.

Rearrange the second and third equations to yield

$\displaystyle \bar a_1= a_2$.

$\displaystyle \bar a_0=a_1-\alpha a_2$.

$\displaystyle \bar a_0=\frac{a_0}{\alpha}$.

## Solution Part 2.2

Using the last two equations, we can obtain the quadratic equation for $\displaystyle \alpha$.

$\displaystyle a_1-\alpha a_2=\frac{a_0}{\alpha}$.

$\displaystyle \alpha*[a_1-\alpha a_2]=a_0$

$\displaystyle \alpha a_1-\alpha^2 a_2=a_0$

$\displaystyle a_2 \alpha^2 - a_1 \alpha + a_0 = 0$

## Solution Part 2.3

The reduced-order equation is obtained using equations (1) p.33-2 and (2) p.33-1.

$\displaystyle \exp(\alpha t)[\bar a_1y'+\bar a_0y]=\int \exp(\alpha t)F(t)dt$

$\displaystyle \bar a_1y'+\bar a_0y=\exp(-\alpha t)\int \exp(\alpha t)F(t)dt$

## Solution Part 2.4

Next, we will use the IFM to solve the reduced-order equation.

$\displaystyle \bar h(t)=\exp[\int \beta dt]=\exp(\beta t)$

where $\displaystyle \beta=\frac{\bar a_0}{\bar a_1}$

$\displaystyle y(t)=\frac{1}{\bar h(t)}\int^t \bar h(s)B(s)ds$

Divide the result of Part 2.3 by $\displaystyle \bar a_1$ to obtain B(s).

$\displaystyle y'+\beta y = \frac{\exp(-\alpha t)}{\bar a_1} \int \exp(\alpha t)F(t)dt = B(s)$

Then we can combine $\displaystyle h(t), \ B(s)$ into $\displaystyle y(t)$ to find

$\displaystyle y(t)=\frac{1}{[\exp(\beta t)]}\int^t [\exp(\beta s)] [\frac{\exp(-\alpha s)}{\bar a_1} \int \exp(\alpha t)F(t)dt] ds$.

$\displaystyle y(t)=\frac{1}{\bar a_1[\exp(\beta t)]}\int^t [\exp((\beta-\alpha) s)] \left[ \int \exp(\alpha t)F(t)dt \right] ds$

## Solution Part 2.5

Rearrange $\displaystyle \beta=\frac{\bar a_0}{\bar a_1}$ to $\displaystyle \bar a_0=\beta\bar a_1$.

Substitute $\displaystyle a_2=\bar a_1$ to $\displaystyle \bar a_0=a_2\beta$.

That's equal to $\displaystyle \frac{a_0}{\alpha}$ and after rearranging one obtains

$\displaystyle \alpha\beta=\frac{a_0}{a_2}$.

To reach the other equality, just set the equation equal to $\displaystyle a_1-\alpha a_2$ instead of $\displaystyle \frac{a_0}{\alpha}$.

$\displaystyle a_2\beta=a_1-\alpha a_2$.

Rearranging yields $\displaystyle \beta+\alpha=\frac{a_1}{a_2}$.

## Solution Part 2.6

Referencing R5.7, the below equation is given for an Euler L2-ODE-CC.

$\displaystyle y(x) = C_1 x e^{\lambda x} + C_2 e^{\lambda x}$.

After careful inspection, one can deduce that the particular solution is the last equation for Part 2.4 WITHOUT the constants of integration.

$\displaystyle y(t)=\frac{1}{\bar a_1[\exp(\beta t)]}\int^t [\exp((\beta-\alpha) s)] \left[ \int \exp(\alpha t)F(t)dt \right] ds$

## Solution Part 2.7

$\displaystyle \int e^{(\alpha t)} F(t) dt$

$\displaystyle F(t) = t e^{bt}$

$\displaystyle \int t e^{(\alpha+b)t} dt$

$\displaystyle \frac{e^{(\beta-\alpha)t} ( b t + \alpha t - 1 )}{(\alpha + b)^2}$

$\displaystyle \int e^{(\beta-\alpha)s} \left[ e^{(\alpha+b)s} \frac{(bs+\alpha s-1)}{(\alpha + b)^2} \right] ds$

$\displaystyle \int e^{(\beta+b)s} \frac{(bs+\alpha s-1)}{(\alpha + b)^2} ds$

$\displaystyle e^{(\beta+b)t} \frac{\frac{s(\alpha+b)}{b+\beta} - \frac{\alpha+2b+\beta} {(b+\beta)^2}} {(\alpha + b)^2}$

$\displaystyle C_3 = \frac{\alpha+b}{b+\beta}$

$\displaystyle C_4 = \frac{\alpha+2b+\beta}{(b+\beta)^2}$

$\displaystyle C_5 = (\alpha+b)^2$

$\displaystyle e^{(\beta+b)t} \frac{C_3t - C_4}{C_5}$

$\displaystyle y_P(t) = e^{bt} \frac{1}{a_2} \frac{C_3t - C_4}{C_5}$

$\displaystyle y_P(t) = C_{P1} t e^{bt} + C_{P2} e^{bt}$

$\displaystyle C_{P0} = \frac{C_3}{a_2 C_5}$

$\displaystyle C_{P1} = \frac{-C_4}{a_2 C_5}$

NOTE: The following two integrals were performed using Wolfram|Alpha.

integrate t*exp((\alpha+b)*t) dt

integrate (exp((\beta+b)*s)*((b*s+\alpha*s-1)/((\alpha+b)^2)) ds

Now compare to the Table.

$\displaystyle f(t) = t e^{bt}$

$\displaystyle y_P(t) = x^m (\sum_{i=0}^n c_i t_i) e^{bt}$

$\displaystyle y_P(t) = \cancel{x^m} C_{P0} \cancel{t^0} e^{bt} + \cancel{x^m} t C_{P1} e^{bt}$

$\displaystyle y_P(t) = C_{P0} e^{bt} + t C_{P1} e^{bt}$

Other than the arbitrary constant numbering convention, they match.

## Solution Part 2.8.1

$\displaystyle y(t)=\frac{1}{\cancel{\bar a_1}[\exp(\beta t)]}\int^t [\exp((\beta-\alpha) s)] \left[ \int \exp(\alpha t)F(t)dt \right] ds$

$\displaystyle \int e^{(\alpha t)} F(t) dt$

$\displaystyle F(t) = \tanh{t}$

$\displaystyle \int e^{(\alpha t)} [\tanh{t}] dt$

$\displaystyle y(t)''-y(t)'-2=\tanh(t)$

$\displaystyle a_2y(t)''+a_1y(t)'+a_0=\tanh(t)$

$\displaystyle \alpha=-1, \ \beta=2$

$\displaystyle e^{-t} - 2 \tan^{-1}(e^{-t})$

$\displaystyle \int^t e^{3s} \left[ e^{-s} - 2 \tan^{-1}(e^s) \right] ds$

$\displaystyle \frac{1}{6}[e^{2s}+2\log(e^{2s}+1)-4e^{3s}(tan^{-1}(e^{-s}))]$

$\displaystyle y_P(t) = \frac{1}{6} \frac{[e^{2s}+2\log(e^{2s}+1)-4e^{3s}(tan^{-1}(e^{-s}))]}{e^{-2t}}$

NOTE: Wolfram|Alpha was used to determine the following integrals:

integrate (e^(-t)*tanh(t)) dt

integrate (e^(3s))(e^(-s)-2 tan^(-1)(e^(-s))) ds

## Solution Part 2.8.2

$\displaystyle \alpha=4, \ \beta=4$

$\displaystyle y(t)=\frac{1}{\cancel{\bar a_1}[\exp(\beta t)]}\int^t [\exp((\beta-\alpha) s)] \left[ \int \exp(\alpha t)F(t)dt \right] ds$

$\displaystyle y(t)=e^{-4t} \int^t \cancel{e^{(\beta-\alpha)s}} \left[ \int e^{4t} F(t) dt \right] ds$

$\displaystyle \int e^{4t} F(t) dt$

$\displaystyle F(t) = \tanh{t}$

$\displaystyle \int e^{4t} [\tanh{t}] dt$

$\displaystyle -e^{2t} + \frac{e^{4t}}{4} + \log(e^{2t}+1)$

$\displaystyle \frac{1}{16} \left[ -8[Li_2 (-e^{2t})] - 8 e^{2t} + e^{4t} \right]$

$\displaystyle y_P(t) = \frac{e^{-4}}{16} \left[ -8[Li_2 (-e^{2t})] - 8 e^{2t} + e^{4t} \right]$

where $\displaystyle Li_2(-e^{2t})]$ is the polylogarithm function

NOTE: Wolfram|Alpha was used to determine the following integrals:

integrate ((e^(4t))(\tanh(t))) dt

integrate (-e^(2t)+(e^(4t)/4)+log(e^(2t)+1)) dt

## Author

Egm6341.f11.team4.allen 10:56, 16 November 2011 (UTC)

# Problem R*6.2 - Show (1)p.34-6 agrees with King 2003 (1.6)p.8

From Mtg 35-1

## Given

Equation (1) p.34-6 is $\displaystyle y_P(x)=u_1(x)\int\frac{1}{h(x)}\left[\int h(x)\frac{f(x)}{u_1(x)}\,dx\right]\,dx$.

## Find

$\displaystyle \bold {A)}$ Show that Equation (1) p.34-6 agrees with King 2003 (1.6) p.8 which is

$\displaystyle y_P(x)=\int^x f(s)\left[\frac{u_1(s)u_2(x)-u_1(x)u_2(s)}{W(s)}\right]\,ds$

with

$\displaystyle W := u_1 u_2' - u_2 u_1' = \begin{vmatrix} \ u_1 & u_2 \\ u_1' & u_2' \end{vmatrix}$.

$\displaystyle \bold {HINT} \left( \frac{u_2}{u_1} \right)' = \frac{1}{h}$

$\displaystyle \bold {B)}$ Also, discuss the feasibility of the following choices for variation of parameters:

$\displaystyle \bold {B.1)} y(x) = U(x) \pm u_1(x)$.

$\displaystyle \bold {B.2)} y(x) = U(x) / u_1(x)$.

$\displaystyle \bold {B.3)} y(x) = u_1(x) / U(x)$.

## Solution

$\displaystyle \bold {A)}$ Starting with the HINT, we'll apply the following basic differentiation rule:

$\displaystyle \frac{d}{dx}\left[\frac{u}{v}\right]=\frac{vu'-uv'}{v^2}$ to find

$\displaystyle \frac{d}{dx}\left[\frac{u_2}{u_1}\right] = \frac{u_1u_2'-u_2u_1'}{u_1^2}$.

So, $\displaystyle h = \frac{u_1^2}{u_1u_2'-u_2u_1'}$.

Next, we'll use integration by parts, $\displaystyle \int u dv = uv-\int v du$ with the following:

$\displaystyle u = \int h(x) \frac{f(x)}{u_1(x)} dx$.

$\displaystyle dv = \frac{1}{h} = \frac{u_1u_2'-u_2u_1'}{u_1^2} dx$.

$\displaystyle v = \frac{u_2}{u_1}$.

$\displaystyle du = \frac{h(x)f(x)}{u_1(x)} dx$.

$\displaystyle y_P(x) = u_1(x)\int\frac{1}{h(x)}\left[\int h(x)\frac{f(x)}{u_1(x)}\,dx\right]\,dx$

$\displaystyle y_P(x) = u_1(x) \int u dv$

$\displaystyle y_P(x) = u_1(x) [uv - \int v du]$

$\displaystyle y_P(x) = u_1(x) \left[ \frac{u_2(x)}{u_1(x)} \int h(s) \frac{f(s)}{u_1(s)}ds - \int \frac{u_2(s)}{u_1(s)} \frac{h(s)f(s)}{u_1(s)} ds \right]$

$\displaystyle y_P(x) = \cancel{u_1(x)} \frac{u_2(x)}{\cancel{u_1(x)}} \int \frac{u_1(s)^\cancel{2}}{u_1(s)u_2(s)'-u_2(s)u_1(s)'} \frac{f(s)}{\cancel{u_1(s)}}ds - u_1(x) \int \frac{u_2(s)}{\cancel{u_1(s)}} \frac{\cancel{u_1(s)^2}}{u_1(s)u_2(s)'-u_2(s)u_1(s)'} \frac{f(s)}{\cancel{u_1(s)}} ds$

$\displaystyle y_P(x) = \int^x f(s) \frac{u_1(s)u_2(x)}{u_1(s)u_2(s)'-u_2(s)u_1(s)'} ds - \int^x f(s) \frac{u_1(x)u_2(s)}{u_1(s)u_2(s)'-u_2(s)u_1(s)'} ds$

$\displaystyle y_P(x) = \int^x f(s) \frac{u_1(s)u_2(x)-u_1(x)u_2(s)}{u_1(s)u_2(s)'-u_2(s)u_1(s)'} ds$

$\displaystyle y_P(x)=\int^x f(s)\left[\frac{u_1(s)u_2(x)-u_1(x)u_2(s)}{W(s)}\right]\,ds$

with

$\displaystyle W := u_1 u_2' - u_2 u_1' = \begin{vmatrix} \ u_1 & u_2 \\ u_1' & u_2' \end{vmatrix}$.

$\displaystyle \bold {B.1)} y(x) = U(x) \pm u_1(x)$.

$\displaystyle [y = U(x) \pm u_1(x)] * a_0(x)$.

$\displaystyle [y' = U'(x) \pm u_1'(x)] * a_1(x)$.

$\displaystyle [y'' = U''(x) \pm u_1''(x)] * a_2(x)$.

$\displaystyle a_0y+a_1y'+y'' = U[a_0]+U'[a_1]+U'' +$ left over terms without U and its derivatives.

$\displaystyle \bold {B.2)} y(x) = U(x) / u_1(x)$.

$\displaystyle \left[ y = U(x) / u_1(x) \right] * a_0(x)$.

$\displaystyle \left[ y' = \frac{u_1(x)U'(x)-U(x)u_1'(x)}{u_1(x)^2} \right] * a_1(x)$.

$\displaystyle \left[ y'' = \frac{2U(x)u_1'(x)^2-u_1(x)[U(x)u_1''(x)+2u_1'(x)U'(x)]+u_1(x)^2U''(x)}{u_1(x)^3} \right] * a_2(x)$.

$\displaystyle \bold {B.3)} y(x) = u_1(x) / U(x)$.

$\displaystyle \left[ y = u_1(x) / U(x) \right] * a_0(x)$.

$\displaystyle \left[ y' = \frac{U(x)u_1'(x)-u_1(x)U'(x)}{U(x)^2} \right] * a_1(x)$.

$\displaystyle \left[ y'' = \frac{2u_1(x)U'(x)^2-U(x)[u_1(x)U''(x)+2U'(x)u_1'(x)]+U(x)^2u_1''(x)}{U(x)^3} \right] * a_2(x)$.

None of these alternative trial solutions are feasible because they don't produce the desired homogeneous equation that cancels out to simplify the equation. Also, there are several terms that do not contain $\displaystyle U(x)$ which were a requirement as well.