User:Egm6321.f09.team3.diggs/HW4

= Problem 1: Solving the Legendre Differential Equation for n=0 =

Given
The Legendre differential equation:

$$ F = (1-x^2)y'' - 2xy + n(n+1)y = 0 $$

and

$$ n = 0 $$

$$u_1(x) = 1 $$

Find
$$u_2(x) $$ using the method of reduction of order 2

Solution
The Legendre DE for n=0 is:

$$ F = (1-x^2)y'' - 2xy = 0 $$

We assume the full solution is $$ y(x) = U(x)u_1(x) $$

We must use the Euler equations, in second order of the form:

$$ y'' + a_1(x)y' + a_0(x)y = 0 $$

Take the first and second derivatives of our assumed form of y(x) and multiply $$y'$$ by $$a_1$$ and $$y$$ by $$a_0$$ to get (simplified):

$$ 0 = U'[a_1u_1 + 2u_1'] + U''u_1 $$ where

$$ a_1 = \frac{-2x}{1-x^2}$$, and $$u_1 = 1 $$

Let $$ z = U' $$

now we have:

$$ \frac{z'}{z} + a_1 + 2\frac{u_1'}{u_1} = 0 $$

Solve by direct integration and rearrange to get:

$$z = \frac{c}{u_1^2} \cdot exp( - \int a_1(s) ds) = c \cdot exp(- \int \frac{-2s}{1-s^2} ds)$$

Integrate again to get:

$$U(x) = \int c \cdot exp(- \int \frac{-2s}{1-s^2} ds) dt + c_2$$

yields $$y(x) = c_1u_1[ \int exp(- \int \frac{-2s}{1-s^2} ds) dt + \frac{c_2}{c}]$$

Solving for $$u_2(x)$$,

$$u_2(x) = u_1 \cdot \int exp( - \int \frac{-2s}{1-s^2} ds) dt = \int exp(-ln(t^2-1)) dt = - \frac {ln(\frac {x+1}{x-1})}{2}$$

Therefore, $$u_2(x) = - \frac {ln(\frac {x+1}{x-1})}{2}$$

= Problem 2: King 1.1.b =

Given
$$u_1(x) = \frac{1}{x}sinx$$

and the ODE

$$xy'' + 2y' + xy = 0$$

Find
Prove $$u_1(x) = \frac{1}{x}sinx$$

and then find $$u_2(x)$$ using the method of reduction of order 2

Solution
First, determine if the ODE is exact:

where $$ f(x,y,p) = x $$ and $$ g(x,y,p) = 2p+xy $$

Condition 2.i is:

$$ f_{xx} + 2p \cdot f_{xy} + p^2 \cdot f_{yy} = g_{xp} + p \cdot g_{yp} - g_y $$

and the partial derivatives are:

$$ f_{xx} = f_{xy} = f_{yy} = g_{xp} = g_{yp} = 0 $$

or $$ g_y = x $$

which yields

$$ 0 + 2p \cdot 0 + p^2 \cdot 0 = 0 + p \cdot 0 - x $$

which is not satified, therefore there's no reason to go on to the second condition.

Next, we can find the integrating factor ($$h(x,y,) = x^my^n$$) to make the equation exact OR use the method of trial solution.

(I tried the integration factors method and could not find a value of m to satisfy, so we'll move directly into the method of trial solutions.)

In the method of trial solution, first try $$ y(x) = exp(rx) $$

Take the first and second derivatives and substitute back into the ODE, cancelling the term $$ exp(rx) $$ to get:

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

Since the solution requires r = f(x), we move on to another trial solution.

Our second trial solution is $$ y(x) = x \cdot exp(rx) $$

Take the first and second derivatives and substitute back into the ODE, cancelling the term $$ exp(rx) $$ to get:

$$ x^2r^2 + 4rx + x^2 + 2 = 0 $$

which again requires r = f(x), so we move on to a third trial solution.

Our third trial solution is $$ y(x) = \frac{1}{x} \cdot exp(rx) $$

Take the first and second derivatives and substitute back into the ODE, cancelling the term $$ exp(rx) $$ to get:

$$ r^2 + 1 = 0 $$

which is $$ r = +/- i $$

By deMoivre, the solution is

$$u_1(x) = \frac{1}{x} sinx$$

Now, since we have $$u_1(x)$$, we need to find $$u_2(x)$$ using the reduction of order method 2

We assume the full solution $$ y = U(x) u_1(x) $$

Since the process is the same as shown in Problem #1, we go straight to the solution:

$$ u_2(x) = u_1(x) \int \frac{1}{u_1(t)^2} exp(- \int a_1(s) ds) dt $$

where $$ a_1(s) = \frac{2}{s}$$

such that $$ u_2(x) = \frac{1}{x} sinx \int \frac{1}{(sint)^2} dt = -\frac{cos(x)}{x} $$

Therefore, $$ u_2(x) =-\frac{cos(x)}{x} $$

= Problem 3: King 1.1.a =

Given
$$(x-1)y'' - xy' + y = 0$$

and $$u_1(x) = e^x$$

Find
Verify $$ u_1(x) $$ using the method of trial solution,

and find $$ u_2(x) $$ using the method of reduction of order 2

Solution
Using the method of trial solution, where $$y(x) = e^{rx}$$

take the first and second derivatives of the trial solution and plug into the ODE, cancelling $$e^{rx}$$ to get:

$$(x-1)r^2 - rx + 1 = 0$$

By solving for the two roots, we get $$r_1 = 1$$, and $$r_2 = \frac{-1}{x-1}$$

We cannot use the $$r_2 $$ solution since r cannot be a function of x!

We can, however, use the $$ r_1 $$ solution as $$ u_1 = e^{r_1x} = e^x $$, which verifies $$u_1$$!

Next, we need to find $$u_2$$ using the method of reduction of order 2:

The method is the same as in Problem 1, so we skip to:

$$ u_2 = u_1 \int \frac{1}{u_1(t)^2} exp(- \int a_1(s) ds) dt = e^x \int e^{2t} \cdot e^t (t-1) dt = -x $$

Therefore, $$u_2(x) = -x$$

= Problem 4: King 1.3.a =

Given
$$y'' - 2y' + y = x^{3/2}e^x$$

Find
The general solution of $$y(x) = y_H(x) = y_P(x)$$

Solution
First, solve the homogeneous solution: $$y'' - 2y' + y = 0 $$

Determine if the equation is exact:

$$f(x,y,p) = 1$$

$$g(x,y,p) = -2p + y$$

Condition 2.i is:

$$ f_{xx} + 2p \cdot f_{xy} + p^2 \cdot f_{yy} = g_{xp} + p \cdot g_{yp} - g_y $$

where the partial derivatives are:

$$ f_{xx} = f_{xy} = f_{yy} = g_{xp} = g_{yp} = 0 $$

$$ g_y = 1 $$

such that condition 2.i is:

$$ 0 + 2p \cdot 0 + p^2 \cdot 0 = 0 + p \cdot 0 - 1 $$

The condition is not satisfied, so there is no reason to go to condition 2.ii

We now try the method of trial solution, where $$y(x) = e^{rx}$$

Take the first and second derivatives of the trial solution and plug in to the ODE, cancelling the term $$e^{rx}$$ to get:

$$ r^r - 2r + 1 = 0 $$

Both roots are real, but they are the same, $$r_1 = 1$$, $$r_2 = 1$$.

Use the $$r_1$$ solution $$u_1 = e^x$$ and find $$u_2$$ using the method of reduction of order 2.

The approach is the same as in Problem 1, so we can skip to the end:

$$ u_2 = u_1 \int \frac{1}{u_1(t)^2} exp(- \int a_1(s) ds) dt = e^x \int e^{-2s} \cdot e^{2s} ds = x \cdot e^x $$

Therefore, $$ u_2(x) = x \cdot e^x $$

Now we have the full homogeneous solution: $$ y_H(x) = c_1e^x + c_2xe^x $$

Now we need the particular solution, which can be found using variation of parameters:

First we need to check the Wronskian:

$$\bar W = \begin{bmatrix} u_1 & u_2\\ u_1' & u_2'\end{bmatrix} = \begin{bmatrix} e^x & xe^x\\ e^x & (x+1)e^x\end{bmatrix}$$

$$W = det(\bar W) = e^{2x}$$

Since the Wronskian is not 0, the solutions $$c_1'$$ and $$c_2'$$ exist.

where

$$ \begin{bmatrix} c_1'\\ c_2'\end{bmatrix} = \bar W ^{-1} \begin{bmatrix} 0\\ f\end{bmatrix} = \begin{bmatrix} e^x & xe^x\\ e^x & (x+1)e^x\end{bmatrix}^{-1} \begin{bmatrix} 0\\ x^{3/2}e^x\end{bmatrix} $$

Solved,

$$c_1' = -x^{5/2}$$

and $$c_2' = x^{3/2}$$

Integrate to get $$c_1$$ and $$c_2$$

$$ c_1 = \frac{-2}{7}x^{\frac{7}{2}} $$

$$ c_2 = \frac{2}{5}x^{\frac{5}{2}} $$

Which makes our assumed solution

$$y(x) = y_H(x) + y_P(x) = c_1e^x + c_2xe^x + (\frac{-2}{7}x^{\frac{7}{2}}) \cdot e^x + \frac{2}{5}x^{\frac{5}{2}}\cdot x e^x$$

$$y(x) = c_1e^x + c_2xe^x + \frac{4}{35}x^{\frac{7}{2}}e^x$$

= Problem 5: Describe in words... =

Given
A non-homogeneous L2_ODE_VC

Find
Describe in words the solution method

Solution
First, we must find at least one solution to the homogeneous ODE.

Check to see if the ODE is exact or if it can be solved using the method of integrating factors.

If not, use the method of trial solutions. If necessary, use the result of the trial solution method to revise the trial solution until a suitable trial solution is found.

It possible that only one trial solution may be found (like in the case of r = f(x)). This would require the method of reduction of order 2 be used to find the second solution.

Once the full homogeneous solution is known, the method of variation of parameters may be used to determine the particular solution.

Alternatively, once the homogeneous solution is known, use the alternative method to solve for the full solution.

= Problem 6: Alternative Method =

Given
The ODEs:

(a). $$(x-1)y'' - xy' + y = x$$

(b). $$xy'' + 2y' + xy = x$$

Find
The solutions using the alternative methods. (Use the homogeneous solution determined from the problems above.)

Solution
Recall the homogeneous solution for (a)