# Show that  xsin2x  is a solution to the DE  y'' + 4y = 4cos2x ?

Aug 18, 2017

I tried this:

#### Explanation:

To show this you need to derive twice your solution $y = x \sin \left(2 x\right)$ and substitute for $Y ' '$ and $y$ into your equation and see if it works.
Let us derive:
$Y ' = \sin \left(2 x\right) + 2 x \cos \left(2 x\right)$
again:
$Y ' ' = 2 \cos \left(2 x\right) + 2 \cos \left(2 x\right) - 4 x \sin \left(2 x\right)$

let us substitute $Y ' '$ and the given result $y = x \sin \left(2 x\right)$ into our equation#:

$2 \cos \left(2 x\right) + 2 \cos \left(2 x\right) - 4 x \sin \left(2 x\right) + 4 \left(x \sin \left(2 x\right)\right) = 4 \cos \left(2 x\right)$

that gives $0 = 0$ implying that the function $y = x \sin \left(2 x\right)$ is solution of our equation.

Aug 18, 2017

We seek to show that:

$y = x \sin 2 x$

is a solution to the DE:

$y ' ' + 4 y = 4 \cos 2 x$ ..... [A]

Given that we have the solution we can just differentiate (twice) and substitute:

$y ' = \left(x\right) \left(\frac{d}{\mathrm{dx}} \sin 2 x\right) + \left(\frac{d}{\mathrm{dx}} x\right) \left(\sin 2 x\right)$
$\setminus \setminus \setminus \setminus = 2 x \cos 2 x + \sin 2 x$

$y ' ' = \left(2 x\right) \left(\frac{d}{\mathrm{dx}} \cos 2 x\right) + \left(\frac{d}{\mathrm{dx}} 2 x\right) \left(\cos 2 x\right) + 2 \cos 2 x$
$\setminus \setminus \setminus \setminus \setminus = - 4 x \sin 2 x + 2 \cos 2 x + 2 \cos 2 x$
$\setminus \setminus \setminus \setminus \setminus = - 4 x \sin 2 x + 4 \cos 2 x$

Substituting into the DE [A], we get:

$y ' ' + 4 y = \left(- 4 x \sin 2 x + 4 \cos 2 x\right) + 4 \left(x \sin 2 x\right)$
$\text{ } = - 4 x \sin 2 x + 4 \cos 2 x + 4 x \sin 2 x$
$\text{ } = 4 \cos 2 x$ QED.

Note: this solution, is known as the Particular Solution. We could go on and form the General Solution as follows:

Complementary Function

The homogeneous equation associated with [A] is

$y ' ' + 4 y = 0$ ..... [B]

And it's associated Auxiliary equation is:

${m}^{2} + 4 = 0$

Which has pure imaginary solutions $m = \pm 2 i$

Thus the solution of the homogeneous equation [B] is:

${y}_{c} = {e}^{0} \left(A \cos \left(2 x\right) + B \sin \left(2 x\right)\right)$
$\setminus \setminus \setminus = A \cos 2 x + B \sin 2 x$

Which then leads to the GS of [A}

$y \left(x\right) = {y}_{c} + {y}_{p} = A \cos 2 x + B \sin 2 x$ $+ x \sin 2 x$