Free AP Precalculus Polynomial and Rational Functions

AP Precalculus · Polynomial and Rational Functions · free lesson

Transformations of Functions

The idea, then worked examples solved step by step, then practice questions whose numbers change every time you try them.

The idea

New functions from old ones

Many functions on the AP exam are built from a simpler one. If you know the graph of ff, a constant added or multiplied in the right place gives a new function gg whose graph is the graph of ff moved, stretched or flipped. The graph of ff is called the preimage and the graph of gg the image.

There are only two places to put a constant. A constant put outside ff, as in f(x)+3f(x) + 3 or 2f(x)2f(x), changes the output values, so it acts up and down. A constant put inside, as in f(x−2)f(x - 2) or f(2x)f(2x), changes the input values, so it acts left and right, and it acts the opposite way to what it seems to say.

Additive transformations: translations

Take f(x)=x3−3xf(x) = x^3 - 3x. Its graph has a relative maximum and a relative minimum, which make good points to follow. Let g(x)=f(x−2)+1g(x) = f(x - 2) + 1:

Point of ff(x,f(x))(x, f(x))Matching point of gg(x,g(x))(x, g(x))
relative maximum(−1,2)({-1}, {2})relative maximum(1,3)({1}, {3})
relative minimum(1,−2)({1}, {-2})relative minimum(3,−1)({3}, {-1})

The value g(1)g(1) is f(−1)+1f(-1) + 1: the input of gg must be 2 more than the input of ff to reach the same height. So every point of ff appears on gg two units to the right and one unit up. Click the picture to watch both graphs drawn.

Rule.

g(x)=f(x)+kg(x) = f(x) + k is a vertical translation of the graph of ff by kk units: up when k>0k > 0, down when k<0k < 0.

g(x)=f(x+h)g(x) = f(x + h) is a horizontal translation of the graph of ff by −h-h units: f(x−2)f(x - 2) moves the graph 2 units right, f(x+2)f(x + 2) moves it 2 units left.

Multiplicative transformations: dilations and reflections

g(x)=a⋅f(x)g(x) = a \cdot f(x) multiplies every output value by aa. It is a vertical dilation by a factor of ∣a∣\lvert a \rvert; when a<0a < 0 the graph is also reflected over the xx-axis. Zeros of ff stay where they are, because a⋅0=0a \cdot 0 = 0.

g(x)=f(bx)g(x) = f(bx) multiplies the input by bb, so gg reaches each value of ff at an input bb times smaller. It is a horizontal dilation by a factor of 1∣b∣\frac{1}{\lvert b \rvert}; when b<0b < 0 the graph is also reflected over the yy-axis. The yy-intercept stays where it is, because b⋅0=0b \cdot 0 = 0.

In the picture f(x)=x3−3xf(x) = x^3 - 3x has a zero at x=3≈1.732x = \sqrt{3} \approx {1.732}. On y=2f(x)y = 2f(x) the zero is still there and the relative maximum doubles to (−1,4)({-1}, {4}). On y=f(2x)y = f(2x) the zero moves in to 0.866{0.866} and the relative maximum to (−12,2)({-\frac{1}{2}}, {2}): half as wide, just as tall.

All four together

A function of the form g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k combines all four: a horizontal dilation by 1∣b∣\frac{1}{\lvert b \rvert}, a vertical dilation by ∣a∣\lvert a \rvert, reflections for negative aa or bb, a horizontal translation by hh and a vertical translation by kk. Drag the sliders and watch the relative maximum of ff (the dot) travel.

To follow one point, undo the inside and do the outside. A point (p,q)(p, q) on the graph of ff goes to

(x,y)=(h+pb,  aq+k)\begin{aligned} (x, y) &= \left(h + \frac{p}{b}, \; a q + k\right) \end{aligned}

because gg reaches the input pp of ff when b(x−h)=pb(x - h) = p, and then multiplies the output qq by aa and adds kk.

The inside written another way

The exam often writes the inside as f(bx+c)f(bx + c). Factor out bb before you read the shift. For g(x)=f(2x−6)g(x) = f(2x - 6):

2x−6=2(x−3)2x - 6 = 2(x - {3}), so g(x)=f(2(x−3))g(x) = f(2(x - {3})): a horizontal dilation by 12\frac{1}{2} and a translation of 33 units right, not 6. A quick test: the input 0 of ff is reached when 2x−6=02x - 6 = 0, at x=3x = 3.

Domain and range

Inside constants change the domain; outside constants change the range. Suppose ff has domain −2≤x≤4-2 \le x \le 4 and range −1≤y≤3-1 \le y \le 3, and g(x)=−2f(x−1)+5g(x) = -2f(x - 1) + 5.

The inputs move right 1: the domain of gg is −1≤x≤5{-1} \le x \le {5}. The outputs are multiplied by −2-2 and raised by 5. The lowest output of ff, −1-1, becomes −2(−1)+5=7-2(-1) + 5 = {7}, and the highest, 3, becomes −2(3)+5=−1-2(3) + 5 = {-1}. The reflection turns the range over: it is −1≤y≤7{-1} \le y \le {7}.

Warning.

The slips the exam is built on: moving f(x−h)f(x - h) to the left; giving the horizontal dilation of f(bx)f(bx) as bb instead of 1b\frac{1}{b}; reading the shift of f(bx+c)f(bx + c) as cc instead of cb\frac{c}{b}; reflecting over the wrong axis; and, for a<0a < 0, writing the new range with its ends in the wrong order.

Note.

On the AP exam, describe each change with its kind, its direction and its size, in an order that works: "a vertical dilation by a factor of 3, then a vertical translation of 2 units down". For 3f(x)−23f(x) - 2 that order matters: translating first and then dilating would give 3(f(x)−2)=3f(x)−63(f(x) - 2) = 3f(x) - 6.

Worked examples

Worked examples

Each example is one kind of question the AP exam asks about transformations. Every number in the working is found by the engine.

Example.

1. From words to a formula. Let f(x)=x2−4x+1f(x) = x^2 - 4x + 1. The graph of gg is made from the graph of ff by a vertical dilation by a factor of 3, a reflection over the xx-axis, and then a translation of 2 units left and 5 units up. Write g(x)g(x), and find where the vertex of ff goes.

The dilation and the reflection multiply the outputs by −3-3; the move up adds 5 outside; the move left is x+2x + 2 inside:

g(x)=−3f(x+2)+5=−3((x+2)2−4(x+2)+1)+5=−3x2+14\begin{aligned} g(x) &= -3 f(x + 2) + 5 = -3\left((x + 2)^2 - 4(x + 2) + 1\right) + 5 = {-3x^{2} + 14} \end{aligned}

The vertex of ff is at x=2x = 2, where f(2)=−3f(2) = -3. Its image is 2 units left, at x=0x = 0, with height −3(−3)+5-3({-3}) + 5:

g(0)=−3f(2)+5=14\begin{aligned} g(0) &= -3 f(2) + 5 = {14} \end{aligned}

So the vertex (2,−3)(2, {-3}) goes to (0,14)(0, {14}). The order matters: the dilation and reflection come before the move up, so the 5 is added after multiplying by −3-3.

Example.

2. From a formula to words. Describe how the graph of g(x)=2f(3x−6)−1g(x) = 2f(3x - 6) - 1 is made from the graph of ff. If (4,−3)(4, -3) is on the graph of ff, which point is on the graph of gg?

Factor the inside first: 3x−6=3(x−2)3x - 6 = 3(x - {2}), so g(x)=2f(3(x−2))−1g(x) = 2f(3(x - {2})) - 1. Read it from the inside out:

  • a horizontal dilation by a factor of 13\frac{1}{3} (the factor 3 inside),
  • a horizontal translation of 22 units right,
  • a vertical dilation by a factor of 2,
  • a vertical translation of 1 unit down.

For the point: gg uses the input 4 of ff when 3x−6=43x - 6 = 4, and its output is 2(−3)−12(-3) - 1:

3x−6=4x=103y=2×(−3)−1=−7\begin{aligned} 3x - 6 &= 4 \\ x &= \frac{10}{3} \\ y &= 2 \times (-3) - 1 \\ &= -7 \end{aligned}

The point is (103,−7)\left({\frac{10}{3}}, {-7}\right). A common slip is 4+6=104 + 6 = 10 or 4+2=64 + 2 = 6 for the first coordinate: the input must be divided by 3 as well as moved.

Example.

3. The constants from two graphs. The graph of ff is the broken line in gray. The graph of g(x)=a⋅f(x−h)+kg(x) = a \cdot f(x - h) + k is in red. Find aa, hh and kk.

The two zeros of ff at x=−2x = {-2} and x=2x = {2} are 44 apart, and the matching points of gg, at x=1x = {1} and x=5x = {5}, are also 44 apart: there is no horizontal dilation. The peak moves from x=0x = {0} to x=3x = {3}:

h=3−0=3\begin{aligned} h &= {3} - {0} = {3} \end{aligned}

Heights: on ff the peak is 22 above the point to its left; on gg it is 44 above. That ratio is aa. Then kk comes from the left end point, g(1)=a⋅f(−2)+kg({1}) = a \cdot f({-2}) + k:

a=3−(−1)2−0=2k=−1−2(0)=−1\begin{aligned} a &= \frac{ {3} - ({-1}) }{ {2} - {0} } = {2} \\ k &= {-1} - {2}({0}) = {-1} \end{aligned}

So g(x)=2f(x−3)−1g(x) = {2}f(x - {3}) - {1}. Check one more point: f(3)=−1f(3) = {-1}, so g(6)=2(−1)+(−1)=−3g(6) = {2}({-1}) + ({-1}) = {-3}, which is the last red point, (6,−3)({6}, {-3}).

Example.

4. Values from a table. Some values of ff are given. Let g(x)=3f(x+2)−1g(x) = 3f(x + 2) - 1 and p(x)=f(2x)p(x) = f(2x). Find g(0)g(0), g(1)g(1) and p(1)p(1).

xx−1-10011223344
f(x)f(x)5522−1-14400−3-3

Work out the input of ff first, then read the table, then do the outside:

g(0)=3f(0+2)−1=3(4)−1=11g(1)=3f(1+2)−1=3(0)−1=−1p(1)=f(2⋅1)=f(2)=4\begin{aligned} g(0) &= 3 f(0 + 2) - 1 = 3({4}) - 1 = {11} \\ g(1) &= 3 f(1 + 2) - 1 = 3({0}) - 1 = {-1} \\ p(1) &= f(2 \cdot 1) = f(2) = {4} \end{aligned}

The usual slip is to read ff at the input of gg itself: 3f(0)−1=53f(0) - 1 = {5} is not g(0)g(0).

Example.

5. Domain and range. The function ff has domain 0≤x≤80 \le x \le 8 and range −2≤y≤6-2 \le y \le 6. Find the domain and the range of g(x)=−3f(x2)+1g(x) = -3f\left(\frac{x}{2}\right) + 1.

Domain: g(x)g(x) is defined when the input x2\frac{x}{2} is in the domain of ff:

0≤x2≤80 \le \frac{x}{2} \le 8 gives 0≤x≤16{0} \le x \le {16}. So the domain is 0≤x≤16{0} \le x \le {16} (a horizontal dilation by a factor of 2). Range: each output yy of ff becomes −3y+1-3y + 1. The ends of the range give

−3(−2)+1=7−3(6)+1=−17\begin{aligned} -3(-2) + 1 &= 7 \\ -3(6) + 1 &= -17 \end{aligned}

The negative factor turns the range over: it is −17≤y≤7{-17} \le y \le {7}. Writing 7≤y≤−17{7} \le y \le {-17} describes no numbers at all, and forgetting the reflection gives the wrong interval −5≤y≤19{-5} \le y \le {19}.

Example.

6. A model from a parent function. A fountain's jet leaves its nozzle 2 feet above the ground, reaches its greatest height of 8 feet at a horizontal distance of 3 feet from the nozzle, and comes down. Model the height of the jet by a transformation of f(x)=x2f(x) = x^{2}, where xx is the horizontal distance in feet, and find where it lands.

The vertex of ff is (0,0)(0, 0); the jet's highest point is (3,8)(3, 8). A translation 3 right and 8 up, with a vertical dilation by aa, gives g(x)=a(x−3)2+8g(x) = a(x - 3)^{2} + 8. The nozzle gives the condition g(0)=2g(0) = 2:

a(0−3)2+8=2a=−23\begin{aligned} a(0 - 3)^{2} + 8 &= 2 \\ a &= -\frac{2}{3} \end{aligned}

So g(x)=−23(x−3)2+8g(x) = {-\frac{2}{3}}(x - 3)^2 + 8; the negative aa reflects the parabola so that it opens down. The jet lands where g(x)=0g(x) = 0 with x>3x > 3:

x=3+23≈6.464x = 3 + 2\sqrt{3} \approx {6.464} feet from the nozzle. The model applies only for 0≤x≤6.4640 \le x \le {6.464}: before the nozzle there is no jet, and after landing the water does not go below the ground.

Practice

Answer AP-style questions on transformations of functions. Each answer is checked, with the full solution, and every try brings new numbers. Practice needs a free account: it keeps your progress.

Practise transformations of functions with new numbers