Solveeit Logo

Question

Question: How do you graph \[y = \cos x + 3\]?...

How do you graph y=cosx+3y = \cos x + 3?

Explanation

Solution

We need to graph the function y=cosx+3y = \cos x + 3. On observing this function, we see that this function is of the form y=f(x)+ay = f\left( x \right) + a, where aa is a constant. To sketch the graph of such functions, we first sketch the graph of y=f(x)y = f\left( x \right). Now, since aa is added to the term, the graph of y=f(x)y = f\left( x \right) when shifted aa units upward, gives the graph of y=f(x)+ay = f\left( x \right) + a. Let us now use this procedure to sketch the graph of the given function.

Complete step by step answer:
We need to sketch the graph of the function y=cosx+3y = \cos x + 3.
Comparing y=cosx+3y = \cos x + 3 with y=f(x)+ay = f\left( x \right) + a, we get
f(x)=cosx\Rightarrow f\left( x \right) = \cos x
a=3\Rightarrow a = 3
Now, to sketch the graph of y=cosx+3y = \cos x + 3, we first sketch the graph of y=cosxy = \cos x.
Let us sketch the graph of y=cosxy = \cos x.

The above graph is for the function y=cosxy = \cos x but we need to sketch the graph of y=cosx+3y = \cos x + 3.Now, since a=3a = 3, we need to shift the graph of y=cosxy = \cos x three units upwards.Shifting the graph three units upward, we get the following graph

The graph obtained by shifting the graph of y=cosxy = \cos x three units upward is the graph of the function y=cosx+3y = \cos x + 3. Hence, the graph above is the required graph.

Note: We can also sketch the graph directly by putting the values of xx and obtaining the corresponding values of yy, then joining the points on the cartesian plane and obtaining the required graph. If we were given the function of the form y=f(x)ay = f\left( x \right) - a, where aa is a constant, then we need to shift the graph of y=f(x)y = f\left( x \right) downward by aa units.
For example: Let us assume the value of x as zero. Then, we have,
y=cos(0)+3y = \cos \left( 0 \right) + 3
We know that the value of cos(0)\cos \left( 0 \right) is 11. So, we get,
y=1+3\Rightarrow y = 1 + 3
y=4\Rightarrow y = 4

Similarly, if value of x is π\pi , we get,
y=cos(π)+3y = \cos \left( \pi \right) + 3
We know that the value of cos(π)\cos \left( \pi \right) is (1)\left( { - 1} \right). So, we get,
y=1+3\Rightarrow y = - 1 + 3
y=2\Rightarrow y = 2
For x equals (π2)\left( {\dfrac{\pi }{2}} \right), we have,
y=cos(π2)+3y = \cos \left( {\dfrac{\pi }{2}} \right) + 3
We know that the value of cos(π2)\cos \left( {\dfrac{\pi }{2}} \right) is zero. So, we get,
y=0+3\Rightarrow y = 0 + 3
y=3\Rightarrow y = 3
Hence,we plot these points on the graph and join to get the graphical representation of the given function.