User:Egm6321.f09.Team06.sada/HW3

Problem 11
From $$ u_1(x) z' + [a_1(x)u_1(x) + 2u_1'(x)]z = 0 $$ obtain Eq.2 (P.17.3) using the integrating factor method.

Solution
$$u_{1}(x) Z'+\left[a_{1}u_{1}(x)+2u_{1}' (x) \right]Z=0 $$

$$h(x)\left[Z'+\left[a_{1}+\frac{2u_{1}' (x)}{u_{1}(x)} \right]Z=0 \right]$$

$$h(x)Z'+h(x)\left[a_{1}+\frac{2u_{1}' (x)}{u_{1}(x)} \right]Z=0 $$

$$\frac{d}{dx}\left[h(x)Z(x) \right]=h(x)Z'(x)+h'(x)Z$$

Let $$h'(x)= h(x)\left[a_{1}+\frac{2u_{1}' (x)}{u_{1}(x)} \right]$$

$$\frac{h'(x)}{h(x)}= \left[a_{1}+\frac{2u_{1}' (x)}{u_{1}(x)} \right]$$

Integrating this will give:

$$h(x)=B exp \left[\int_{}^{x}a_{1}(s)ds+ln\left|u_{1} \right|^{2} \right]$$

$$\int_{}^{}h(x)*Z'(x)=\int_{}^{}0$$

$$h(x)Z(x)=K$$

$$ B exp \left[\int_{}^{x}a_{1}(s)ds+ln\left|u_{1} \right|^{2} \right]Z(x)=K $$

$$Z(x)= C exp \left[-\int_{}^{x}a_{1}(s)ds-ln\left|u_{1} \right|^{2} \right]$$

$$Z(x)= \frac{C}{u_{1}^{2}} exp \left[-\int_{}^{x}a_{1}(s)ds \right]$$

Problem 12
Develop reduction of order method 2 using different algebric ops.

a. $$ y(x)=U(x)\pm u_1 $$

b. $$ y(x) = U(x)/u_1(x) $$

c. $$ y(x) = u_1(x)/U(x) $$

Solution:

a. $$ y(x) = U(x) \pm u_1(x) $$

The first and second derivatives of y(x) are:

$$y'(x) = U' \pm u_1'$$

$$y(x) = U \pm u_1''$$

The desired form is $$ y'' + a_1y' + a_0y = 0 $$,

Substituting in the above equation,

$$ a_0y + a_1y' + y = a_0U \pm a_0u_1 + a_0U' \pm a_1u_a' + U \pm u_1'' $$

We get $$ 0 = a_0U \pm a_0u_1 + a_0U' \pm a_1u_a' + U \pm u_1 $$

In the above equation, the dependent variable U(x) is present and not missing. The Reduction of Order Method is possible only when dependent variable is missing.

b. $$ y(x) = U(x)/u_1(x) $$

The first and second derivatives of y(x) are:

$$y'(x) = U' u_1 - U u_1'/u_1^2$$

$$y(x) = (U' u_1'- Uu_1 - U' u_1' + U/u_1'')u_1^2 - 2 u_1' (U' u_1 - u_1' U)/ u_1^4$$

The desired form is $$ y'' + a_1y' + a_0y = 0 $$,

Substituting in the above equation,

We get $$ 0 = a_0 U u_1^3 - a_1 U' U u_1^2 + a_1 U' u_1^3 - 2U u_1' u_1 + U u_1 u_1^2 + 2U u_1'^2 - u_1^3 U $$

The above y(x) here is not valid because the equation above is not missing U(x). The Reduction of Order Method is possible only when dependent variable is missing.

c. $$ y(x) = u_1(x)/U(x) $$

The first and second derivatives of y(x) are:

$$y'(x) = u_1'/U - u_1/U'/ U^2$$

$$ y(x) = u_1' U' u_1'^2 - u_1 Uu_1^2 - 2 u_1' U' U + 2u_1 U'^2/U^4 $$

The desired form is $$ y'' + a_1y' + a_0y = 0 $$,

Substituting in the above equation,

We get $$ 0 = a_0 u_1 U^3 + a_1 u_1' U^3 - a_1 u_1 U' U^2 + u_1' U' u_1^2 - u_1^3 U'' - 2u_1' U' U + 2u_1 U'^2 $$

In the above equation, the dependent variable U(x) is present and not missing. The Reduction of Order Method is possible only when dependent variable is missing.

Problem 13
Find $$ u_1 and u_2 $$ of $$ (1-x^2)y'' - 2xy' + 2y = 0 $$ using the 2 trial solutions:

i. $$ y = ax^b $$

ii. $$ y = e^{rx} $$

and compare the two solutions using the boundary conditions $$y(0) = 1$$ and $$y(1) = 2$$ and compare the solution using the reduction of order method 2. Plot the solutions using MATLAB.

Solution
Part 1:

$$ (1-x^{2})y''-2xy'+2y=0 $$ (Equation 1)

With the trial solution,

$$ y=ax^{b} $$

$$ y'=bax^{b-1} $$

$$ y''=ab(b-1)x^{(b-2)} $$

Substituting into Equation 1

$$ (1-x^2)ab(b-1)x^{(b-2)} - 2xabx^{(b-1)} + 2ax^b = 0 $$ $$ ab(b-1)x^{(b-2)}-ab(b-1)x^b - 2abx^b + 2ax^b = 0 $$ $$ ab(b-1)x^{(b-2)}-[ab(b-1) + 2ab - 2a]x^b = 0 $$ $$ ab(b-1)x^{(b-2)}-ab(b-1)x^b - 2abx^b + 2ax^b = 0 $$

$$ ab(b-1)x^{(b-2)}-\left[ab(b-1) + 2ab - 2a \right]x^b = 0 $$   (Equation 2)

In Equation (2), equating co-efficients of $$ x^{(b-2)}$$,

$$ ab(b-1) = 0 $$

We know that a and b both cannot be zero, and one value of $$ b=1$$.

In Equation (2), equating co-efficients of $$ x^b$$ ,

$$ ab(b-1) + 2ab - 2a = 0 $$

$$ a(b^2+b-2) = 0 $$

Again $$ a$$ cannot be zero, so $$ b =1,-2$$.

Therefore,

$$ u_1(x) = ax $$

$$ u_2(x) = \frac{a}{x^2} $$

So, the trail solution

$$ y = c_1u_1(x) + c_2u_2(x) $$

$$ y = C_1x + C_2\frac{1}{x^2} $$

Using the boundary conditions,

$$ y(\frac{\pi}{2\sqrt{2}}) = 1 $$

$$ y(\frac{\pi}{\sqrt{2}}) = 2 $$

We arrive at,

$$\displaystyle C_1 = \frac{2\sqrt{2}}{\pi} $$

$$\displaystyle C_2 = 0 $$

The trial solution becomes,

$$\displaystyle \Rightarrow y = \frac{2\sqrt{2}}{\pi}x $$  (Eq.3)

Therefore,

$$\displaystyle u_1 = \frac{2\sqrt{2}}{\pi}x;\ and\ u_2 = 0 $$

Part 2:

$$ (1-x^{2})y''-2xy'+2y=0 $$ (Equation 1)

Find solution using the trial solution

$$ y=er^{x} $$

$$ y'= re^{rx} $$

$$ y''= r^{2}e^{rx} $$

Substituting into Equation 1

$$ (1-x^{2}) r^{2}e^{rx} -2x re^{rx}  +2 e^{rx}  =0  $$ $$ r^{2}e^{rx}  - r^{2} x^{2} e^{rx}  -2rx e^{rx}  +2 e^{rx}=0 $$ Rearranging and dividing by $$ e^{rx} $$,

$$ -x^2r^2-2xr + r^2 +2 = 0 $$

$$ -x^2[r^2]-x[2r] + r^2 +2 = 0 $$

We do not have any terms on the right hand side to equate with co-efficients of $$ x^2$$ and $$ x$$, so equating the constant co-efficients,

Rearranging, $$ r^2 +2 = 0 $$

$$ r = \pm \sqrt2i $$

The trial solution becomes,

$$\displaystyle \Rightarrow y = e^{\sqrt2ix} $$

$$\displaystyle \Rightarrow y = C_1 cos(\sqrt2x) + C_2 sin(\sqrt2x) $$

Using the boundary conditions,

$$\displaystyle y(\frac{\pi}{2\sqrt{2}}) = 1 $$

$$\displaystyle y(\frac{\pi}{\sqrt{2}}) = 2 $$

We arrive at,

$$\displaystyle C_1 = -2 $$

$$\displaystyle C_2 = 1 $$

The trial solution then becomes,

$$\displaystyle \Rightarrow y = -2 cos(\sqrt2x) + sin(\sqrt2x) $$       (Eq.4)

and,

$$\displaystyle u_1 = -2 cos(\sqrt2x);\ and\ u_2 = sin(\sqrt2x) $$

Solution given by reduction of order method 2,

$$\displaystyle u_1=x $$

and

$$\displaystyle u_2=\frac{x}{2}log_e\left(\frac{1+x}{1-x}\right) - 1 $$