User:Egm6321.f09.team4/HW4

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

= Homework #4: Team 4 =

Problem #1:
(Lecture 19-1)


 * Given :


 * The Legendre Equation, with $$n=0$$ (see King et. al., pg. 31)


 * $$ \begin{align}

F\left(x,y,y',y\right) = \left(1-x^{2}\right)y - 2xy' = 0 \end{align} $$


 * and one solution to the homogenous equation:


 * $$ \begin{align}

u_{1}\left(x\right) = 1 \end{align} $$


 * Find :


 * $$u_{2}\left(x\right)$$, the second homogenous solution, using reduction of order method #2 (undet. factors).


 * Solution :


 * From Lecture 17-4, Equation #2:


 * $$ \begin{align}

u_{2} = u_{1}\left(x\right) \int_{x} \left[ \left(u_{1} \left( t\right)\right)^{-2} \ \text{exp} \left\{ -\int_{t} a_{1} \left( s \right)ds \right\} \right] dt \end{align} $$


 * To get $$a_{1}\left(x\right)$$, we simply take the coefficient of the $$y'$$ term of the standard form of the ODE:


 * $$ \begin{align}

\left(1-x^{2}\right)y'' - 2xy' &= 0 \\ y'' + \frac{-2x}{1-x^{2}}y' &= 0 \\ \\ \text{so:} \quad a_{1}\left(x\right) = \frac{-2x}{1-x^{2}} & \end{align} $$


 * Plugging $$u_{1}\left(x\right)$$ and $$a_{1}\left(x\right)$$ back into the first equation:


 * $$ \begin{align}

u_{2} &= 1 \cdot \int_{x} \left[ \left(1\right)^{-2} \ \text{exp} \left\{ -\int_{t} \frac{-2s}{1-s^{2}} ds \right\} \right] dt \\ &= \int_{x} \text{exp}\left( \int_{t} \frac{2s}{1-s^{2}} ds \right) dt \end{align} $$


 * To simplify this further, we first need to solve the innermost integral. To do this, perform a change of variables. (Note: we're neglecting constants of integration, since they do not contribute anything.)


 * $$ \begin{align}

\text{Let:} \qquad \quad & \\ u&=1-s^{2} \\ -du&=2s\ ds \\ \text{Then:} \qquad \quad & \\ \int_{t} \frac{2s}{1-s^{2}}\ ds &= -\int_{t} \frac{1}{u}\ du \\ &= -\text{ln}\left(u\right)\big]_{s=t} \\ &= -\text{ln}\left(1-s^{2}\right)\big]_{s=t} \\ &= \text{ln}\left(\frac{1}{1-t^{2}}\right) \end{align} $$


 * This value for the innermost integral can now be inserted back into the full equation:


 * $$ \begin{align}

u_{2} &= \int_{x}\ \text{exp}\left[ \text{ln}\left(\frac{1}{1-t^{2}}\right) \right]\ dt \\ &= \int_{x}\ \frac{1}{1-t^{2}}\ dt \\ &= \frac{1}{2}\ \text{ln}\left(\frac{1+x}{1-x}\right) \end{align} $$

Contributors:
 * Egm6321.f09.team4.sls 16:56, 15 October 2009 (UTC)

Problem #2:
(Lecture 19-1 - King et. al., pg. 28, problem 1.1b)


 * Given :


 * The following ODE:


 * $$ \begin{align}

F\left(x,y,y',y\right) = xy+2y'+xy = 0 \\ \end{align} $$


 * and one solution of this ODE:


 * $$ \begin{align}

u_{1} = x^{-1}\text{ sin}\left( x \right) \end{align} $$


 * Find :
 * Show that $$u_{1}$$ is a solution to the ODE.
 * Use reduction of order method 2 to find the second solution, $$u_{2}$$.


 * Solution :


 * First, we show that $$u_1 = x^{-1}\text{ sin}\left(x\right)$$ is a valid solution to this ODE, by making the substitution $$y = u_1$$:


 * $$ \begin{align}

y  &= x^{-1} \text{ sin}\left(x\right) \\ y' &= -x^{-2}\text{ sin}\left(x\right) + x^{-1}\text{ cos}\left(x\right) \\ y'' &= 2x^{-3}\text{ sin}\left(x\right) - x^{-2}\text{ cos}\left(x\right)-x^{-2}\text{ cos}\left(x\right) -x^{-1}\text{ sin}\left(x\right) \\ &= \left(2x^{-3} -x^{-1}\right)\text{ sin}\left(x\right) -2x^{-2}\text{ cos}\left(x\right) \end{align} $$


 * Inserting these values into the ODE:


 * $$ \begin{align}

0 &= \left(2x^{-3} -x^{-1}\right)\text{ sin}\left(x\right) - 2x^{-2}\text{ cos}\left(x\right) - 2x^{-3}\text{ sin}\left(x\right) + 2x^{-2}\text{ cos}\left(x\right) + x^{-1}\text{ sin}\left(x\right) \\ 0 &= \cancel{2x^{-3}\text{ sin}\left(x\right) - 2x^{-3}\text{ sin}\left(x\right)} \cancel{- 2x^{-2}\text{ cos}\left(x\right) + 2x^{-2}\text{ cos}\left(x\right)} \cancel{- x^{-1}\text{ sin}\left(x\right) + x^{-1}\text{ sin}\left(x\right)} \\ 0 &= 0 \quad \text{Proof.} \end{align} $$


 * Next, we use reduction of order method 2 to find a second independent solution, $$u_{2}$$. Using equation 2 from Lecture 17-4:


 * $$ \begin{align}

u_{2} &= u_{1} \int_{x} \left(u_{1}\right)^{-2}\text{ exp}\left( -\int_{t} a_{1}\left(s\right)ds\right)dt \\ &= x^{-1}\text{ sin}\left(x\right) \int_{x} \frac{t^{2}}{\text{sin}^{2}t} \text{ exp}\left(-\int_{t}\frac{2}{s}ds\right)dt \\ \end{align} $$


 * Solve the inner integral first:


 * $$ \begin{align}

-\int_{t} \frac{2}{s} ds = -2 \text{ ln}\left(t\right) = \text{ ln}\left( \frac{1}{t^{2}} \right) \end{align} $$


 * Then, plug this result into the outer integral:


 * $$ \begin{align}

u_{2} &= x^{-1}\text{ sin}\left(x\right) \int_{x} \frac{\cancel{t^{2}}}{\text{sin}^{2}t} \cdot \frac{1}{\cancel{t^{2}}} dt \\ &= x^{-1}\text{ sin}\left(x\right) \cdot -\text{ cot}\left(x\right) \\ &= -x^{-1}\text{ cos}\left(x\right) \end{align} $$

Contributors:
 * Egm6321.f09.team4.sls 16:27, 19 October 2009 (UTC)

Problem #3:
(Lecture 22-1: from King et. al., pg.28 prob. 1.3.a)


 * Given :


 * $$ \begin{align}

y'' -2y' + y = x^{3/2}\text{ exp}\left(x\right) \end{align} $$


 * Find :


 * The general solution of this non-homogenous ODE.


 * Solution :


 * Let's first look at the homogeneous equation:


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


 * This is a linear, 2nd-order ODE with constant coefficients, giving us the characteristic equation:


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


 * This equation has two identical roots of r=1. Therefore one of the solutions is $$u_1(x)=C_1e^x$$
 * To determine the second solution, let us use reduction of order method 2:


 * $$u_2(x)=U(x)u_1(x)$$


 * $$u_2'(x)=U'u_1+Uu_1'$$


 * $$u_2=Uu_1+2U'u_1'+Uu_1''$$


 * $$u_2-2u_2'+u_2=Uu_1+2U'u_1'+Uu_1''-2U'u_1-2Uu_1'+Uu_1$$


 * Which simplifies to:


 * $$\cancel{U(u_1-2u_1'+u_1)}+U'(2u_1'-2u_1)+Uu_1$$


 * The U term cancels because $$u_1$$ is a solution to the homogeneous equation.
 * Therefore the dependent variable U is missing, and we can write:


 * $$Z(x)=U'(x)$$


 * $$Z(2u_1'-2u_1)+Z'(u_1)=0$$


 * We have reduced the problem to a linear first order ODE with varying coefficients.
 * Because of the homogeneity of the ODE we can solve for Z by direct integration:


 * $$Z(2u_1'-2u_1)+Z'(u_1)\Rightarrow \frac{Z'}{Z}=2-\frac{2u_1'}{u_1}$$


 * $$ \begin{align}

\int \frac{Z'}{Z} &= \int_{ }^{x}2ds-\int \frac{2u_1'}{u_1} \\ ln(Z) &= 2x-2ln(u_1)+C_2 \\ &= 2x-2ln(C_1e^x)+C_2 \\ &= C_2-2ln(C_1)+2x-2x \\ &= C_2-2ln(C_1) \\ &= D \quad \text{(where D is a constant)} \end{align} $$


 * $$ \begin{align}

&U' = Z = e^D = k_1 \quad \text{(where } k_1 \text{ is a constant)} \\ &U = \int_{ }^{x}k_1ds=k_1x \end{align} $$


 * Substituting into the original expression for $$u_2$$ we get:


 * $$u_2=Uu_1=(k_1x)(C_1e^x)=C_2xe^x$$


 * Now we must solve for the particular solution. Let us try variation of parameters with the two equations forming the Wronskian as:


 * $$c_1'u_1+c_2'u_2=c_1'e^x+c_2'xe^x=0$$


 * $$c_1'u_1'+c_2'u_2'=c_1'e^x+c_2'(e^x+xe^x)=f(x)$$


 * $$\begin{align}

\begin{bmatrix} e^x & xe^x\\ e^x & e^x+xe^x \end{bmatrix}\cdot \begin{bmatrix} c_1'\\ c_2' \end{bmatrix}=\begin{bmatrix} 0\\ f \end{bmatrix} \end{align} $$


 * $$\begin{align}

\begin{bmatrix} c_1'\\ c_2' \end{bmatrix}=\underline{W}^{-1}\begin{bmatrix} 0\\ f \end{bmatrix}=\frac{1}{W}\begin{bmatrix} u_2' & -u_2\\ -u_1' & u_1 \end{bmatrix}\cdot \begin{bmatrix} 0\\ f \end{bmatrix}=\frac{1}{W}\begin{bmatrix} -u_2f\\ u_1f \end{bmatrix} \end{align}$$


 * W is the determinant of the Wronskian matrix:


 * $$W=(e^{2x}+xe^{2x})-xe^{2x}=e^{2x}$$


 * $$\begin{align}

\begin{bmatrix} c_1'\\ c_2' \end{bmatrix}=e^{-2x}\begin{bmatrix} -xe^x(x^{3/2}e^x)\\ e^x(x^{3/2}e^x) \end{bmatrix}=\begin{bmatrix} -x^{5/2}\\ x^{3/2} \end{bmatrix} \end{align}$$


 * Solving for the coefficients we can then obtain:


 * $$c_1(x)=-\int_{ }^{x}s^{5/2}ds=-\frac{2}{7}x^{7/2}+A$$


 * $$c_2(x)=\int_{ }^{x}s^{3/2}ds=\frac{2}{5}x^{5/2}+B$$


 * where A and B are constants.
 * Because the original ODE is linear the general solution is the sum of the homogeneous and particular solutions:


 * $$y(x)=y_h+y_p=Ae^x+Bxe^x-\frac{2}{7}x^{7/2}e^x+\frac{2}{5}x^{7/2}e^x$$


 * $$y(x)=Ae^x+Bxe^x+\frac{4}{35}x^{7/2}e^x$$

Contributors:
 * Egm6321.f09.team4.palubin.d 23:02, 19 October 2009 (UTC)
 * Egm6321.f09.team4.sls 17:07, 21 October 2009 (UTC) (just checked the solution)

Problem #4:
(Lecture 22-3)


 * Given :


 * Some linear, second-order ODE with variable coefficients.


 * Find :


 * Describe in words the solution process for this equation, if:
 * The equation is homogenous.
 * The equation is non-homogenous.


 * Solution :


 * Let us start with the example equation $$y''+a_1y'+a_0y=0$$

 For a homogeneous equation, the techniques are as follows:

 Exactness : Test to see if the ODE is exact. Apply the exactness conditions:


 * $$\begin{align}

\text{(a)} \quad &f_{xx} + 2pf_{xy} +p^{2}f_{yy} = g_{xp} + pg_{yp} - g_{y} \\ \text{(b)} \quad &f_{xp} + pf_{yp} + 2f_{y} = g_{pp} \end{align}$$

If not exact, try using an Euler integrating factor to force exactness, and determine the first integral $$\Phi$$ of the system. Now the equation has been reduced to a first order system. From here, depending on the equation either use direct integration or another integrating factor and see if one can solve for $$y\left(x\right)$$. 

 Trial solutions : Use trial solutions to find at least one solution to the equation. Try using $$u=e^x$$ to develop the characteristic equation for the system, $$(r^2+a_1r+a_0)$$. If there are two distinct roots $$r_1$$ and $$r_2$$ that are not functions of $$x$$, we have two solutions $$u_1=e^{r_1x}$$ and $$u_2=e^{r_2x}$$. If we have identical roots, or if we are given one root and asked to find the second, we can apply reduction of order method 2. 

 Reduction of Order, Method 2 : This method allows us to solve for $$u_2$$ assuming it is a function of some unknown function $$U$$ multiplied by $$u_1$$. This allows us to obtain an L2-ODE for $$U$$ which is missing the dependent variable. Therefore we apply reduction of order techniques defining $$Z=U'$$ to obtain an L1-ODE, and we can solve for $$Z$$ by direct integration or using an integrating factor. Following another integration to obtain $$U$$ from $$Z$$, we can obtain $$u_2$$.   

 For the non-homogeneous case, we use $$y''+a_1y'+a_0y=f(x)$$. First, we follow the procedures listed above to find at least one homogeneous solution. After that, there are a few possible paths we can follow:

 Trial solutions : Plug in possible solutions for $$y$$ with unknown coefficients and/or exponents based on the forcing function and solve for the unknowns to find the particular solution. This may or may not work. 

 Variation of Parameters : taking the form of the homogeneous solution $$y=c_1u_1+c_2u_2$$, assume that $$c_1$$ and $$c_2$$ are now functions of $$x$$. Compute $$y'$$ and $$y''$$ making the critical assumption that $$c_1'u_1+c_2'u_2=0$$. Plug these functions into the differential equation to obtain the second expression $$c_1'u_1'+c_2'u_2'=f(x)$$. Using these two expressions, set up the Wronskian matrix as shown:


 * $$\begin{align}

\begin{bmatrix} u_1 & u_2\\ u_1' & u_2' \end{bmatrix}\cdot \begin{bmatrix} c_1'\\ c_2' \end{bmatrix}=\begin{bmatrix} 0\\ f \end{bmatrix} \end{align} $$

Solve for $$c_1'$$ and $$c_2'$$, and then integrate to find $$c_1$$ and $$c_2$$. Substitute these solutions into $$y=c_1u_1+c_2u_2$$ to find the general solution to the ODE. 

 Alternative method : if one solution to the homogeneous equation is known, we can apply a similar method to reduction of order method 2, except instead of using the homogeneous case, we can set the L1-ODE obtained equal to the forcing function and solve directly using the Euler integrating factor method. </li> </ol> </li> </ol> Contributors:
 * Egm6321.f09.team4.palubin.d 15:22, 20 October 2009 (UTC)
 * Egm6321.f09.team4.sls 17:42, 21 October 2009 (UTC) (just checked the solution)

Problem #5:
(Lecture 23-1)


 * Given :


 * $$ \begin{align}

&\left(x-1\right)y'' -xy' + y = x \\ &\\ &u_{1} = \text{exp}\left(x\right) \end{align} $$


 * Find :


 * The solution to this equation. Do so twice, using the following methods:
 * Variation of parameters.
 * Alternative method: (see lectures 21-2 and 21-3)


 * Solution :


 * Note that $$u_1(x)$$ is a solution to the homogeneous equation:


 * $$\left(x-1\right)y'' -xy' + y = 0$$


 * Method of variation of parameters utilizes $$u_1(x)$$ and another solution $$u_2(x)$$ to find the homogeneous and the particular solutions required to assemble an expression for $$y(x)$$. The process is to:


 * a) Find $$u_2(x)$$ using reduction of order method 2.
 * b) Assemble the homogeneous solution $$y_{h}(x)$$ using our expressions for $$u_1(x)$$ and $$u_2(x)$$
 * c) Use the method of variation of parameters via the Wronskian Matrix to find the particular solution $$y_{p}(x)$$.
 * d) Assemble the total solution $$y(x)=y_{h}(x)+y_{p}(x)$$.
 * e) Compare that to the total solution using the Alternate Method.


 * a) Find $$u_2(x)$$:


 * $$y_{h}=Uu_1$$
 * $$y'_{h}=U'u_1+Uu'_1$$
 * $$y_{h}=U'u'_1+Uu_1+u'_1U'+u''_1U$$


 * Plug into equation


 * $$\left(x-1\right)y'' -xy' + y = 0$$


 * and collect terms.


 * $$(x-1)(U'u'_1+Uu_1+u'_1U'+u_1U) -x(U'u_1+Uu'_1) + Uu_1 = 0$$


 * $$U(u_1(x-1)-xu'_1+u_1)+U'(2u'_1(x-1)-xu_1)+U(u_1(x-1)) = 0$$


 * $$U(\underset{0}{\underbrace{u_1(x-1)-xu'_1+u_1}})+U'(2u'_1(x-1)-xu_1)+U(u_1(x-1)) = 0$$


 * $$U'(2u'_1(x-1)-xu_1)+U''(u_1(x-1)) = 0$$


 * $$Z(2u'_1(x-1)-xu_1)+Z'(u_1(x-1)) = 0$$


 * $$Z=Cexp{\left [-\int \frac{2u'_1(x-1)-xu_1}{u_1(x-1)}dx \right ]}$$


 * $$Z=Cexp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}$$


 * $$Z=U'=> U=C\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}dx+C_1$$


 * Recall,


 * $$y_{h}=Uu_1$$
 * $$y_{h}=k_1u_1+k_2u_2$$


 * Therefore,


 * $$u_2=u_1\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}dx$$


 * Substituting in $$u_1=e^x$$, we get:


 * $$u_2=e^x\int exp{\left [\int \frac{-2e^x(x-1)+xe^x}{e^x(x-1)}dx \right ]}dx=e^x\int exp{\left [\int \frac{-2(x-1)+x}{(x-1)}dx  \right ]}dx$$


 * $$u_2=e^x\int exp{\left [\int -2+\frac{x}{(x-1)}dx \right ]}dx=e^x\int exp{\left [ -2x+ln(x-1)+x-1+C\right ]}dx$$


 * $$u_2=e^x\int e^C(x-1)exp{\left [ -x-1\right ]}dx$$


 * Setting e^c equal to another constant D and integrating by parts we obtain:


 * $$u_2=De^x[-e^{-x-1}(x-1)-e^{-x-1}+E]=D[-e^{-1}(x-1)-e^{-1}+Ee^x]$$


 * Simplifying this further yields:


 * $$u_2=D[-e^{-1}(x-1)-e^{-1}+Ee^x]=D[-xe^{-1}+Ee^x]=k_2x+k_3e^x$$


 * However, since e^x was already established as our first u, we get:


 * $$u_2=k_2x$$


 * b)The homogeneous solution is therefore,


 * $$y_{h}=k_1e^x+k_2x$$


 * c) Solve for the non-homogeneous solution using


 * $$y_{p}=P_1(x)u_1(x)+P_2(x)u_2(x)$$


 * Where $$P_1(x)$$ and $$P_2(x)$$ are found by first finding the determinant of $$\underline{W}$$


 * $$\underline{W}=\begin{bmatrix}

u_1 & u_2\\ u'_1 & u'_2 \end{bmatrix}$$


 * $$W=det(\underline{W})$$


 * $$W=u_1u'_2-u'_1u_2$$


 * $$W=exp(x)*\frac{\partial }{\partial x}\left [exp(x)\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}dx  \right ]-exp(x)*exp(x)\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx  \right ]}dx$$


 * Which becomes,


 * $$W=exp(2x)*exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}dx$$


 * from Lecture 19-3,


 * $$P_1(x)=\underset{d_1(x))}{\underbrace{-\int \frac{u_2(s)f(s)}{W}ds}}+A$$


 * $$P_2(x)=\underset{d_2(x))}{\underbrace{\int \frac{u_1(s)f(s)}{W}ds}}+B$$


 * and the constants $$A$$ and $$B$$ are set to zero because they are arbitrary. Therefore,


 * $$P_1(x)=-\int \frac{xexp(x)\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}dx}{exp(2x)*exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx  \right ]}}dx$$


 * $$P_2(x)=\int \frac{xexp(x)}{exp(2x)*exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}}dx$$


 * d) The total solution is therefore,


 * $$y(x)=y_{h}+y_{p}$$


 * $$=C_1u_1+Cu_2+P_1u_1+P_2u_2$$


 * $$=C_1exp(x)+Cexp(x)\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx \right ]}dx-exp(x)\int \frac{xexp(x)\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx  \right ]}dx}{exp(2x)*exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx  \right ]}}dx+\int \frac{xexp(x)}{exp(2x)*exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx  \right ]}}dxexp(x)\int exp{\left [\int \frac{-2u'_1(x-1)+xu_1}{u_1(x-1)}dx  \right ]}dx$$


 * This will be simplified later after comparison with the Alternate Method.


 * e) The Alternate Method


 * Back to reduction of order method 2,


 * $$U'(2u'_1(x-1)-xu_1)+U''(u_1(x-1)) = \underline{x}$$


 * $$Z(2u'_1(x-1)-xu_1)+Z'(u_1(x-1)) = \underline{x}$$


 * $$Z'+Z\left [\frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right ]= \frac{x}{u_1(x-1)}=g(x)$$


 * We use integrating factor $$\mu(x)$$ to solve this N-H.L1.ODE.VC,


 * $$\mu\left(x\right)Z' + \mu\left(x\right)p\left(x\right)Z = \mu\left(x\right)g\left(x\right)$$


 * Assume that $$\mu\left(x\right)$$ satisfies $$\mu\left(x\right)p\left(x\right) = \mu'\left(x\right)$$, this equation becomes:


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


 * Integrating both sides of the equation, then solving for $$Z$$:


 * $$Z = \frac{\int{\mu\left(x\right)g\left(x\right)dx + c}}{\mu\left(x\right)}$$


 * We can chose $$c=0$$ because it is arbitrary. To find $$\mu\left(x\right)$$, we then use the assumption described above:


 * $$\mu(x)p(x)=\mu'(x)$$
 * $$p(x)= \frac{\mu'(x)}{\mu(x)} $$
 * $$p(x)= \frac{d}{dx}\left[ ln(\mu(x)) \right] $$
 * $$\int{p(x)}dx + k = ln(\mu(x)) \quad \text{(choose k=0)} $$
 * $$\int{\frac{2u'_1(x-1)-xu_1}{u_1(x-1)}}dx = ln(\mu(x)) $$
 * $$\mu(x)= exp\int \left( \frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right)dx $$


 * This results in,


 * $$Z = \frac{\int{xexp\int \left( \frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right)dx}dx}{exp\int \left( \frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right)dx}$$


 * $$Z =U'=> U= \int \frac{\int{xexp\int \left( \frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right)dx}dx}{exp\int \left( \frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right)dx}dx$$


 * and then $$y=Uu_1$$


 * $$y =Uu_1= exp(x)\int \frac{\int{xexp\int \left( \frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right)dx}dx}{exp\int \left( \frac{2u'_1(x-1)-xu_1}{u_1(x-1)} \right)dx}dx$$

Contributors: Egm6321.f09.Team4.meyerat 03:19, 20 October 2009 (UTC)

and

Egm6321.f09.team4.palubin.d 20:24, 21 October 2009 (UTC)

Problem #6:
(Lecture 23-1)


 * Given :


 * $$ \begin{align}

&xy'' +2y' + xy = x \\ &\\ &u_{1} = x^{-1}\text{ sin}\left(x\right) \end{align} $$


 * Find :


 * The solution to this equation. Do so twice, using the following methods:
 * Variation of parameters.
 * Alternative method: (see lectures 21-2 and 21-3)


 * Solution :


 * (a)-(d):


 * From Problem 2, we found that $$u_2=-x^{-1}cos(x)$$. Using that, we obtain


 * $$y_{h}=C_1x^{-1}sin(x)-C_2x^{-1}cos(x)$$


 * The nonhomogeneous solution is constructed as,


 * $$y_{p}=P_1u_1+P_2u_2$$


 * $$y_{p}=P_1x^{-1}sin(x)-P_2x^{-1}cos(x)$$


 * where $$P_1$$ and $$P_2$$ are functions of x. Using the Wronskian matrix:


 * $$\underline{W}=\begin{bmatrix}

u_1 & u_2\\ u'_1 & u'_2 \end{bmatrix}$$


 * $$W=det(\underline{W})$$


 * $$W=u_1u'_2-u'_1u_2$$


 * $$W=x^{-1}sinx(x^{-1}sinx+x^{-2}cosx)-((x^{-1}cosx-x^{-2}sinx)(-x^{-1}cosx))$$


 * $$W=x^{-2}(sin^{2}x+cos^{2}x)$$


 * $$W=x^{-2}$$


 * from Lecture 19-3,


 * $$P_1(x)=\underset{d_1(x)}{\underbrace{-\int \frac{u_2(s)f(s)}{W}ds}}+A$$


 * $$P_2(x)=\underset{d_2(x)}{\underbrace{\int \frac{u_1(s)f(s)}{W}ds}}+B$$


 * and the constants $$A$$ and $$B$$ are set to zero because they are arbitrary. Therefore,


 * $$P_1=-\int \frac{-x^{-1}xcos(x)}{x^{-2}}dx=\int x^{2}cos(x)dx$$


 * $$P_2=\int \frac{x^{-1}xsin(x)}{x^{-2}}dx=\int x^{2}sin(x)dx$$


 * $$P_1=(x^2-2)sin(x)+2xcos(x)+C_3$$


 * $$P_2=(-x^2+2)cos(x)+2xsin(x)+C_4$$


 * Plug in,


 * $$y_{p}=P_1u_1+P_2u_2$$


 * $$y_{p}=x^{-1}sin(x)\left [(x^2-2)sin(x)+2xcos(x)+C_3 \right ]-x^{-1}cos(x)\left [(-x^2+2)cos(x)+2xsin(x)+C_4  \right ]$$


 * Which reduces to,


 * $$y_{p}=x-2x^{-1}+C_3x^{-1}sin(x)-C_4x^{-1}cos(x)$$


 * Combining with the homogeneous solution, we obtain:


 * $$y=x-2x^{-1}+K_1x^{-1}sin(x)+K_2x^{-1}cos(x)$$


 * e) Alternate Method:


 * $$y_{h}=Uu_1$$
 * $$y'_{h}=U'u_1+Uu'_1$$
 * $$y_{h}=U'u'_1+Uu_1+u'_1U'+u''_1U$$


 * Plug into equation


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


 * And the reduction of order method 2 leaves us with,


 * $$U''(xu_1)+U'(2xu'_1+2u_1)=x$$


 * or,


 * $$Z'(xu_1)+Z(2xu'_1+2u_1)=x$$


 * $$Z'+Z\frac{2xu'_1+2u_1}{xu_1}=\frac{x}{xu_1}=\frac{1}{u_1}=g(x)$$


 * Using the integrating factor method,


 * $$\mu\left(x\right)Z' + \mu\left(x\right)p\left(x\right)Z = \mu\left(x\right)g\left(x\right)$$


 * Assume that $$\mu\left(x\right)$$ satisfies $$\mu\left(x\right)p\left(x\right) = \mu'\left(x\right)$$, this equation becomes:


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


 * Integrating both sides of the equation, then solving for $$Z$$:


 * $$Z = \frac{1}{\mu(x)}\int{\mu\left(x\right)g\left(x\right)dx}$$


 * $$U = \int \frac{1}{\mu(x)}\int{\mu\left(x\right)g\left(x\right)dx}dx$$


 * $$y = u_1\int \frac{1}{\mu(x)}\int{\mu\left(x\right)g\left(x\right)dx}dx$$


 * To find $$\mu\left(x\right)$$, we then use the assumption described above:


 * $$\mu(x)p(x)=\mu'(x)$$
 * $$p(x)= \frac{\mu'(x)}{\mu(x)} $$
 * $$p(x)= \frac{d}{dx}\left[ ln(\mu(x)) \right] $$
 * $$\int{p(x)}dx + k = ln(\mu(x)) \quad \text{(choose k=0)} $$
 * $$\int\frac{2xu'_1+2u_1}{xu_1}dx = ln(\mu(x)) $$
 * $$\mu(x)= exp\int \left( \frac{2xu'_1+2u_1}{xu_1} \right)dx $$


 * Evaluating $$\mu$$,


 * $$\mu=exp\int \frac{2xu'_1+2u_1}{xu_1}dx$$


 * $$=exp\int \frac{2u'_1}{u_1}+\frac{2}{x}dx$$


 * $$=exp\left [2ln(u_1)+2ln(x)+2C_4 \right ]$$


 * $$\mu=C_5u^2_1x^2$$


 * Plug in,


 * $$y = u_1\int \frac{1}{C_5u^2_1x^2}\left [\int{\frac{1}{u_1}C_5u^2_1x^2dx} \right ]dx$$


 * $$y = u_1\int \frac{1}{u^2_1x^2}\left [\int{\frac{1}{u_1}u^2_1x^2dx} \right ]dx$$


 * $$y = u_1\int \frac{1}{u^2_1x^2}\left [\int{u_1x^2dx} \right ]dx$$


 * $$y = u_1\int \frac{1}{u^2_1x^2}\left [\int{x^{-1}sin(x)x^2dx} \right ]dx$$


 * $$y = u_1\int \frac{1}{u^2_1x^2}\left [\int{xsin(x)dx} \right ]dx$$


 * $$y = u_1\int \frac{1}{x^{-2}sin^2(x)x^2}\left [-xcos(x)+sin(x)+C_6 \right ]dx$$


 * $$y = u_1\int \frac{-xcos(x)}{sin^2(x)}+\frac{1}{sin(x)}+\frac{C_6}{sin^2(x)}dx$$


 * via integration by parts, this becomes,


 * $$y = u_1\left [ln(csc(x)-cot(x))+xcscx-ln(csc(x)-cot(x))-C_6cot(x)+C_7 \right ]$$


 * $$y = x^{-1}sin(x)\left [xcscx-C_6cot(x)+C_7 \right ]$$


 * Results in,


 * $$y = 1-C_6x^{-1}cos(x)+C_7x^{-1}sin(x)$$

Contributors:
 * Egm6321.f09.Team4.meyerat 06:28, 21 October 2009 (UTC)