500,393 views
11 votes
11 votes
Writing the equation of a sine or cosine function given its graph:

Writing the equation of a sine or cosine function given its graph:-example-1
User Joe Tyman
by
2.7k points

1 Answer

27 votes
27 votes

A generic graph would be


A\cos \mleft((2\pi x)/(p)+\varphi\mright)+D

Where:

A = amplitude

p = period

φ = phase

D = middle line

First let's evaluate the period of the function, see that x = -1/4 we have y = 5, it will have again at x = 3/4.

The period is


\begin{gathered} p=(3)/(4)+(1)/(4) \\ \\ p=(4)/(4)=1 \end{gathered}

Let's put it in our function already


\begin{gathered} A\cos \mleft((2\pi x)/(p)+\varphi\mright)+D \\ \\ A\cos (2\pi x+\varphi)+D \end{gathered}

To find out the amplitude, we take the max value, the minimum value (all in modulus) and take the average, the max value here is 5 and the minimum -3 (in modulus it's 3), the average is


A=(5+3)/(2)=(8)/(2)=4

Therefore


4\cos (2\pi x+\varphi)+D

And the D value will be the average too, of the maximum two, but here we don't use the modulus on negative values, therefore


D=(5-3)/(2)=(2)/(2)=1

Hence.


4\cos (2\pi x+\varphi)+1

We know that when x = 0 we have y = 1, then


\begin{gathered} y=4\cos (2\pi x+\varphi)+1 \\ \\ 1=4\cos (2\pi\cdot0+\varphi)+1 \\ \\ 4\cos (\varphi)=0 \\ \\ \cos (\varphi)=0 \end{gathered}

When cos(φ) = 0? when φ = π/2 for example. Of course, there are other solutions but we just need one. Now we have all the parameters of our cosine


4\cos \mleft(2\pi x+(\pi)/(2)\mright)+1

The final answer is:


4\cos \mleft(2\pi x+(\pi)/(2)\mright)+1

User Mark Hatton
by
2.8k points