# Solving second order linear differential equation using variation of parameters.

Let the differential equation be $$y''(x)-4y'(x)+4y(x)=e^{-2x}.$$ Then find the general solution using variation of parameters.

My Attempt First I found the solution to the homogeneous equation which is $y_h=(a+bx)e^{2x}$. Now using the know formulae for parameters we have $$a (x)=-\int \frac {y_2(x)g (x)}{W (y_1,y_2)} ,\quad b (x)=\int \frac {y_1 (x)g (x)}{W (y_1,y_2)}.$$ From here $$a (x)=-\frac {4x+1}{16}e^{-4x},\quad b (x)=-\frac {1}{4}e^{-4x}.$$ Thus my general solution is $$y=y_h+a (x)y_1(x)+b (x)y_2(x)=(a+bx)e^{2x}-e^{-4x}(\frac {8x+1}{16})$$ but this isn't matching with the solution of WA. Note that here $y_1(x)=e^{2x}$, $y_2 (x)=xe^{2x},W (y_1,y_2)=e^{4x}$.

• Your Wronskian is probably false. Since you didn't edit the details of your calculus (-1), it is not possible to show where exactly is the mistake. – JJacquelin Jan 28 '18 at 8:35
• Robert Z has already pointed out the mistake . My wronskian isnt wrong. There was an error in sign – Archis Welankar Jan 28 '18 at 8:39

## 1 Answer

You are almost correct, just change the sign of $a(x)$ and recall that the particular solution given by the variation of parameters is $y(x)=a(x)y_1(x)+b(x)y_2(x)$.

Notice that $W (e^{2x},xe^{2x})=e^{4x}$ and $$a(x)=-\int \frac {xe^{2x}e^{-2x}}{e^{4x}}dx=\frac{(1+4x)e^{-4x}}{16} ,\quad b(x)=\int \frac {e^{2x}e^{-2x}}{e^{4x}}dx=-\frac{e^{-4x}}{4}.$$ Therefore a particular solution is $$y(x)=a(x)e^{2x}+b(x)xe^{2x}=\frac{(1+4x)e^{-2x}}{16}-\frac{4xe^{-2x}}{16} =\frac{e^{-2x}}{16}.$$

More simply, here a particular solution has the form $y(x)=Ce^{-2x}$ and it satisfies $$y''(x)-4y'(x)+4y(x)=4Ce^{-2x}+8Ce^{-2x}+4Ce^{-2x}=e^{-2x}\implies C=\frac{1}{16}.$$

• Then why is wolf giving $ae^{4x}+b+x+e^{-2x}{12}$? – Archis Welankar Jan 28 '18 at 8:26
• Are you sure that in WA you plug in $y''(x)-4y'(x)+4y(x)=e^{-2x}$? In your statement you wrote $y''(x)-4y'(x)+4=e^{-2x}$ which is a different EDO. Now I edited it. – Robert Z Jan 28 '18 at 8:29
• I dont know when will I stop these silly mistakes :(. – Archis Welankar Jan 28 '18 at 8:32
• Don't worry, this a "classic" oversight!! ;-) – Robert Z Jan 28 '18 at 8:34