Skip to content
Tutorials Center
My learning

Topics

Lesson 37 of 37 · Projects and Practice

Project: Build a Limit and Curve Explorer

Combine limits, parametric and polar curves in a mini-project: write a numeric limit estimator, a curve plotter and a rotation animation grid.

You now have tools from the whole course. In this project you will build three small programs that use them together: a limit estimator that tells you what a function approaches, a curve plotter that handles rectangular, parametric and polar curves in one interface, and a transformation lab that applies matrices to shapes.

Each part is a runnable cell. Read the code, change the inputs, and predict the result before you run it.

Part 1: a limit estimator

The estimator evaluates f at points that approach a from the left and right, then decides whether the limit exists. It reports a finite limit, +∞, −∞, or "does not exist".

The design rules:

  1. Sample a ± 10⁻ᵏ for k = 2 to 8.
  2. If the values on a side are growing in size past a big threshold, report infinity with its sign.
  3. If both sides settle on nearly the same finite number, report it.
  4. Otherwise report that the one-sided limits differ or the function oscillates.
Python Limit estimator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Challenge: add a mode for x → ∞ that samples 10², 10³, … 10⁸ and reports the horizontal asymptote.

Part 2: one plotter for three kinds of curve

The plotter takes a curve described by a function that returns (x, y) for a parameter value. A rectangular curve y = f(x) becomes (t, f(t)). A polar curve r = g(θ) becomes (g(θ) cos θ, g(θ) sin θ). A parametric curve is already in that form. One function can then draw everything.

Python Universal curve plotter

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Challenge: add a limaçon r = 1 + 2 cos θ, then find the values of θ where it passes through the pole (r = 0) and print them.

Part 3: a transformation lab

Put the matrix tools to work: apply a sequence of transformations to a shape, print the determinant of the combined matrix, and confirm that the area scales by that determinant.

Python Transformation lab

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Reflect and extend

  • Where would a computer need the limit idea in the plotter? (Hint: what happens to tan x near π/2?)
  • Rewrite the transformation lab so it undoes the transformations with np.linalg.inv(M) and checks that the house returns to the start.
  • Parametrize the line from (0, 0) to (6, 3) and rotate it by 90° with a matrix; confirm the dot product with the original is 0.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. Why does the limit estimator compare values at several sample distances instead of one?

    A single sample could be misleading; the trend shows whether the values converge, diverge or oscillate.
  2. 2. How does the plotter draw a polar curve r = g(θ)?

    That is the polar-to-rectangular conversion, applied to each θ.
  3. 3. A transformation with matrix determinant -2 changes areas by what factor?

    Area scales by |det| = 2, and the negative sign indicates a reflection.

Summary

  • A limit estimator samples both sides and classifies the behavior: finite, infinite, jump or oscillation.
  • Rectangular, polar and parametric curves can all be reduced to a function t → (x, y).
  • Combined transformations multiply on the left, and the area scale factor is |det|.
  • Numerical tools complement algebra; they find patterns, while algebra proves them.

You have finished the pre-calculus tutorial. Return to the Pre-Calculus track page to review any chapter.