User:Egm6321.f09.team3/HW4

 Good idea to give a title to each problem (section). The titles for Problems 2, 3, 4 could be more descriptive, e.g., homogeneous L2-ODC-VC. See also the links to the lecture transparencies where HW problems were assigned in Team 1. See further comments below. Egm6321.f09 13:00, 24 October 2009 (UTC)

See further comments in google doc for Team 3. Egm6321.f09 21:03, 23 November 2009 (UTC)

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

{| class="toccolours collapsible collapsed" width="80%" style="text-align:left" !Please click on show to see the problem solution

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:

$$ \begin{align} z =& \frac{c}{u_1^2} \cdot \exp\left( - \int a_1(s) ds\right)\\ =&c \cdot \exp\left(- \int \frac{-2s}{1-s^2} ds\right) \end{align} $$

Integrate again to get:


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

yields


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

Solving for $$u_2(x)$$,

$$ \begin{align} u_2(x) =& u_1 \cdot \int \exp\left( - \int \frac{-2s}{1-s^2} ds\right) dt\\ =& \int \exp(-\ln(t^2-1)) dt \\ =& - \dfrac {\ln \left(\dfrac {x+1}{x-1}\right)}{2} \end{align} $$

Therefore,


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


 * style="width:2%; padding:10px; border:2px solid #1888aa" |
 * $$u_2(x) = - \dfrac {\ln \left(\dfrac {x+1}{x-1}\right)}{2}$$
 * $$u_2(x) = - \dfrac {\ln \left(\dfrac {x+1}{x-1}\right)}{2}$$

= Problem 2: King 1.1.b =
 * }
 * }
 * }
 * }

{| class="toccolours collapsible collapsed" width="80%" style="text-align:left" !Please click on show to see the problem solution

Given

 * $$u_1(x) = \frac{1}{x}\sin x$$

and the ODE


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

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

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 = \pm i $$

By deMoivre, the solution is

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

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\left(- \int a_1(s) ds\right) dt $$

where


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

such that


 * $$ u_2(x) = \frac{1}{x} \sin x \int \frac{1}{(\sin t)^2} dt = -\frac{\cos x}{x} $$

Therefore,


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


 * style="width:2%; padding:10px; border:2px solid #1888aa" |
 * $$ u_2(x) =-\frac{\cos x}{x} $$
 * $$ u_2(x) =-\frac{\cos x}{x} $$


 * }
 * }
 * }
 * }

 You want to give details of your work for the first two trial solutions, even though these trial solutions did not lead to a homogeneous solution. Note that sometimes, even though the characteristic equation may have varying coefficients, but a root may be a constant, as mentioned in a lecture (see Problem 3 below), and thus you would have one valid homogeneous solution. So you still want to solve such characteristic equation to see whether you can get a constant root. Egm6321.f09 13:10, 24 October 2009 (UTC)

= Problem 3: King 1.1.a =

{| class="toccolours collapsible collapsed" width="80%" style="text-align:left" !Please click on show to see the problem solution

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) = \exp(rx)$$

take the first and second derivatives of the trial solution and plug into the ODE, cancelling $$\exp(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 = \exp(r_1x) = \exp 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:

$$ \begin{align} u_2 =& u_1 \int \frac{1}{u_1(t)^2} \exp \left(- \int a_1(s) ds\right) dt \\ =& \exp x \int \exp(2t) \cdot \exp t (t-1) dt \\ =& -x \end{align} $$

Therefore,


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


 * style="width:2%; padding:10px; border:2px solid #1888aa" |
 * $$u_2(x) = -x$$
 * $$u_2(x) = -x$$

= Problem 4: King 1.3.a =
 * }
 * }
 * }
 * }

{| class="toccolours collapsible collapsed" width="80%" style="text-align:left" !Please click on show to see the problem solution

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) = \exp(rx)$$

Take the first and second derivatives of the trial solution and plug in to the ODE, cancelling the term $$\exp(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 = \exp 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:



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

Therefore,


 * $$ u_2(x) = x \cdot \exp x $$

Now we have the full homogeneous solution:


 * $$ y_H(x) = c_1 \exp x + c_2x\exp x $$

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

First we need to check the Wronskian:


 * $$\bar \mathbf{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}$$

$$\mathbf{W} = \det(\bar \mathbf{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 \mathbf{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

$$ \begin{align} y(x) =& y_H(x) + y_P(x) \\ =& c_1e^x + c_2xe^x + \left(\frac{-2}{7}x^{\frac{7}{2}}\right) \cdot e^x + \frac{2}{5}x^{\frac{5}{2}}\cdot x e^x \\ =& c_1e^x + c_2xe^x + \frac{4}{35}x^{\frac{7}{2}}e^x \end{align} $$

Finally,


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


 * style="width:2%; padding:10px; border:2px solid #1888aa" |
 * $$y(x) = c_1e^x + c_2xe^x + \frac{4}{35}x^{\frac{7}{2}}e^x$$
 * $$y(x) = c_1e^x + c_2xe^x + \frac{4}{35}x^{\frac{7}{2}}e^x$$

= Problem 5: Describe method for solving L2-ODE-VC =
 * }
 * }
 * }
 * }

{| class="toccolours collapsible collapsed" width="80%" style="text-align:left" !Please click on show to see the problem solution

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.


 * }

 See my comments above regarding characteristic equations with varying coefficients; one of the roots may be a constant, and thus yields a valid homogeneous solution. Egm6321.f09 13:10, 24 October 2009 (UTC)

= Problem 6: Alternative Method =

{| class="toccolours collapsible collapsed" width="80%" style="text-align:left" !Please click on show to see the problem solution

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) is $$u_1(x) = e^x$$

The general form required for the alternative method is Euler, so the ODE becomes:


 * $$y'' - \frac{x}{x-1}y' + \frac{1}{x-1}y = \frac{x}{x-1}$$

where


 * $$a_1(x) = -\frac{x}{x-1}$$

and


 * $$a_0(x) = \frac{1}{x-1}$$

Assume the solution (homogeneous and particular) is of the form


 * $$ y(x) = y_H(x) +y_P(x)$$

Let's first find the $$y_H(x)$$. We know


 * $$y_H(x) = k_1u_1(x) +k_2u_2(x)$$

We know that

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

We need to find $$u_2(x)$$. From equation 1.3 in King


 * $$u_2(x) = u_1(x) \int ^x \dfrac{1}{u_1^2(t)} \exp \left [ - \int ^t a_1(s)ds \right] dt $$

Now let's replace the value of $$u_1(x)$$ and $$a_1$$ and solve for $$u_2(x)$$

$$ \begin{align} u_2(x)=& u_1(x) \int ^x \dfrac{1}{u_1^2(t)} \exp \left [ - \int ^t a_1(s)ds \right] dt \\ =& e^x \int ^x \dfrac{1}{e^{2t}} \exp \left [ - \int ^t \dfrac{s}{s-1} ds \right] dt \\ = &e^x \int ^x \dfrac{1}{e^2(t-1)} dt \qquad\text{finally arriving at} \quad u_2(x) \\ u_2(x) =& e^{x-2} \ln(x-1) \end{align} $$

Now the full homogenous solution takes the form of:

$$ y_H(x) = k_1e^x +k_2e^{x-2} \ln(x-1)$$

Now we need to find the particular solution. Equation 1.4 in King suggests that:


 * $${c_1}^'{u_1}+{c_2}^'{u_2}=0 $$

And looking also in page 7 of King:


 * $$ c_1({u_1}^{}+{a_1}{u_1}^{'}+{a_0}u_1)+c_2({u_2}^{}+{a_1}{u_2}^{'}+{a_0}u_2)+{c_1}^'{u_1}^'+{c_2}^'{u_2}^'=f $$

Since u_1 and u_2 are solutions of the homogenous equation, the first two terms are zero. Yielding equation 1.5 in King


 * $${c_1}^'{u_1}^'+{c_2}^'{u_2}^'=x $$

First we need to check the Wronskian:


 * $$\bar \mathbf{W} = \begin{bmatrix} u_1 & u_2\\ u_1' & u_2'\end{bmatrix} = \begin{bmatrix} e^x & e^{x-2} \ln(x-1)\\ e^x & e^{x-2} \ln(x-1)+\dfrac{e^{x-2}}{x-1}\end{bmatrix}$$

$$\mathbf{W} = \det(\bar \mathbf{W}) = \dfrac{e^{2x-2}}{x-1}$$

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

where


 * $$ \begin{bmatrix} c_1'\\ c_2'\end{bmatrix} = \bar \mathbf{W} ^{-1} \begin{bmatrix} 0\\ f\end{bmatrix} = \begin{bmatrix} e^x & e^{x-2} \ln(x-1)\\ e^x & e^{x-2} \ln(x-1)+\dfrac{e^{x-2}}{x-1}\end{bmatrix}^{-1} \begin{bmatrix} 0\\ x\end{bmatrix} $$

Solved,


 * $$c_1' = -x(x-1)e^{-x}\ln(x-1)$$

and


 * $$c_2' = x(x-1)e^{2-x}$$

Integrate to get $$c_1$$ and $$c_2$$. Unfortunately, i cannot integrate these two values analytically


 * $$ c_1 = \int \left [-x(x-1)e^{-x}\ln(x-1)\right]dx $$


 * $$ c_2 = \int \left[x(x-1)e^{2-x} \right]dx $$

Now putting everything together, we obtain:

$$ \begin{align} y(x) =& y_H(x) +y_P(x) \\ =&k_1u_1(x) + k_2u_2(x) +u_1(x)c_1 + u_2(x)c_2 \\ =& k_1u_1(x) + k_2u_2(x) +u_1(x) \int - \dfrac{f(s)u_2(s)}{\mathbf{W}(s)}ds + u_2(x) \int - \dfrac{f(s)u_1(s)}{\mathbf{W}(s)}ds \qquad \text{or rewriting it as} \\ =& k_1e^x +k_2e^{x-2} \ln(x-1) + u_1(x)\int \left [-x(x-1)e^{-x}\ln(x-1)\right]dx + u_2(x) \int \left[x(x-1)e^{2-x} \right]dx \end{align} $$

Summarizing the final solution (if integrals could be analytically evaluated) is :

= Contributing Team Members =
 * }

Angela Diggs Egm6321.f09.team3.diggs 01:28, 21 October 2009 (UTC)

Catherine Snow EGM6321.f09.Team3.cgs 16:32, 21 October 2009 (UTC)

Barrett Mooney Egm6321.f09.team3.mooney 17:58, 21 October 2009 (UTC)

Francsico Kuljevan--Egm6321.f09.team3.Kuljevan.Francisco 19:31, 21 October 2009 (UTC)