User:Egm6321.f10.team2.oztekin/hw6

R*6.6 - Finding a homogenous L2-ODE-VC by using reverse engineering
From the lecture slide Mtg 36-10

Given
Trial solution:


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

$$ y=\frac{e^{rx}}{sin x}, r=\text{constant}$$ (6.6.1)
 * 
 * }

Characteristic equation:


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

$$\displaystyle (r-r_1)[r-r_2(x)]=(r-2)\left[r-\frac {1}{x+1}\right]=r^2+r\left(-2-\frac{1}{x+1}\right)+1 \left(\frac{2}{x+1}\right)=0$$ (6.6.2) which are
 * 
 * }

$$\begin{align} r_1=2 \end{align}$$

and

$$\begin{align} r_2(x)=\frac {1}{x+1} \end{align}$$

Find
Find a homogeneous L2-ODE-VC from the trial solution and characteristic equation given above by using reverse engineering

Solution
Solved on our own

Differentiating the trial solution as follows:


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

$$ \displaystyle y=\frac{e^{rx}}{sin x} $$ (6.6.3)
 * 
 * }

For the first differentiate with Wolfram Alpha:


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

$$ \displaystyle y' =e^{rx}\csc x(r-\cot x) = \frac{e^{rx}}{sin x}(r-\cot x)$$ (6.6.4)
 * 
 * }

For the second differentiate with Wolfram Alpha:


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

$$ \displaystyle y'' =e^{rx}\csc x(r^2-2r \cot x+ \cot^{2}x+ \csc^{2}x)= \frac{e^{rx}}{sin x}(r^2-2r \cot x+ \cot^{2}x+ \csc^{2}x)$$ (6.6.5)
 * 
 * }

A homogenous L2-ODE-VC is equal to the product of the trail solution by characteristic equation:


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

$$ \displaystyle a_2 y''+{a_1}y'+{a_0}y=\frac{e^{rx}}{\sin x}(r-r_1)[r-r_2(x)] $$     (6.6.6)
 * 
 * }

Substituting Equation (6.6.3), (6.6.4), and (6.6.5) into equation (6.6.6) gives


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

$$ \displaystyle \frac{e^{rx}}{\sin x}\left[a_2(r^2-2r\cot x+\cot^2x+\csc^2x)+a_1(r-\cot x)+a_0\right]=\frac{e^{rx}}{\sin x}(r-2)\left[r-\frac {1}{x+1}\right]$$ (6.6.7)
 * 
 * }

With expanding the inside of brackets and then taking common parentheses of $$\displaystyle {{r}^{2}}$$, $$\displaystyle r$$ and 1, we obtain


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

$$ \displaystyle r^2(a_2)+r\left(a_1-2a_2\cot x\right)+1 \left(a_0-a_1\cot x +a_2\cot^2x+a_2\csc^2x\right)=r^2+r\left(-2-\frac{1}{x+1}\right)+1 \left(\frac{2}{x+1}\right)$$

(6.6.8)
 * 
 * }

So we get 3 equations for $$ \displaystyle a_2, a_1, a_0 $$ from the equality of both sides,

Solving for $$ \displaystyle a_2 $$


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

$$ \displaystyle a_2=1 $$

(6.6.9)
 * 
 * }

Solving for $$ \displaystyle a_1 $$


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

$$ \displaystyle a_1-2\cot x = -2-\frac{1}{x+1} $$

(6.6.10)
 * 
 * }

so we obtain


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

$$ \displaystyle a_1=2\cot x -2-\frac{1}{x+1} $$

(6.6.11)
 * 
 * }

Solving for $$ \displaystyle a_0 $$


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

$$ \displaystyle a_0-2\cot^2 x+2\cot x+\frac{\cot x}{x+1}+\cot^2x+\csc^2x=\frac{2}{x+1} $$

(6.6.12)
 * 
 * }

so we obtain


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

$$ \displaystyle a_0=\cot^2 x-2\cot x-\frac{\cot x}{x+1}-\csc^2x+\frac{2}{x+1} $$    (6.6.13)
 * 
 * }

If we substitute Eq. (6.6.9), Eq. (6.6.11) and Eq. (6.6.9) into a general form of homogenous L2-ODE-VC Eq. (6.6.6), we can have


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

$$y''+\left(2\cot x-2-\frac{1}{x+1}\right)y'+ \left(\cot^2 x-2\cot x-\frac{\cot x}{x+1}-\csc^2x+\frac{2}{x+1}\right)y =0$$ (6.6.14)
 * 
 * }

Multipling all equation with $$\displaystyle {(x+1)}$$ gives,


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

$$y''+\left[2(x+1)(\cot x-1)-1\right]y'+ \left[(x+1)(\cot^2 x-2\cot x-\csc^2x)-\cot x+2\right]y =0$$ (6.6.15)
 * 
 * }