Graphing Functions Using Vertical and Horizontal Shifts

In the next few sections, you will begin to strengthen your ability to graph functions without the aid of a graphing tool and without having to do a lot of algebra. You will learn some basic transformations that can be done to the graphs of the toolkit functions to make more complex functions. For example, we can take the graph of the square root function f(x) = \sqrt{x}, shift it to the left or right, and determine the resulting equation. Conversely we can begin with the equation of f(x) = \sqrt{x-2} and determine what has been done to the graph of f(x) = \sqrt{x} without doing a lot of algebra.

Graphing Functions Using Vertical and Horizontal Shifts

Identifying Vertical Shifts

One simple kind of transformation involves shifting the entire graph of a function up, down, right, or left. The simplest shift is a vertical shift, moving the graph up or down, because this transformation involves adding a positive or negative constant to the function. In other words, we add the same constant to the output value of the function regardless of the input. For a function g(x)=f(x)+k, the function f(x) is shifted vertically k units. See Figure 2 for an example.


Figure 2 Vertical shift by k=1 of the cube root function f(x)=\sqrt[3]{x}.


To help you visualize the concept of a vertical shift, consider that y=f(x). Therefore, f(x)+k is equivalent to y+k. Every unit of y is replaced by y+k, so the y-value increases or decreases depending on the value of k. The result is a shift upward or downward.


VERTICAL SHIFT

Given a function f(x), a new function g(x)=f(x)+k, where k is a constant, is a vertical shift of the function f(x). All the output values change by k units. If k is positive, the graph will shift up. If k is negative, the graph will shift down.


EXAMPLE 1

Adding a Constant to a Function

To regulate temperature in a green building, airflow vents near the roof open and close throughout the day. Figure 3 shows the area of open vents V (in square feet) throughout the day in hours after midnight, t. During the summer, the facilities manager decides to try to better regulate temperature by increasing the amount of open vents by 20 square feet throughout the day and night. Sketch a graph of this new function.


Figure 3


Solution

We can sketch a graph of this new function by adding 20 to each of the output values of the original function. This will have the effect of shifting the graph vertically up, as shown in Figure 4.


Figure 4


Notice that in Figure 4 , for each input value, the output value has increased by 20 , so if we call the new function S(t), we could write

S(t)=V(t)+20

This notation tells us that, for any value of t, S(t) can be found by evaluating the function V at the same input and then adding 20 to the result. This defines S as a transformation of the function V, in this case a vertical shift up 20 units. Notice that, with a vertical shift, the input values stay the same and only the output values change. See Table 1.

t 0 8 10 17 19 24
V(t) 0 0 220 220 0 0
S(t) 20 20 240 240 20 20

Table 1


HOW TO

Given a tabular function, create a new row to represent a vertical shift.

  1. Identify the output row or column.
  2. Determine the magnitude of the shift.
  3. Add the shift to the value in each output cell. Add a positive value for up or a negative value for down.


EXAMPLE 2

Shifting a Tabular Function Vertically

A function f(x) is given in Table 2. Create a table for the function g(x)=f(x)-3.

x 2 4 6 8
f(x) 1 3 7 11
Table 2


Solution

The formula g(x)=f(x)-3 tells us that we can find the output values of g by subtracting 3 from the output values of f. For example:

Subtracting 3 from each f(x) value, we can complete a table of values for g(x) as shown in Table 3 .


\begin{array}{rlr}
f(2) & =1 & \text { Given } \\
g(x) & =f(x)-3  & \text { Given transformation } \\
g(2) & =f(2)-3 & \\
& =1-3 & \\
& =-2 &
\end{array}

x 2 4 6 8
f(x) 1 3 7 11
g(x) −2 0 4 8

Table 3


Analysis

As with the earlier vertical shift, notice the input values stay the same and only the output values change.


TRY IT #1

The function h(t)=-4.9 t^{2}+30 t gives the height h of a ball (in meters) thrown upward from the ground after t seconds. Suppose the ball was instead thrown from the top of a 10-m building. Relate this new height function b(t) to h(t), and then find a formula for b(t).