Diagnostic Review: Algebra, Geometry and Trig
Calculus mistakes are usually algebra mistakes. This self-test checks the four skills every later lesson takes for granted: algebra, analytic geometry, functions and trigonometry. Work each part on paper, then compare with the answers and use the score guide to decide what to review.
How to use this test
Take each part without a calculator, then open its answers. Count a question as correct only if the whole answer is right (both roots, the full interval, the sign of a cosine). Then check your weakest part with the Python programs below, which verify the answers with SymPy so you can also test your own variations.
| Score in a part | What it means |
|---|---|
| all or all but one | ready, move on |
| about half | review the linked lessons for that part before chapter 1 |
| less than half | do the review lessons first; calculus will feel much easier afterwards |
Part A: Algebra
- Expand .
- Factor completely: .
- Simplify .
- Rationalise the denominator: .
- Simplify .
- Solve .
- Solve .
- Solve .
Answers, Part A
- , for (and )
- , because
- , since and
- , from
- or ( is excluded: division by zero)
Review: Solving Equations, Exponent Laws, nth Roots and Fractional Exponents, Simplifying Radicals, Absolute Value, Inequalities, and the planned Algebra course. This course's appendix Numbers, Inequalities and Absolute Values goes deeper on question 7 and 8.
Part B: Analytic geometry
- Find the equation of the line through and .
- Find the line through perpendicular to .
- Find the centre and radius of the circle .
- Find the distance between and , and their midpoint.
- Where does the parabola meet the line ?
Answers, Part B
- slope , so
- the given line has slope , a perpendicular one has slope :
- complete the squares: , centre , radius 4
- distance , midpoint
- gives or : the points and
Review: The Coordinate Plane, The Pythagorean Theorem, Conic Sections, and the appendix Coordinate Geometry and Lines.
Part C: Functions
- For , simplify the difference quotient .
- Find the domain of .
- For and , find and .
- Is each function even, odd or neither: , , ?
- Find the inverse of .
- Solve .
Answers, Part C
- and , so the quotient is (for ). This exact computation is the heart of the derivative.
- and : the domain is
- for all ; for
- odd, even, neither
- gives or ; only is in the domain of both logs
Review: Functions, Domain and Range, Composition and Inverses, Logarithm Laws, and the planned Pre-Calculus course.
Part D: Trigonometry
- Convert to radians and radians to degrees.
- Give exact values: , , .
- If and , find and .
- Solve for .
- Show that .
- A circle has radius 6. How long is the arc cut off by a central angle of ?
Answers, Part D
- ;
- , ,
- (negative in the second quadrant),
- or
- and , so the quotient is
Review: Trigonometric Functions and the appendix Trigonometry Review.
Checking answers with SymPy
SymPy can confirm algebra answers exactly. expand, factor, cancel, radsimp and solve cover most of Part A; solve_univariate_inequality handles the inequalities.
import sympy as sp
x = sp.symbols('x', real=True)
print(sp.expand((2*x - 3)**2))
print(sp.factor(x**3 - 4*x**2 - 12*x))
print(sp.cancel((x**2 - 9) / (x**2 + x - 6)))
print(sp.radsimp(3 / (sp.sqrt(7) - 2)))
print(sp.solve(x**2 - 4*x - 1, x))
print(sp.solve_univariate_inequality(sp.Abs(2*x - 5) < 3, x))
print(sp.solve_univariate_inequality((x - 1) / (x + 2) >= 0, x))4*x**2 - 12*x + 9
x*(x - 6)*(x + 2)
(x - 3)/(x - 2)
2 + sqrt(7)
[2 - sqrt(5), 2 + sqrt(5)]
(1 < x) & (x < 4)
(1 <= x) | (x < -2)
Note that cancel silently drops the condition . A computer algebra system simplifies expressions, not functions: the original has a hole at and the simplified form does not. Keeping track of such conditions is your job, and it matters for limits in chapter 2.
The geometry and function answers check the same way:
import sympy as sp
x, y, h = sp.symbols('x y h')
f = x**2 - 2*x
print(sp.simplify((f.subs(x, 2 + h) - f.subs(x, 2)) / h))
print(sp.solve([y - x**2, y - x - 6], [x, y]))
print(sp.Point(-1, 3).distance(sp.Point(5, -5)), sp.Point(-1, 3).midpoint(sp.Point(5, -5)))
inv = sp.solve(sp.Eq(y, (2*x + 1) / (x - 3)), x)[0]
print("inverse:", inv)
print(sp.solve(sp.log(x, 2) + sp.log(x - 2, 2) - 3, x))h + 2
[(-2, 4), (3, 9)]
10 Point2D(2, -1)
inverse: (3*y + 1)/(y - 2)
[4]
SymPy solved for in terms of ; renaming to gives .
In software
These "pre-calculus" skills show up constantly in code. Rearranging formulas is how you invert a mapping, such as screen coordinates back to world coordinates in a game. Absolute-value inequalities are tolerance checks such as abs(a - b) < eps. Circle equations and line intersections are collision tests (ray–sphere intersection is a quadratic equation). Radians are what every math.sin expects, and the identity in D5 is the kind of rewrite a shader programmer uses to save an operation.
Exercises
Exercise 1: Complete the square
Write in the form and give the minimum value of the expression.
Answer
, minimum at .
Solution
A square is never negative, so the smallest value is , reached when .
Exercise 2: A trig equation with two families
Solve for .
Answer
.
Solution
Treat it as a quadratic in : , so or .
import sympy as sp
x, s = sp.symbols('x s')
domain = sp.Interval.Ropen(0, 2*sp.pi)
for r in sp.solve(2*s**2 - s - 1, s):
print("sin x =", r, "->", sp.solveset(sp.sin(x) - r, x, domain))sin x = -1/2 -> {7*pi/6, 11*pi/6}
sin x = 1 -> {pi/2}
Solving the quadratic in first and then each sine equation separately is also the safest way to ask a CAS: given the whole equation at once, this SymPy version returns only and silently misses two solutions. Always sanity-check a solver's answer.
Exercise 3: Domain of a composition
For and , find the domain of .
Answer
Solution
. We need so that exists, and , that is . So the domain is all except 4.
Exercise 4: Check yourself in code
Write a short program that checks the identity numerically at , 0.7 and 1.2.
Answer
Both sides agree at every point (differences of order or exactly 0).
Solution
import math
for x in [0.3, 0.7, 1.2]:
left = math.sin(2*x) / (1 + math.cos(2*x))
right = math.tan(x)
print(x, round(left, 12), round(right, 12), abs(left - right) < 1e-12)0.3 0.30933624961 0.30933624961 True
0.7 0.842288380463 0.842288380463 True
1.2 2.572151622126 2.572151622126 True
A numeric check like this cannot prove an identity, but it catches a wrong one immediately.
Test yourself
What is after cancelling, and what condition is lost?
- ,
- ,
- ,
- 1, none
If and is in the second quadrant, what is ?
Which interval is the solution of ?
- or