# Finding the vertical shift of a sinusoidal function

I'm currently studying sinusoids, I've been given a graph with a few key points and have been told to find a cosine function which fits it. When it comes to finding the vertical shift of the graph the book does so by summing the highest y-value of the graph and the lowest y-value of the graph, so the maximum and minimum values of the cosine sinusoid, which in this case are $\frac{5}{2}$ and $-\frac{3}{2}$; it averages these values to get $\frac{1}{2}$. This gives the vertical shift, but why is this? Could someone explain this to me. Thanks.

• If we have a cosine graph with amplitude A, then its largest value will be A and its smallest value will be -A. If we shift this vertically by $s$ units, then the largest value will be $A+s$ and the smallest will be $-A+s$; so adding these together and dividing by 2 gives the value of $s$. – user84413 Sep 19 '14 at 17:23
• @user84413, write this up as an answer so I can reward you for helping me, thank you! – seeker Sep 19 '14 at 18:47
• I did as you suggested -- thanks. – user84413 Sep 19 '14 at 19:53