# Finding the Equation of a Trig Graph via both Sine and Cosine

Say I'm given a trig graph such as,

I've found the graph using the sine function, but my teacher also wants me to list the graph for the cosine function. I don't understand how. Wolfram shows this as $y = -3\cos(2x) - 1$, but I don't understand how they arrived at that.

Can someone explain how they arrived at that and how to get the equation of the graph using cosine? Sine is pretty apparent, but cosine is not.

• $\sin(2x+3\pi/2)=\sin(2x)\cos(3\pi/2)+\cos(2x)\sin(3\pi/2)$. – mathlove Mar 3 '15 at 23:07
• I haven't learnt the addition formulas yet in my precalc class. – user164403 Mar 3 '15 at 23:08
• Do you know $\sin(\theta+\pi/2)=\cos\theta,\cos(\theta+\pi/2)=-\sin\theta$? – mathlove Mar 3 '15 at 23:12
• Hmm, I don't. Isn't this the sine addition formula? Nevermind, is this more so the property of sine/cos compliment? – user164403 Mar 3 '15 at 23:14

Consider the sinusoidal graph shown below.

We wish to express its equation in the form

$$y = A\cos(Bx - C) + D$$

where $|A|$ is the amplitude, $\dfrac{2\pi}{|B|}$ is the period, $C$ is the phase shift, and $D$ is the vertical shift.

The function has a maximum value of $2$ at $$x = \frac{\pi}{2} + n\pi, n \in \mathbb{Z}$$ and a minimum value of $-4$ at $$x = n\pi, n \in \mathbb{Z}$$ Its amplitude is $$|A| = \frac{1}{2}[2 - (-4)] = \frac{1}{2} \cdot 6 = 3$$ Its period is the distance between adjacent minima, which is $\pi$. Thus, \begin{align*} \pi & = \frac{2\pi}{|B|}\\ |B|\pi & = 2\pi\\ |B| & = 2 \end{align*}

Since the average of the maximum and minimum values is $$\frac{2 + (-4)}{2} = \frac{-2}{2} = -1$$ the graph has a vertical shift $D = -1$.

The cosine function attains its maximum value at $x = 0$. Since this graph has a minimum value at $x = 0$, it is inverted, which means we can either shift the graph by half a period or multiply the amplitude by $-1$. If we do the latter, we obtain the equation $$y = -3\cos(2x) - 1$$