# Prove $d^2=x^2+y^2$ using trig identities

I have this question, and im am very stumpted, ive been googling and writing it down over and over and cant seem to find the right way to go about it.

"On a fun park ride the position of the carriage at time t >= 0 (in minutes) is given by the parametric function:

$$x=4\cos(5πt)+(10+2\cos(4πt))\cos(πt)$$

$$y=[4\sin(5πt)+(10+2\cos(4πt))\sin(πt)$$

Where both x and y are measured from the axis of rotation and are given in metres

Show the squared distance from the axis of rotation, i.e. $$d^2=x^2+y^2$$, can be rewritten as:

$$d^2=20\cos^2(4πt) +120\cos(4πt)+116$$

I know what my trig identities are, I know I should use my compound identities. The way I've been attempting it is doing x+y and then expanding and trying to simplify to get a d=x+y, then square that to get d^2. When I did that I got:

$$d=\sqrt{32}\cos(5πt+1/4π)+\sqrt{200}\cos(πt+1/4π)+\cos(4πt)\sqrt{8}\cos(πt+1/4π$$), so I'm clearly missing something big here, any help would be great, thank you

\begin{align} d^2 &=x^2+y^2 \\ & =(4\cos5πt+(10+2\cos4πt)\cosπt)^2+ (4\sin5πt+(10+2\cos4πt)\sinπt)^2 \\ & =16\cos^25πt+8(10+2\cos4πt)\cosπt\cos5πt + (10+2\cos4πt)^2\cos^2πt \\ & \hspace{0.3cm}+16\sin^25πt+8(10+2\cos4πt)\sinπt\sin5πt + (10+2\cos4πt)^2\sin^2πt \\ & =16(\cos^25πt+\sin^25πt) +8(10+2\cos4πt)(\cosπt\cos5πt+\sin πt\sin5πt)\\ &\hspace{1cm}+ (10+2\cos4πt)^2(\cos^2πt+\sin^2πt) \\ & =16 +8(10+2\cos4πt)\cos(5πt-πt)+(10+2\cos4πt)^2 \\ & =16 +80\cos4πt+16\cos^24πt +100 + 40\cos4πt+ 4\cos^24πt\\ & =20\cos^24πt +120\cos4πt+116\\ \end{align}