write an equation of a cosine function in the form $y = acos(bx + c)+d$ for the following graph.

write an equation of a cosine function in the form $y = acos(bx + c)+d$ for the following graph.
Answer
Explanation:
Step1: Find the amplitude A
The amplitude is half the distance between the maximum and minimum values. The maximum value is 2 and the minimum is - 2. So $A=\frac{2 - (-2)}{2}=\frac{4}{2}=2$.
Step2: Find the vertical shift D
The vertical shift is the mid - value between the maximum and minimum. $D=\frac{2+( - 2)}{2}=0$.
Step3: Find the period P and B
The period is the distance between two consecutive peaks or troughs. From the graph, the period $P=\pi$. Since $P=\frac{2\pi}{|B|}$ and $P = \pi$, then $\pi=\frac{2\pi}{|B|}$, solving for $B$ gives $|B| = 2$. Let's assume $B = 2$ (we can choose the positive value for simplicity in the basic form).
Step4: Find the phase shift C
The cosine function $y = A\cos(Bx + C)+D$ has a standard cosine function $y=\cos x$ which has a maximum at $x = 0$. Our function has a maximum at $x=-\frac{\pi}{4}$. For $y=\cos(Bx + C)$, when $Bx + C = 0$ gives the maximum. Substituting $x =-\frac{\pi}{4}$ and $B = 2$ into $Bx + C=0$, we get $2\times(-\frac{\pi}{4})+C = 0$, which simplifies to $C=\frac{\pi}{2}$.
Answer:
$y = 2\cos(2x+\frac{\pi}{2})$