Solving differential equation using variation in parameters method.

ordinary differential equations

I'm a bit stuck on this problem and could use some help.

I'm trying to solve this differential equation using two methods: variation of parameters and undetermined coefficients. They should be equal. I'll start with the undetermined coefficients first:

$$y'' – 2y' + y = e^{2x}$$
auxiliary equation: $$r^2 – 2r + 1 = 0$$
$$(r-1)(r-1)$$ so the root is 1 so the complimentary equation is:$$y_c = c_1e^x + c_2xe^x$$

So, a guess $y_p = Ae^{2x}$ so $y_p' = 2Ae^{2x}$ and so $y_p'' = 4Ae^{2x}$

and so plugging:

$$4Ae^{2x} – 4Ae^{2x} + Ae^{2x} = e^{2x}$$ and so A = 1 so $y_p = e^{2x}$

so teh general solution via undetermined coefficients is: $$y = c_1e^x + c_2xe^x + e^{2x}$$

Now for variation in parameters which should be the same:

so we have the complimentary equation: $$y_c = c_1e^x + c_2xe^x$$

and so we replace the constants with functions and look for a particular in this form:
$$y_p = u_1(x)e^x + u_2(x)xe^x$$

differentiating:

$$y_p' = u_1e^x + u_1'e^x + u_2(xe^x + e^x) + u_2'xe^x$$

then set $u_1'e^x + u_2'xe^x = 0$
$$y_p' = u_1e^x + u_2xe^x + u_2e^x$$

so

$$y_p'' = u_1e^x + u_1'e^x + u_2(xe^x + e^x) + u_2e^x + u_2'e^x$$

so subbing:

$$u_1e^x + u_1'e^x + u_2xe^x + u_2e^x) + u_2e^x + u_2'e^x – 2u_1e^x – 2u_2xe^x + 2u_2e^x + u_1e^x + u_2xe^x = e^{2x}$$

I am having trouble solving:

so my two equations are:

$$u_1'e^x + u_2'e^x = e^{2x}$$

$$u_1'e^x + u_2'xe^x = 0 \rightarrow u_1'e^x = -u_2'xe^x \rightarrow u_1' = -u_2'x$$

so can I then sub in $u_1'$ like this: $$-u_2'xe^x + u_2'e^x = e^{2x}$$
Is this right so far? how do I go from here?

Best Answer

Variation of Parameters

I will answer your question instead of you solving, and show you how I attempted the problem. I will begin as you did with undetermined coefficients: \begin{equation} y''-2y'+y=e^{2x} \end{equation} I will then solve for the homogenous portion of the problem: \begin{equation}y''-2y'+y=0 \end{equation} Then I will write the auxiliary equation: \begin{align}m^2-2m+1&=0\\(m-1)^2&=0 \end{align} This then produces linearly independent terms, for the complementary solution of the problem: \begin{equation}y_c=c_1e^x+c_2xe^x \end{equation} From here one can begin to set up the Wronskian for the known complementary solutions: \begin{equation} W=\begin{bmatrix}e^x&xe^x\\ e^x&xe^x+e^x \end{bmatrix}\end{equation} Solving that we get the following: \begin{align}W&=e^x(xe^x+e^x)-e^x(xe^x)\\ W&=xe^{2x}+e^{2x}-xe^{2x}\\W&=e^{2x} \end{align} Now we can set up the following two Wronskians: \begin{align}W_1&=\begin{bmatrix} e^x & 0 \\ e^x & e^{2x} \end{bmatrix}\\ W_1&=e^xe^{2x}-0e^x\\W_1&=e^{3x}\end{align} \begin{align}W_2&=\begin{bmatrix}0&xe^x\\e^{2x}& xe^x+e^x \end{bmatrix} \\ W_2&=0(xe^x+e^x)-e^{2x}(xe^x)\\ W_2=-xe^{3x} \end{align} Now we can set up the following: \begin{align}y_1&=e^x\\y_2&=xe^x \end{align} \begin{align}u_1&=y_2\int \frac{W_1}{W}dx\\u_1&=xe^x(\int \frac{e^{3x}}{e^{2x}}dx)\\u_1&=xe^{2x} \end{align}\begin{align}u_2&=y_1\int \frac{W_2}{W}dx\\ u_2&=e^x \int -\frac{xe^{3x}}{e^{2x}}dx\\ u_2&=e^x \int-xe^xdx \\u_2&=e^x (-xe^x +e^x)=-xe^{2x}+e^{2x} \end{align} Now we have the particular when we add up the two $u$'s. \begin{equation}y_p=u_1+u_2=xe^{2x}-xe^{2x}+e^{2x}=e^{2x} \end{equation} Now, we can add the complementary, and the particular and get the complete solution which is the following:\begin{equation}y=y_c+y_p=c_1e^x+c_2xe^x+e^{2x} \end{equation}