# Thread: Variation of parameters

1. ## Variation of parameters

Use the method of variation of parameters to find a particular solution of the given differential equation.

$y''+4y=\sin^2 x$

My attempt:

$y_c(x)=c_1\cos 2x+c_2\sin 2x$

$y_1=\cos 2x,\ y_2=\sin 2x$

$y_1'=-2\sin 2x,\ y_2'=2\cos 2x$

$u_1'\cos 2x+u_2'\sin 2x=0$

$u_1'*-2\sin 2x+u_2'*2\cos 2x=\sin^2 x$

$2u_1'\sin 2x\cos 2x+2u_2'\sin^2 2x=0$

$-2u_1'\sin 2x\cos 2x+2u_2'\cos^2 2x=\sin^2x\cos 2x$

$2u_2'=\sin^2x\cos 2x$

$u_2'=\frac{1}{2}\sin^2x\cos 2x$

$u_1'=-\frac{1}{2}\sin^2x\sin 2x$

$=-\sin^3 x\cos x$

$u_1=-\frac{1}{4}\sin^4 x$

$u_2'=\frac{1}{4}(1-\cos 2x)\cos 2x$

$=\frac{1}{4}(\cos 2x-\cos^2 2x)$

$=\frac{1}{4}\cos 2x-\frac{1}{8}(1+\cos 4x)$

$=\frac{1}{8}(2\cos 2x-\cos 4x-1)$

$u_2=\frac{1}{8}\left(\sin 2x-\frac{1}{4}\sin 4x-x\right)$

$y_p(x)=-\frac{1}{4}\sin^4 x\cos 2x+\frac{1}{8}\left(\sin 2x-\frac{1}{4}\sin 4x-x\right)\sin 2x$

$=-\frac{1}{4}\sin^4 x\cos 2x+\frac{1}{8}\sin^2 2x-\frac{1}{32}\sin 4x\sin 2x-\frac{1}{8}x\sin 2x$

----------------------------------------------------------------------------------------------------------------

However, the answer given in the book is

$y_p(x)=\frac{1}{8}(1-x\sin 2x)$

Where have I gone wrong?

2. ## Re: Variation of parameters

If you use trig identities on your answer

$-\frac{1}{4} \left(\frac{1 - \cos 2x}{2}\right)^2 \cos 2x + \frac{1 - \cos ^2 2x}{8} - \frac{1}{16}\left(1 -\cos ^2 2x\right)\cos 2x - \frac{ x \sin 2x}{8}$

and simplify you end up with

$- \frac{\cos 2x}{8} + \dfrac{1}{8} - \frac{ x \sin 2x}{8}$.

The first term can be absorbed into the complimentary solution leaving the particular solution as you mentioned.