# Variation of parameters for a linear second order nonhomogeneous equation

I'm using variation of parameters for this problem, and I'm not sure if I'm on the right track.

The question is

Find a function $v_1$ and $v_2$ such that $v_1(x)e^x+v_2(x)e^{2x}$ is a solution of $y''-3y'+2y=4x+4$ and $v_1(x)y_1(x)=v_2(x)y_2(x)$

$y''-3y'+2y=4x+4$
First we need to find the roots.
$r^2-3r+2=0$
$(r-1)(r-2)=0$
$r=1$ $r=2$
So, the $Y_h$ = $c_1e^x+c_2e^{2x}$

Then we need to find the derivatives and the Wronskian. I am using Cramer's rule.
$y_1$ = $e^x$ $y_2$ = $e^{2x}$

$y'_1$ = $e^x$ $y'_2$ = $2e^{2x}$

W[$e^x$ $e^{2x}$]

W= $$\left[ \begin{array}{ c c } e^x & e^{2x} \\ e^x & 2e^{2x} \end{array} \right]$$ $2e^{2x} e^x -e^xe^{2x}$ = $e^{3x}$

$W_1$= $$\left[ \begin{array}{ c c } 0 & e^{2x} \\ 4x-4 & 2e^{2x} \end{array} \right]$$ $2e^{2x}(0)-(4x-4)e^{2x}$=$-(4x-4)e^{2x}$

$W_2$= $$\left[ \begin{array}{ c c } e^x & 0 \\ e^x & 4x-4 \end{array} \right]$$ $(4x-4)(e^x)-(0)(e^x)$=$(4x-4)e^{x}$

$\frac{W_1}{W}$ = $\frac{-(4x-4)e^{2x}}{e^{3x}}$ = $\frac{-(4x-4)}{e^x}$

$\frac{W_2}{W}$ = $\frac{(4x-4)e^{x}}{e^{3x}}$ = $\frac{(4x-4)}{e^{2x}}$

After I calculated the Wronskian through Cramer's Rule I have to find the anti-derivative

$\frac{W_1}{W}$ = $\frac{-(4x-4)}{e^x}$

$\int{-(4x-4)}{e^x}\,dx = 4xe^{-x} + C$

$\frac{W_2}{W}$ = $\frac{(4x-4)}{e^{2x}}$

$\int {(4x-4)}{e^{-2x}}\,dx = (1-2x)e^{-2x} + C$

The result from the anti-derivative along with $y_1$ = $e^x$ $y_2$ = $e^{2x}$

should be in a formula $u_1y_1+u_2y_2 = 0$

$u_1y_1+u_2y_2 = 4x-4$

but I think I'm getting the letters confused. So, how do I find the values that equal to each other and satisfy this condition? Do I solve using the method of undetermined coefficients?

EDIT: I have one more piece to this problem.

The Theorem states that If $y_1...y_n$

are linearly independent solutions of the reduced form of

$y^{n}+P_{n+1}y^{n-1}+...+p_{1}y'+p_0y=q$

then there are functions $v_1,...v_n$ which satisfy $y_1v'_1+...+y_nv'_n=0$

I'm just a beginner at proofs. How do I tackle this problem? I got it. It needed the derivatives of $v_1$ and $v_2$ Therefore, $v_1(x)=4xe^{-x}$

$v'_1(x)=-4e^{-x}(x-1)$

$v_2(x)=4(-1/2x+1/4)e^{-2x}$

$v_2(x)=-(2x-1)e^{-2x}$

$v'_2(x)=4(x-1)e^{-2x}$

The problem for the theorem just needed the original $v_1(x)$ and $v_2(x)$

Something isn't right... the answer is $v_1(x)$=$x$+$\frac{1}{2}e^{-x}$ because it needed to satisfy this situation $v_1(x)y_1(x)=v_2(x)y_2(x)$

since $v_1$ would normally represent a Wronskian in this problem, there must be something or some value...that would satisfy $v_1(x)y_1(x)=v_2(x)y_2(x)$

I've done this problem with a study buddy and we found the answer. We were supposed to take the derivatives of $Y_p$ twice and use the rules from linear equations.

My study buddy's method:

We are asked to solve this using Variation of Parameters (VoP), given:

$$\tag 1 y''-3y'+2y=4x+4$$

Step 1

Find the homogenous solution to $(1)$, so we have:

$$\tag 2 y''-3 y'+ 2 y = 0$$

This yields:

$$y_h = c_1e^x + c_2 e^{2x}$$

Step 2

We are now going to make use of VoP, so we set: $y_1 = e^x$ and $y_2 = e^{2x}$ from $y_h$ and $f = 4(x+1)$ from $(1)$.

We calculate the Wronskian of $y_1$ and $y_2$, yielding $W(e^x, e^{2x}) = e^{3x}$.

Using VoP, we have:

$$u_1 = \int \dfrac{-y_2 f}{W(e^x,e^{2x})} dx = \int \dfrac{-e^{2x}~ 4(x+1)}{e^{3x}} dx = 4 e^{-x} (x+2)$$

$$u_2 = \int \dfrac{y_1 f}{W(e^x,e^{2x})} dx = \int \dfrac{e^x ~4(x+1)}{e^{3x}} dx = -e^{2x}(2x+3)$$

Now, $y_p$ is given by:

$$y_p = y_1 u_1 + y_2 u_2 = e^x(e^{-x} 4(x+2)) + e^{2x}(-e^{-2x}(2x+3)) = 4(x+2) -(2x+3) = 2x + 5$$

Step 3

Our final solution is given by:

$$y(x) = y_h(x) + y_p(x) = c_1e^x + c_2 e^{-2x} + 2x + 5$$

• But how does that satisfy the condition of $v_1(x)y_1(x)=v_2(x)y_2(x)$? Edit: Nevermind. I see it...sorry about that. Thank you :D Nov 11, 2013 at 3:09
• Well we needed to calculated the Wronskian through Cramer's Rule which we did...We also got the $Y_h$. What was missing was the part when the equation needs to satisfy the condition of $v_1(x)y_1(x)=v_2(x)y_2(x)$ It could be that the values of $v_1(x), y_1(x), v_2(x), and y_2(x)$ must be equal to each other Nov 11, 2013 at 3:19
• Precisely, you are doing great and thank you for showing effort and your work! Regards Nov 11, 2013 at 3:20
• You're welcome. It took me half an hour just to code all of this stuff. I never knew it was hard work until now. But at least I'm getting used to the site. :) Nov 11, 2013 at 3:25
• You will get better at Mathjax/Latex and it will be a breeze as I have the same problems! Regards Nov 11, 2013 at 3:28