MathLab with Mr. Ahmed is a math learning website by Ahmed Amasha, a mathematics teacher teaching the American curriculum. Explore Algebra 2, Precalculus, Calculus, and SAT and PSAT Math Prep through lessons, focused practice and printable resources.
(f ∘ g)(x)=f(g(x)); evaluate the inner function first. For gf, exclude zeros of g.
Remember Composition order can change the answer.
Worked example 1
01 / For f(x)=x(x+2) and g(x)=x2, find f+g,f−g, fg, and gf, with all four domains. Preserve any excluded input after simplifying.
02 / Add and subtract like terms; multiply the two original expressions to obtain f+g: 2x(x+1); f−g: 2x; fg: x3(x+2).
03 / Divide the original expressions and simplify to xx+2.
04 / The original denominator vanishes at 0. All real inputs for sum, difference and product; quotient excludes 0.
Worked example 2 · Combine functions algebraically and preserve domains
For f(x)=x(x+3) and g(x)=x+3, find f+g,f−g, fg, and gf, with all four domains. Preserve any excluded input after simplifying.
Add and subtract like terms; multiply the two original expressions to obtain f+g: (x+1)(x+3); f−g: (x−1)(x+3); fg: x(x+3)2. Divide the original expressions and simplify to x. The original denominator vanishes at −3. All real inputs for sum, difference and product; quotient excludes −3.
Read the graphs
Read graphs and construct graphical sums
Use the graph, not an assumed formula, to find the sum of f and g at x=−2.Piecewise-linear f and g; filled endpoints are included and no graph exists beyond them.
Read f(−2)=2 and g(−2)=3. Apply the sum to these ordinates, obtaining 5.
Answer: 5
Compose functions from tables and graphs
Follow the two stages on the graph to evaluate f(g(1)).Both functions have domain [0,4]; values at integer inputs are marked.
The inner ordinate is g(1)=0. Move to input 0 on f and read output 1.
Textbook reference: Stewart, Redlin & Watson, Precalculus: Mathematics for Calculus, 7th ed. (Cengage, 2016). The explanations and practice here are original, organized by textbook section.