AP · Precalculus · Transformations and Function Models

Choosing and Building Function Models

15 min readUpdated November 30, 2026FreeAP Precalculus, Polynomial and Rational Functions

To model a situation, you choose the function type whose features match it, build the function from given points or by regression, and use it only where its assumptions hold. Linear models have a constant rate of change, quadratics one maximum or minimum, higher-degree polynomials several turning points, rational models an asymptote, and piecewise models a change of rule. Every prediction needs units, and a prediction far outside the data is unreliable.

Quick check

  1. Find the average rate of change of f(x)=x2f(x) = x^2 from x=1x = 1 to x=4x = 4.Show answerHide answer

    55. The change in output is 16−1=1516 - 1 = 15 over a change in input of 33, and 153=5\dfrac{15}{3} = 5.

  2. Outputs at equally spaced inputs are 10,7,4,110, 7, 4, 1. Which kind of function fits them exactly?Show answerHide answer

    A linear function. The outputs fall by 33 at every step, so the rate of change is constant.

Know these already? Jump to the practice questions

What you'll be able to do

  • Choose a linear, quadratic, polynomial, rational or piecewise model from the features of a situation or a table of data.
  • State the assumptions behind a model and the domain on which it makes sense in context.
  • Write a model from given points, or fit one by regression on a graphing calculator.
  • Use a model to predict a value, with units.
  • Explain when a prediction from a model is unreliable.

Key terms

Contextual domain

The input values for which a model makes sense in its situation, often fewer than the function's full domain.

In plain English
The inputs that are physically or practically possible.
Don't write
"all real numbers" for a model of time, length or a count.

Regression

Fitting a chosen type of function as closely as possible to a data set, usually on a graphing calculator.

In plain English
The calculator finds the best curve of the type you picked.
Don't write
That the regression model passes through every data point.

Which function type fits the situation or data?

Match the features you see to the function that has them:

Feature in the situation or dataModel
Equal changes in output over equal input stepsLinear
Equal second differences; one turning pointQuadratic
Several changes of directionPolynomial of higher degree
Levels off toward a value, or a quantity shared out as kx\dfrac{k}{x}Rational
Different rules on different input intervals, such as price tiersPiecewise

With equally spaced inputs, use differences. For outputs 2,5,12,23,382, 5, 12, 23, 38, the first differences are 3,7,11,153, 7, 11, 15 and the second differences are 4,4,44, 4, 4. Constant second differences mean a quadratic model fits exactly. Measured data give roughly constant differences, which still point to the type.

Descriptions count too: "a fixed fee, then a charge per hour" is piecewise linear, and "the more people share the job, the less each does" is rational.

Key idea

Choose the model from a feature you can name: a constant rate, one turning point, several turning points, an asymptote, or a change of rule.

Check yourself

Outputs at equally spaced inputs are 7,4,3,4,77, 4, 3, 4, 7. Which model fits?
Show answerHide answer

Quadratic. The first differences are −3,−1,1,3-3, -1, 1, 3, and the second differences are all 22.

What assumptions and domain does a model need?

State the assumptions behind a model: a linear model assumes a constant rate of change, a falling-object model usually ignores air resistance, and a cost model assumes fixed prices.

The contextual domain comes from the situation. A tank holding 500500 liters that drains at 2020 liters per minute has volume V(t)=500−20tV(t) = 500 - 20t liters. Time cannot be negative, and the tank is empty when 500−20t=0500 - 20t = 0, at t=25t = 25. So the model makes sense for 0≤t≤250 \le t \le 25 minutes, even though the rule works for any tt.

For a count, such as tickets sold, round predictions to whole numbers.

Examiner's eye

Marks are lost when a domain or prediction has no units or ignores the context. State the units and the endpoint that the situation forces.

Check yourself

A candle 2424 cm tall burns down at 1.51.5 cm per hour. Write the contextual domain of L(t)=24−1.5tL(t) = 24 - 1.5t.
Show answerHide answer

0≤t≤160 \le t \le 16 hours. The candle is gone when 24−1.5t=024 - 1.5t = 0, which is at t=16t = 16.

How do you build a model from points or by regression?

When the points are exact, build the model algebraically (Learn this):

  • Linear through two points: slope m=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1}, then y=y1+m(x−x1)y = y_1 + m(x - x_1).
  • Quadratic with a known vertex (h,k)(h, k): y=a(x−h)2+ky = a(x - h)^2 + k, then use one more point to find aa.
  • Rational of the form y=kxy = \dfrac{k}{x}: one point gives kk.

For example, a quadratic with vertex (4,20)(4, 20) through (0,4)(0, 4) needs 4=a(0−4)2+204 = a(0 - 4)^2 + 20, so 16a=−1616a = -16 and a=−1a = -1. The model is y=−(x−4)2+20y = -(x - 4)^2 + 20.

For measured data that do not fit exactly, choose the type from the features, then fit it by regression on a graphing calculator. Write the model you are fitting, such as y=ax2+bx+cy = ax^2 + bx + c, and report the coefficients to three decimal places, but predict with the unrounded stored values.

Check yourself

A model y=kxy = \dfrac{k}{x} passes through (5,24)(5, 24). Find kk.
Show answerHide answer

k=120k = 120. Substituting gives 24=k524 = \dfrac{k}{5}, so k=5×24=120k = 5 \times 24 = 120.

When is a prediction reliable?

A prediction is most trustworthy for an input inside the range of the data (interpolation), where the model's assumptions still hold. Extrapolation, predicting outside that range, is risky because the data cannot show the pattern continuing.

Signs that a prediction is unreliable:

  • The input is far outside the data, especially for a polynomial, whose end behavior grows without bound.
  • The output is impossible in context, such as a negative length or a count that is not a whole number.
  • An assumption fails there, such as a constant rate lasting forever.

Check yourself

A model for the depth of water in a draining tank gives −3-3 cm at t=40t = 40 minutes. What does this tell you?
Show answerHide answer

The tank is already empty before t=40t = 40, so 4040 is outside the contextual domain and the prediction is meaningless.

Worked example 1: A quadratic model from a table

Question: A ball's height hh (meters) at time tt (seconds) is recorded in the table. (a) Justify that a quadratic model fits. (b) Write the model. (c) Find the contextual domain, to three decimal places.

tt (s)0011223344
hh (m)2217172222171722

What tells you the method

Equally spaced inputs mean you test differences; the symmetry about t=2t = 2 shows the vertex.

  1. Step 1: Test the differences.

    First differences: 15,5,−5,−1515, 5, -5, -15. Second differences: −10,−10,−10-10, -10, -10.

    Why

    Constant second differences are the feature of a quadratic.

  2. Step 2: Use the vertex.

    The maximum is (2,22)(2, 22), so h=a(t−2)2+22h = a(t - 2)^2 + 22. At t=0t = 0: 4a+22=24a + 22 = 2, so a=−5a = -5.

    Why

    Vertex form needs only one more point to fix aa.

  3. Step 3: Find where the ball lands.

    −5(t−2)2+22=0-5(t - 2)^2 + 22 = 0 gives (t−2)2=4.4(t - 2)^2 = 4.4, so t=2+4.4≈4.098t = 2 + \sqrt{4.4} \approx 4.098.

    Why

    The model stops at the ground; the other root is negative, before the throw.

Check it

h(3)=−5(1)2+22=17h(3) = -5(1)^2 + 22 = 17, which matches the table.

Answer

(a) The second differences are all −10-10. (b) h(t)=−5(t−2)2+22h(t) = -5(t - 2)^2 + 22. (c) 0≤t≤4.0980 \le t \le 4.098 seconds.

Worked example 2: A piecewise model

Question: A parking garage charges $3 for up to 11 hour, then $2.50 per hour after the first hour, charged by the minute, for stays up to 1010 hours. (a) Write a piecewise model C(t)C(t) for the cost in dollars after tt hours. (b) Find the cost of a 4.54.5-hour stay. (c) For how long can you park for $18?

What tells you the method

The rule changes at t=1t = 1 hour, so the model is piecewise.

  1. Step 1: Write each piece.

    C(t)=3C(t) = 3 for 0<t≤10 < t \le 1, and C(t)=3+2.5(t−1)C(t) = 3 + 2.5(t - 1) for 1<t≤101 < t \le 10.

    Why

    After the first hour you pay the $3 plus $2.50 for each hour beyond 11.

  2. Step 2: Evaluate.

    4.5>14.5 > 1, so C(4.5)=3+2.5(3.5)=11.75C(4.5) = 3 + 2.5(3.5) = 11.75.

    Why

    You use the piece whose interval contains the input.

  3. Step 3: Solve for the time.

    3+2.5(t−1)=183 + 2.5(t - 1) = 18 gives t−1=6t - 1 = 6, so t=7t = 7.

    Why

    $18 is more than $3, so the second piece applies.

Check it

C(7)=3+2.5(6)=18C(7) = 3 + 2.5(6) = 18, and 77 is inside 1<t≤101 < t \le 10.

Answer

(a) C(t)=3C(t) = 3 for 0<t≤10 < t \le 1, and C(t)=3+2.5(t−1)C(t) = 3 + 2.5(t - 1) for 1<t≤101 < t \le 10. (b) C(4.5)=11.75C(4.5) = 11.75 dollars. (c) 77 hours.

Worked example 3: A regression model and its limits

Question: A test car's fuel economy is measured at five speeds (hypothetical data).

Speed ss (mph)30304040505060607070
Economy EE (miles per gallon)24.124.128.328.329.829.828.028.023.923.9

(a) Fit a quadratic regression model, giving coefficients to three decimal places. (b) Predict the economy at 5858 mph. (c) The model gives E(100)≈−6.223E(100) \approx -6.223. Explain why this prediction is unreliable.

What tells you the method

The data rise to one maximum and fall, so a quadratic is the type to fit.

  1. Step 1: Fit the model.

    Fitting E=as2+bs+cE = as^2 + bs + c on a graphing calculator gives a≈−0.014a \approx -0.014, b≈1.414b \approx 1.414, c≈−5.523c \approx -5.523.

    Why

    You state the model before giving calculator values.

  2. Step 2: Predict.

    Using the stored coefficients, E(58)≈28.697E(58) \approx 28.697 miles per gallon.

    Why

    Rounded coefficients lose accuracy once aa is multiplied by 582=336458^2 = 3364.

  3. Step 3: Judge the extrapolation.

    100100 mph is far beyond the data, and a negative economy is impossible.

    Why

    A quadratic's end behavior keeps decreasing, but real fuel economy cannot go below 00.

Check it

28.69728.697 lies between 29.829.8 and 28.028.0, the outputs at 5050 and 6060 mph.

Answer

(a) E≈−0.014s2+1.414s−5.523E \approx -0.014s^2 + 1.414s - 5.523, so a=−0.014a = -0.014, b=1.414b = 1.414 and c=−5.523c = -5.523. (b) E(58)≈28.697E(58) \approx 28.697 miles per gallon. (c) It is an extrapolation far outside 3030 to 7070 mph, and it gives an impossible negative value.

Your turn

Question: A candle is 3030 cm tall after burning for 22 hours and 2222 cm tall after 66 hours. Assume it burns at a constant rate. Write a linear model L(t)L(t) for its height in cm after tt hours, and find when it burns out.

  1. Step 1:

    The rate is 22−306−2=−2\dfrac{22 - 30}{6 - 2} = -2 cm per hour.

  2. Step 2:

    Use L(t)=30+(−2)(t−2)L(t) = 30 + (-2)(t - 2). Simplify it, then solve L(t)=0L(t) = 0.

Show the full solutionHide the solution

L(t)=30−2t+4=34−2tL(t) = 30 - 2t + 4 = 34 - 2t. Setting 34−2t=034 - 2t = 0 gives t=17t = 17, so the contextual domain is 0≤t≤170 \le t \le 17 hours.

Answer: L(t)=34−2tL(t) = 34 - 2t, and the candle burns out after 1717 hours.

Traps

Trap

Rounded regression coefficients give the same prediction as the full ones.

It seems right because each coefficient changes by less than 0.0010.001. But that change is multiplied by the input or its square: in Worked example 3, rounding moves E(58)E(58) from 28.69728.697 to 29.39329.393.

Check yourself

Which value of E(58)E(58) should you report in Worked example 3?
Show answerHide answer

28.69728.697 miles per gallon, from the unrounded coefficients.

Trap

A model that fits the data well gives good predictions for any input.

It seems right because the curve passes close to every point. But the data say nothing about inputs far outside their range, and the context may make the output impossible there.

Check yourself

A model built from data with 0≤x≤100 \le x \le 10 predicts at x=7x = 7 and at x=25x = 25. Which prediction is more reliable?
Show answerHide answer

The one at x=7x = 7, because it is an interpolation inside the data; x=25x = 25 is an extrapolation.

What's examined

Modeling belongs to Unit 1, Polynomial and Rational Functions, on the AP® Precalculus exam, and can appear in multiple choice or free response. Regression needs a graphing calculator; building a model from exact points is done by hand. Expect "Identify" (the model type), "Write an expression" (the model), "Interpret" (a value with units), "Justify" (citing differences or a feature) and "Explain" (whether a prediction is reliable).

Practice questions

  1. Recall For inputs 1,2,3,4,51, 2, 3, 4, 5, the outputs are 1,5,11,19,291, 5, 11, 19, 29. Which type of function models the data exactly?
  • A) Linear
  • B) Quadratic
  • C) Rational
  • D) Piecewise constant
Show answer

Answer: B) Quadratic.

Marking points:

  • First differences 4,6,8,104, 6, 8, 10; second differences 2,2,22, 2, 2, which are constant.
  • A needs constant first differences; C would level off toward an asymptote; D would repeat outputs in blocks.
  1. Recall Which situation is best modeled by a rational function?
  • A) Distance covered in tt hours at a constant 5555 miles per hour
  • B) Height of a ball tt seconds after it is thrown upward
  • C) A phone bill with a flat fee up to a data limit, then a charge per gigabyte
  • D) Hours each person works when a 120120-hour job is split equally among nn people
Show answer

Answer: D) The hours per person, 120n\dfrac{120}{n}.

Marking points:

  • H(n)=120nH(n) = \dfrac{120}{n} is a rational function: one polynomial divided by another.
  • A is linear, B is quadratic and C is piecewise.
  1. Apply A quadratic model has its maximum at (3,50)(3, 50) and passes through (0,32)(0, 32). Write the model.
Show answer

Answer: y=−2(x−3)2+50y = -2(x - 3)^2 + 50.

Marking points:

  • Vertex form: y=a(x−3)2+50y = a(x - 3)^2 + 50.
  • 32=9a+5032 = 9a + 50, so a=−2a = -2.
  1. Apply A shipping company charges $8 for a package of up to 22 pounds, plus $1.50 for each pound over 22 pounds, charged in fractions of a pound. What is the charge, in dollars, for a 7.57.5-pound package?
  • A) 11.2511.25
  • B) 15.5015.50
  • C) 16.2516.25
  • D) 19.2519.25
Show answer

Answer: C) 16.2516.25 dollars.

Marking points:

  • 7.5>27.5 > 2, so C=8+1.5(7.5−2)=8+8.25=16.25C = 8 + 1.5(7.5 - 2) = 8 + 8.25 = 16.25.
  • A charges $1.50 for every pound and drops the $8; B charges only the 55 whole pounds over 22; D charges $1.50 for all 7.57.5 pounds on top of the $8.
  1. Apply A workshop has fixed costs of $1200 plus $4 for each item made, so the average cost per item is A(n)=1200+4nnA(n) = \dfrac{1200 + 4n}{n} dollars for nn items. (a) Find the number of items for which the average cost is $10. (b) Identify the value that A(n)A(n) approaches as nn grows very large.
Show answer

Answer: (a) n=200n = 200 items. (b) A(n)A(n) approaches 44 dollars per item.

Marking points:

  • 1200+4nn=10\dfrac{1200 + 4n}{n} = 10 gives 1200+4n=10n1200 + 4n = 10n, so n=200n = 200.
  • A(n)=4+1200nA(n) = 4 + \dfrac{1200}{n}, and 1200n\dfrac{1200}{n} gets close to 00 for large nn.
  1. Exam-style A plant's height is modeled by h(t)=2.4t+5h(t) = 2.4t + 5 cm, built from measurements over 0≤t≤80 \le t \le 8 weeks. Which is the best reason that the prediction h(52)=129.8h(52) = 129.8 cm is unreliable?
  • A) t=52t = 52 is far outside the data, and a constant growth rate is unlikely to last a year.
  • B) The slope of the model is positive.
  • C) The prediction is not a whole number.
  • D) h(52)h(52) is greater than h(8)h(8).
Show answer

Answer: A) It is an extrapolation that relies on the constant-rate assumption.

Marking points:

  • The reason names the data range (00 to 88 weeks) and the assumption that fails.
  • B and D are true of any increasing linear model; C is irrelevant, since heights need not be whole numbers.
  1. Exam-style A theater records ticket sales nn at five prices pp (hypothetical data): (10,410)(10, 410), (12,372)(12, 372), (14,330)(14, 330), (16,295)(16, 295), (18,250)(18, 250), with pp in dollars. (a) Fit a linear regression model n=mp+bn = mp + b, giving mm and bb to three decimal places. (b) Predict the number of tickets sold at $15. (c) Explain why the model should not be used at $35.
Show answer

Answer: (a) m=−19.850m = -19.850 and b=609.300b = 609.300. (b) n(15)=311.550n(15) = 311.550, so about 312312 tickets. (c) It predicts −85.45-85.45 tickets, which is impossible, and $35 is outside the prices in the data.

Marking points:

  • The setup names the model, n=mp+bn = mp + b, before the calculator values.
  • Prediction: −19.85(15)+609.3=311.55-19.85(15) + 609.3 = 311.55, rounded to a whole number of tickets.
  • At p=35p = 35: −19.85(35)+609.3=−85.45-19.85(35) + 609.3 = -85.45, a negative count from an extrapolation.

Key points

Recall, then reveal

Say the main points from memory first, then check them.

Show key pointsHide key points
  • Constant first differences suggest linear, constant second differences suggest quadratic, an asymptote suggests rational, and a change of rule suggests piecewise.
  • The contextual domain comes from the situation: no negative times or lengths, and an end where the quantity runs out.
  • Build exact models from points algebraically; fit measured data by regression after choosing the type.
  • Report regression coefficients to three decimal places, but predict with the unrounded ones.
  • Trust interpolation more than extrapolation, and reject outputs that are impossible in context.

Keep learning

Explore AP Precalculus tutoring →

View the full Precalculus syllabus →

More in this unit

Polynomial and Rational Functions

All Transformations and Function Models notes

Part of Novark's AP Precalculus notes