I'm solving a differential equations. I got the final answer which is $$\frac{1}{6}\cos\left(\frac{1}{2}x\right)\cos\left(\frac{3}{2}x\right)-\frac{1}{2}\cos^2\left(\frac{1}{2}x\right)+\frac{1}{2}\sin^2\left(\frac{1}{2}x\right)+\frac{1}{6}\sin\left(\frac{1}{2}x\right)\sin\left(\frac{3}{2}x\right)$$
The given answer in book is $$-\frac{1}{3}\cos x$$
I'm sure they are both equal. I don't know how to simplify my answer to the given one. Hope someone can help out.
$\frac{1}{6}\cos(\frac{1}{2}x)\cos(\frac{3}{2}x)-\frac{1}{2}\cos^2(\frac{1}{2}x)+\frac{1}{2}\sin^2(\frac{1}{2}x)+\frac{1}{6}\sin(\frac{1}{2}x)\sin(\frac{3}{2}x)$
Gosh, that's ugly.
Let's just throw rocks at it until it either falls apart or lumbers off.
First, let's replace $\frac 12 x$ with $y$.
$\frac{1}{6}\cos(y)\cos(3y)-\frac{1}{2}\cos^2(y)+\frac{1}{2}\sin^2(y)+\frac{1}{6}\sin(y)\sin(3y)$
Now we have a case if two $\cos$ multiplied together. How can we get those to a single cosine? We also have to $\sin$ multiplied together.
We know that $\cos (A \pm B) = \cos A\cos B \mp \sin A\sin B$.
And we have $\frac 16[\cos(y)\cos(3y) - \sin(y)\sin(3y)]$. So that is $\frac 16[\cos (y - 3y)] = \frac 16\cos (-2y)$.
Now we could just as easily have done $\frac 16[\cos (3y - y) ] =\frac 16 \cos 2y = \frac 16 \cos (-2y)$.
So we have:
$\frac{1}{6}\cos 2y-\frac{1}{2}\cos^2(y)+\frac{1}{2}\sin^2(y)$
Now we have $\frac 12(-\cos^2 y + \sin^2 y)$
If we had $\cos^2 y + \sin^2 y$ we could just add them together to get $1$. And we could do $-\cos^2 y + \sin^2 y = 1 - 2\cos^2 y$, but that won't really help us.
But note:
$\cos(A+B) = \cos A \cos B - \sin A \sin B$ so $\cos(A + A) = \cos A\cos A - \sin A\sin A = \cos^2 A - \sin^2 A$ which is exactly our case.
So $\frac 12(-\cos^2 y + \sin^2 y) = -\frac 12(\cos^2 y - \sin^2 y) = -\frac 12 \cos 2y$.
So we have
$\frac{1}{6}\cos 2y-\frac{1}{2}\cos(2y)= -\frac 13 \cos 2y = -\frac 13 \cos x$
====
That involved knowing our trig identities forward and backwards.
What if we only know them forward? That is what if don't have the inspiration to see that pattern?
Well, we could do brute force going forward.
$N = \frac{1}{6}\cos(\frac{1}{2}x)\cos(\frac{3}{2}x)-\frac{1}{2}\cos^2(\frac{1}{2}x)+\frac{1}{2}\sin^2(\frac{1}{2}x)+\frac{1}{6}\sin(\frac{1}{2}x)\sin(\frac{3}{2}x)$. Let $y = \frac 12 x$ so
$6N = \cos y\cos 3y - 3\cos^2 y + 3\sin^2 y + \sin y \sin 3y$
Now we know the identities forward....
$\cos 3y = \cos (y + 2y) = \cos y\cos 2y - \sin y \sin 2y$ and $\sin 3y = \sin(y + 2y) = \sin y\cos 2y + \cos y\sin 2y$.
So we have
$\cos y\cos 3y - 3\cos^2 y + 3\sin^2 y + \sin y \sin 3y=$
$\cos y(\cos y\cos 2y - \sin y \sin 2y)- 3\cos^2 y + 3\sin^2 y+\sin y( \sin y\cos 2y + \cos y\sin 2y)=$
$\cos^2 y \cos 2y - \cos y\sin y\sin 2y - 3\cos^2 y + 3\sin^2 y+ \sin^2 y\cos 2y + \cos y \sin y \sin 2y=$
$cos^2 y \cos 2y+ \sin^2 y\cos 2y- 3\cos^2 y + 3\sin^2 y- \cos y\sin y\sin 2y+ \cos y \sin y \sin 2y=$.
$(\cos^2 y + sin^2 y)\cos 2y - 3\cos^2 y + 3\sin^2 y =$
$\cos 2y - 3\cos^2 y + 3\sin^2 y$.
And we have $\cos 2y = \cos (y+y)= \cos^2 y - \sin^2 y$ so
$\cos 2y - 3\cos^2 y + 3\sin^2 y=$
$\cos^2 y - \sin^2 y- 3\cos^2 y + 3\sin^2 y=$
$-2\cos^2 y + 2\sin^2 y$.
Oh, okay, I guess we do need to know our identities backwards. But as we just did $\cos 2y = \cos^2 y - \sin^2 y$ it should still be fresh in our minds.
$-2\cos^2 y + 2\sin^2 y= -2\cos(2y)$
So we have $6N = -2\cos(2y)$ so
$N = -\frac 13 \cos x$.