\(\displaystyle 2 x + 10\)
Algebraic Modeling
Learning objectives
After this lesson you should be able to define variables with units, translate words into equations, choose a model family, solve for unknowns, interpret results, and use SymPy to check model parameters.
Motivation: a model is a useful simplification
A model is a simplified mathematical description. A road map is not the city, but it helps you travel. An algebraic model is not the full situation, but it helps you calculate, compare, predict, and decide.
The modeling cycle
- Understand the situation.
- Define variables with units.
- State assumptions.
- Choose a model family.
- Translate relationships into equations.
- Solve or analyze.
- Interpret the result.
- Check reasonableness and limitations.
Key idea
Choosing variables and interpreting answers are part of the mathematics.
Variables, parameters, and units
In C(n) = 50 + 12n, n might be number of items, C(n) cost in dollars, 50 a fixed cost, and 12 dollars per item. Units help you catch mistakes.
Translating words into algebra
| Words | Algebra |
|---|---|
five more than x |
x + 5 |
five less than x |
x - 5 |
twice x |
2x |
x decreased by 20% |
0.80x |
| total adult and student tickets | a + s |
revenue from adult tickets at $12 each |
12a |
Common mistake
Do not start solving before defining what each variable means.
Linear models
Linear models have the form y = mx + b. The slope is a constant rate of change, and the intercept is the starting value.
A repair service charges $40 to visit and $25 per hour:
C(h) = 40 + 25h
A plant is 10 cm tall on day 0 and 22 cm tall on day 6:
slope = (22 - 10)/(6 - 0) = 2 cm/day
H(t) = 10 + 2t
Systems as models
A club sold 50 tickets. Adult tickets cost $10, student tickets cost $6, and total revenue was $380.
a + s = 50
10a + 6s = 380
Substitute s = 50 - a:
10a + 6(50 - a) = 380
4a = 80
a = 20
s = 30
Quadratic models
Quadratic models describe curved relationships and often have a maximum or minimum. A height model such as h(t) = -16t^2 + 64t + 5 opens downward, so its vertex is the maximum height.
A vertex form model is:
f(x) = a(x - h)^2 + k
If the vertex is (3, 10) and the graph passes through (5, 2), then 2 = a(5 - 3)^2 + 10, so a = -2.
Rational, radical, exponential, and logarithmic models
- Rational: time for fixed distance,
T(r) = 120/r, withr > 0. - Radical: side length from area,
s(A) = sqrt(A), withA >= 0. - Exponential: repeated percentage growth,
P(t)=P_0(1+r)^t. - Logarithmic: solving an exponential model for time.
Model checking
Ask whether units are consistent, the answer is in the domain, the size and sign are reasonable, whole numbers are required, and the model is being used outside its intended range.
Browser symbolic practice
Use math.js for browser calculators, Nerdamer for parameter solving, Algebrite for CAS exploration, or PyScript for a heavier Python/SymPy sandbox.
Try entering two points to compute a line, evaluating a candidate formula at data points, and comparing linear and exponential predictions.
Practice exercises
- Translate: “seven more than twice
x.” - A taxi charges
$4plus$2.50per mile. Write a cost model. - A line passes through
(1, 5)and(4, 17). Find a linear model. - A store sells notebooks for
$3and pens for$2. A customer buys12items for$31. Set up and solve a system. - A square has area
A. Write side length as a function ofA. - A value starts at
800and decays by6%per year. Write a model. - A quadratic has vertex
(2, 9)and passes through(4, 1). Finda. - Explain one limitation of a taxi cost model.
2x + 7.C(m)=4+2.50m.y = 4x + 1.n+p=12,3n+2p=31;n=7,p=5.s(A)=sqrt(A),A >= 0.V(t)=800(0.94)^t.1=a(4-2)^2+9, soa=-2.- It may ignore minimum fares, traffic charges, rounding, or rate changes.
Subtopic guided practice and checkpoints
Modeling is not just solving. It is choosing variables, translating conditions, solving, and checking whether the result makes sense in context.
Lab 1: define variables and units
Guess first. If a problem asks for time and distance, why is it dangerous to write equations before defining variables?
Guided exercise.
Suppose a taxi charges $4 plus $2.50 per mile. Define:
m = number of miles
C = total cost in dollars
Then the model is:
C = 4 + 2.50m
Checkpoint. A gym charges a $25 sign-up fee plus $18 per month. Define variables with units and write a cost model.
Lab 2: translate words into equations
Guess first. In “five more than twice a number is seventeen,” which part is the variable expression?
Guided exercise.
number -> n
twice a number -> 2n
five more than twice a number -> 2n + 5
is seventeen -> = 17
So:
2n + 5 = 17
2n = 12
n = 6
Checkpoint. Translate and solve: “Three less than four times a number is twenty-one.”
Lab 3: linear model from two data points
Guess first. If data points are (2, 11) and (6, 23), is the rate of change positive or negative?
Guided exercise.
m = (23 - 11)/(6 - 2) = 12/4 = 3
y - 11 = 3(x - 2)
y = 3x + 5
The model predicts an output of 5 when x = 0.
Checkpoint. Build a linear model through (1, 9) and (5, 21). Interpret the slope.
Lab 4: check a model result
Guess first. If a ticket problem gives a = -3 adult tickets, should you accept the algebraic answer?
Guided exercise.
A model answer must satisfy three tests:
- It satisfies the equation or system.
- It has the right units.
- It makes sense in the context.
Negative ticket counts, negative lengths, and fractional people usually mean the model or interpretation needs review.
Checkpoint. A calculation gives 2.4 buses for a field trip. What final answer should the planner use, and why?
Guessing game checkpoint
Using this lesson with edumath and SymPy
Use parsed equations to check the algebra after you have defined variables and units. The computer can solve, but you must decide whether the model makes sense.
from edumath.core import parse_equation
from edumath.solvers import solve_equation_steps
model_solution = solve_equation_steps(parse_equation("2*n + 5 = 17"))
print(model_solution.render_text())Answer: n = 6
Method: linear equation
Steps:
1. Original equation:
Eq(2*n + 5, 17)
2. Move everything to one side:
Eq(2*n - 12, 0)
This writes the equation in the form ax + b = 0.
3. Move the constant term:
Eq(2*n, 12)
4. Divide by the coefficient of the variable:
Eq(n, 6)
Check:
n = 6: valid
import sympy as sp
m, b = sp.symbols("m b")
sp.solve((sp.Eq(m*2 + b, 7), sp.Eq(m*5 + b, 16)), (m, b)){b: 1, m: 3}
a, x = sp.symbols("a x")
model = a*(x - 3)**2 + 10
sp.solve(sp.Eq(model.subs(x, 5), 2), a)[-2]
from edumath.algebra import expression_table
expression_table("35 + 8*x", inputs=(0, 1, 2, 3, 4))((0.0, 35.0), (1.0, 43.0), (2.0, 51.0), (3.0, 59.0), (4.0, 67.0))
Further reading
- OpenStax, College Algebra 2e: https://openstax.org/books/college-algebra-2e/pages/index
- OpenStax, Precalculus: https://openstax.org/books/precalculus/pages/index