Visualize Derivatives Through Motion
Build interactive Desmos visualizations connecting limits, derivatives, and motion.
Introduction
30 Second Summary
Every time you check your speedometer, you are reading a derivative. Your speed is how quickly your position changes, and that relationship between position, speed, and acceleration is exactly what calculus describes.
In this project, you will build interactive visualizations in Desmos that show you what limits and derivatives actually look like. By the end, you will have a motion simulator where position, velocity, and acceleration are all connected through calculus.
What You'll Build
You will build three interconnected interactive graphs in Desmos that take you from understanding limits all the way to modeling how objects move using derivatives.
By the end of this project, you'll have:
- A limit exploration graph showing how function values converge as x approaches a point, proving that limits describe where a function is heading.
- A secant-to-tangent line visualizer with an adjustable slider that demonstrates the fundamental definition of the derivative.
- A complete motion model showing position, velocity, and acceleration on one interactive graph, all linked by derivatives.
- Secret Mission: Model a free-falling object with air resistance and find the terminal velocity using your derivative tools.
Are there any prerequisites?
You only need basic algebra skills like solving equations, working with x and y, plotting points, and understanding exponents. No prior calculus or physics knowledge is required.
Open Desmos and Explore Functions
Every physics equation you will encounter describes how something changes. To understand what "change" looks like mathematically, you need a tool that turns equations into pictures you can interact with.
In this step, you will open Desmos and learn the basics of graphing functions, evaluating them at specific points, and creating interactive sliders that let you explore a curve in real time.
In this step, get ready to:
- Graph a parabola and evaluate it at a specific point.
- Create a slider and a movable point that travels along the curve.
- Graph a straight line and compare its slope behavior to the curve.
Open Desmos and graph a parabola
Desmos is a free browser-based graphing calculator. It shows an expression list on the left where you type math, and a coordinate grid on the right where graphs appear instantly.
- Open a new browser tab and navigate to:
- https://www.desmos.com/calculator
- Click the first empty expression line on the left side of the screen.
- Type f(x) = x^2 and press Enter.
A U-shaped curve (a parabola) appears on the grid. This is the function you will explore throughout the project.
- Click anywhere on the curve to see coordinate values for that point.
- Click the next empty expression line below your function.
- Type f(2) and press Enter.
Desmos evaluates the function at x = 2 and displays the result (4). This is function notation in action.
What is Desmos doing here?
When you define f(x) = x^2, you are telling Desmos "for any input x, square it." Typing f(2) on a new line asks Desmos to substitute 2 into that rule, giving you 2 squared = 4.
You can evaluate the function at any value this way. Try f(5) or f(-3) to see how outputs change with different inputs.
Create a slider and movable point
A static graph only shows you the big picture. To explore individual points on the curve interactively, you need a slider that controls where you are looking.
- Click the next empty expression line in the expression list.
- Type a = 1 and press Enter.
Desmos detects that a is a free variable and creates a slider for it. You will see a horizontal slider bar appear on that expression line.
- Drag the slider left and right to see the value of a change.
- Click the next empty expression line.
- Type (a, f(a)) and press Enter.
A point appears on the parabola. Now drag the a slider again. The point moves along the curve, always staying on it.
Why does the point follow the curve?
The expression (a, f(a)) tells Desmos to plot a point whose x-coordinate is the current value of a, and whose y-coordinate is whatever f outputs for that a value.
As you drag the slider, a changes, so the point recalculates and moves. This is the interactive control you will use throughout the project to explore calculus concepts visually.
Don't see a slider?
Make sure you typed a = 1 on its own expression line, not on the same line as another expression. Each expression needs its own line in the expression list.
If a still does not produce a slider, try clicking the expression line and pressing Enter again.
Having trouble getting the slider to work?
Graph a line and compare slopes
You now have a curve where the steepness changes at every point. How does this compare to a straight line, where the steepness is the same everywhere?
- Click the next empty expression line.
- Type g(x) = 2x + 1 and press Enter.
A straight line appears on the graph alongside your parabola. Notice that the line rises at the same rate everywhere. Its slope is always 2, no matter where you look on it.
- Drag the a slider and watch your point move along the parabola.
- Compare the steepness of the parabola at different positions to the constant steepness of the straight line.
Why does this comparison matter?
For the straight line g(x) = 2x + 1, the slope is 2 everywhere. You can measure it with basic algebra.
For the parabola f(x) = x^2, the steepness changes at every point. Near x = 0 the curve is almost flat. Near x = 3 it is very steep. Calculus exists to answer one question: what is the exact slope of a curve at a single point?
✔️ Awesome, I've got everything!
Great. Make sure your expression list has all five entries and that your slider moves the point along the parabola.
ⓧ I'd like to double check the full expression list
Your expression list should contain exactly these entries, one per line:
- Line 1: f(x) = x^2 (graphs the parabola).
- Line 2: f(2) (evaluates to 4).
- Line 3: a = 1 (slider).
- Line 4: (a, f(a)) (movable point on the parabola).
- Line 5: g(x) = 2x + 1 (straight line for comparison).
You now have an interactive playground in Desmos with a curve, a slider, and a movable point. Next up, you will use this same setup to discover what a limit is by watching function values converge.
Discover Limits by Zooming In
In Step 1, you explored functions, sliders, and a movable point in Desmos. You noticed that the parabola f(x) = x^2 gets steeper at every point, while the straight line g(x) = 2x + 1 has the same steepness everywhere.
This raises the core question of calculus: what is the exact slope of a curve at a single point? The answer begins with limits. A limit describes the value a function is heading toward, even when it cannot actually arrive there.
In this step, get ready to:
- Explore a function that is undefined at a point but still approaches a specific value.
- Use tables and zooming to discover limits numerically and visually.
- Verify your limit skills with a second famous example from physics.
Define a function with a hole and explore it numerically
Some functions are undefined at a specific input (like dividing by zero), yet still clearly heading toward a value. You will build this scenario and watch it happen.
- Start a fresh graph by pressing Cmd+Shift+L (macOS) or Ctrl+Shift+L (Windows) to clear all expressions from the previous step.
- Click the first empty expression line on the left and type this function:
f(x) = (x^2 - 1)/(x - 1)
What is this function?
This function divides (x^2 - 1) by (x - 1). When x = 1, the denominator becomes zero, so the function is undefined there. But what value does the function approach as x gets close to 1?
You will see a curve appear on the graph. Now you need to investigate what happens near x = 1 using a table of values.
- Click the + icon in the top left of the expression list to open the Add Item menu.
- Select Table from the menu.
- In the first column (x₁), enter the following values one per row, pressing Return after each to add a new row:
0.5
0.9
0.99
0.999
1.001
1.01
1.1
1.5
- In the second column (y₁), type f(x_1) as the column header to auto-evaluate the function at each x value.
What should I see?
The y-values from the left side (0.5, 0.9, 0.99, 0.999) produce outputs like 1.5, 1.9, 1.99, 1.999. The y-values from the right side (1.001, 1.01, 1.1, 1.5) produce outputs like 2.001, 2.01, 2.1, 2.5.
Both sides converge toward 2. This is the limit: even though f(1) is undefined, the function approaches 2 as x approaches 1.
Table showing errors or NaN?
Make sure you typed the column header as f(x_1) (using the subscript for x₁, which Desmos creates automatically when you type x followed by 1 in the column header). Also confirm your function definition matches f(x) = (x^2 - 1)/(x - 1) exactly.
Help me fix my Desmos table for the limit exploration.
Visualize the limit by zooming in on the graph
The table gave you numerical evidence. Now you will see the limit visually by examining the graph near x = 1.
- Click on the graph and use your scroll wheel (or pinch on trackpad) to zoom in near the point x = 1, y = 2.
- Look closely at the graph. You will see what appears to be a straight line with a tiny hole (open circle) at the point (1, 2). The function is heading toward y = 2 from both sides but never arrives.
To mark the limit value explicitly on the graph, you will place an open circle at (1, 2).
- Click a new empty expression line below your function and type this point:
(1, 2)
What is this point showing?
Desmos plots the point (1, 2) as a dot on the graph. Combined with the hole in the function's graph at that location, this visually marks where the limit lives. The limit is 2 because no matter how close x gets to 1, the function's output gets arbitrarily close to 2.
This "zooming in" intuition is exactly what a limit formalizes mathematically. If a function's graph looks like a single straight line when you zoom in far enough near a point, the limit exists there.
You should now see the parabola-like curve with a visible gap at x = 1 and your labeled point marking where the limit value is.
Can't see the hole in the graph?
Zoom in more aggressively near x = 1. The hole can be very small at default zoom. Also check that you are looking at the correct region by clicking on the curve near x = 1 to see coordinate values.
Help me find the hole in my Desmos graph.
Explore a second limit with sin(x)/x
The first example showed a removable hole at a single point. This next example is one of the most famous limits in mathematics and physics. It appears throughout oscillation and wave equations in quantum mechanics.
- Click a new empty expression line and type this function:
h(x) = sin(x)/x
- Create a second table by clicking the + icon and selecting Table again.
- Enter the following x values in the first column, approaching 0 from both sides:
0.1
0.01
0.001
-0.001
-0.01
-0.1
- Set the second column header to h(x_1) to evaluate the function at each value.
What do the values show?
The y-values are all extremely close to 1. For x = 0.1, you get approximately 0.9983. For x = 0.001, you get approximately 0.9999998. The limit of sin(x)/x as x approaches 0 is exactly 1.
This function is also undefined at x = 0 (since you would divide by zero), but it clearly heads toward 1 from both sides. This limit is fundamental in physics and engineering for describing oscillations and wave behavior.
Zoom in on the graph of h(x) near x = 0 to visually confirm the function approaches y = 1 at that point.
Seeing a blank or flat graph?
Make sure you typed sin(x)/x and not sin(x/x). The division must be outside the sine function. Desmos shows sin as a built-in function, so it should auto-format correctly.
Help me graph sin(x)/x correctly in Desmos.
✔️ Awesome, I've got everything!
Great. You should have both functions graphed, both tables showing convergence, and the point (1, 2) marking the first limit value.
ⓧ I'd like to double check the full expression list
Your Desmos expression list should contain all of the following items:
f(x) = (x^2 - 1)/(x - 1)
[Table 1]
x₁: 0.5, 0.9, 0.99, 0.999, 1.001, 1.01, 1.1, 1.5
y₁: f(x_1)
(1, 2)
h(x) = sin(x)/x
[Table 2]
x₁: 0.1, 0.01, 0.001, -0.001, -0.01, -0.1
y₁: h(x_1)
If anything is missing, add it to a new expression line. If a table looks wrong, delete it (click the three dots next to it) and create a fresh one.
You have just discovered what a limit is through direct observation. You now know that a limit describes where a function is heading, not where it is. Next up, you will use this idea to define the derivative and watch a secant line transform into a tangent line.
Build the Secant-to-Tangent Visualizer
In the previous step, you discovered what limits are by watching function values converge toward a number they never quite reach.
Now you will use that limit concept to answer the core question from Step 1: what is the slope of a curve at a single point? The answer is the derivative, and you will build a visual proof of how it works by watching a secant line transform into a tangent line.
In this step, get ready to:
- Build a secant line between two points on a parabola.
- Animate the secant line into a tangent line by shrinking h toward 0.
- Verify that the limit of the secant slope equals the Desmos-computed derivative.
Set up the parabola and secant line
A secant line is a straight line that passes through two points on a curve. Its slope measures the average rate of change between those two points.
- Clear your current graph by pressing Ctrl+Shift+L (Windows) or Ctrl+Shift+L (macOS) to remove all expressions and start fresh.
- Type the following into the first expression line in the expression list on the left:
f(x) = x^2
You should see the familiar parabola appear on your graph.
- Click on the next empty expression line and type:
a = 1
- Desmos will offer to create a slider for a. Accept it by clicking the slider that appears.
- In the next expression line, type:
h = 2
- Accept the slider for h as well.
What do these sliders control?
The slider a is your fixed point on the curve. It controls where you are measuring the slope.
The slider h controls how far away your second point is from the first. Shrinking h is how you will take a limit.
- Plot the two points on the parabola by typing each on its own expression line:
(a, f(a))
(a + h, f(a + h))
You should see two dots on the parabola. One sits at x = 1, the other at x = 3 (since h = 2).
- Draw the secant line connecting these two points by typing this on the next expression line:
y = ((f(a+h) - f(a))/h)*(x - a) + f(a)
What does this expression do?
This is the point-slope form of a line: y = m(x - x₁) + y₁. The slope m is (f(a+h) - f(a))/h, which is the rise over run between the two points.
This slope measures the average rate of change of f(x) between x = a and x = a + h.
You should see a straight line passing through both points on the parabola.
Don't see two points and a line?
Make sure each expression is on its own line in the expression list. Check that you typed f(a) (not f(x)) in the point coordinates so they evaluate at the slider value.
If you see an error on the secant line expression, check that every parenthesis is matched. The expression has multiple nested parentheses.
help me fix my secant line expression in Desmos
Animate the secant into the tangent line
Your secant line currently connects two points that are fairly far apart (h = 2). The magic happens when you shrink h toward zero.
- Slowly drag the h slider to the left, toward 0.
- Watch the second point slide along the parabola toward the first point.
- Observe how the secant line rotates and settles into a final position as h gets very small.
As h approaches 0, the secant line becomes the tangent line. The tangent line touches the curve at exactly one point and its slope is the instantaneous rate of change.
- Now define the secant slope as its own value so you can watch it numerically. Type on a new expression line:
m = (f(a+h) - f(a))/h
What does m show you?
The value of m appears next to the expression line in Desmos. As you drag h toward 0, watch this number converge.
For a = 1, the slope m approaches 2. For a = 3, it approaches 6. The pattern is that the slope approaches 2a, which is the derivative of x².
- Set a to 1 and drag h close to 0. Confirm that m approaches 2.
- Set a to 3 and drag h close to 0. Confirm that m approaches 6.
Seeing m jump to undefined or NaN?
If h reaches exactly 0, you get division by zero. Desmos may show the value as undefined. Drag h back to a small positive number like 0.001 instead of setting it to exactly 0.
help me understand why my slope shows undefined when h equals 0
Verify with the Desmos built-in derivative
Desmos can compute exact derivatives using prime notation. You will now compare your secant slope limit with the true derivative to confirm they match.
- Type the following on a new expression line to compute the exact derivative at your point:
f'(a)
What does f'(a) mean?
The notation f'(a) tells Desmos to compute the first derivative of f at the point x = a. Since f(x) = x², the derivative is f'(x) = 2x, so f'(a) = 2a.
This is the formal result of taking the limit: f'(x) = limit as h approaches 0 of [f(x+h) - f(x)] / h.
- Compare the value of f'(a) with your secant slope m when h is very small (like 0.001).
- Set a to 1. Confirm that f'(a) shows 2 and m is very close to 2.
- Set a to 3. Confirm that f'(a) shows 6 and m is very close to 6.
They match. This confirms that the derivative is the limit of the secant slope as h approaches 0. You have just seen the fundamental definition of calculus in action.
f'(a) not showing a value?
Make sure f(x) is defined as a function (with the f(x) = notation) on a previous expression line. Desmos needs the function definition before it can compute the derivative.
Also check that your slider a is defined. The expression f'(a) evaluates the derivative at a specific value of a.
help me get Desmos to compute the derivative of my function
✔️ Awesome, I've got everything!
Great. Make sure all your expressions are visible and none have errors showing.
ⓧ I'd like to double check the full code
Your expression list should contain exactly these entries, one per line:
f(x) = x^2
a = 1
h = 2
(a, f(a))
(a + h, f(a + h))
y = ((f(a+h) - f(a))/h)*(x - a) + f(a)
m = (f(a+h) - f(a))/h
f'(a)
You now have a visual proof that the derivative is the limit of the secant slope. Next up, you will use this derivative power to model real physical motion.
Build the Position-Velocity-Acceleration Motion Model
In the previous step, you proved that the derivative is the limit of the secant slope as h approaches 0. Now you will put that discovery to work on a real physics problem.
Every moving object has a position that changes over time. The rate of that change is velocity, and the rate velocity changes is acceleration. In this step, you will build a motion model where all three quantities are linked by derivatives on a single interactive graph.
In this step, get ready to:
- Define a position function and track an object with a slider.
- Compute velocity as the first derivative of position.
- Compute acceleration as the second derivative and observe all three linked curves.
Define the position function
You need a fresh graph for this motion model. The position function describes where an object is at any given time t.
- Open a fresh Desmos graph by navigating to https://www.desmos.com/calculator in a new browser tab.
- Type the following position function into the first expression line:
s(t) = -t^3 + 6t^2 - 9t + 4
What does this function represent?
This is a cubic polynomial representing the position of an object moving along a line. Think of a ball rolling along a track. The output s tells you where the ball is at any time t.
Cubic functions are great for motion models because the object changes direction. You will see it stop, reverse, and speed up at different moments.
You should see a curve that rises, dips, and rises again.
- Now create a time slider by typing this in the next expression line:
t_0 = 0
- Desmos will offer to create a slider. Click the slider to accept it.
- Set the slider range to 0 through 5 by clicking the endpoints of the slider and editing them.
- Plot the object's position at the current time by typing this in the next line:
(t_0, s(t_0))
- Drag the t_0 slider left and right.
You should see a point moving along the curve as you drag the slider. This point represents the object's position at each moment in time.
Don't see a moving point?
Make sure you typed t_0 (with an underscore) consistently in both the slider and the point expression. Desmos treats t_0 as a subscript variable, so it must match exactly.
Also check that your slider range covers 0 to 5. If the range is too narrow, the point may not visibly move along the curve. Help me fix my position point in Desmos.
Compute velocity as the first derivative
Velocity tells you how fast the object is moving and in which direction. Mathematically, velocity is the first derivative of the position function.
- Define the velocity function by typing this in a new expression line:
v(t) = s'(t)
What does this expression do?
The prime notation s'(t) tells Desmos to compute the derivative of s(t) with respect to t. This gives you the rate of change of position at every moment.
When v(t) is positive, the object moves forward. When negative, it moves backward. When velocity equals zero, the object momentarily stops.
- Look at the velocity graph and identify where it crosses the horizontal axis (where v(t) = 0).
You should see the velocity curve cross zero at t = 1 and t = 3. These are the moments when the object stops and changes direction.
Why does the object stop twice?
The cubic position function creates motion where the object moves forward, pauses at t = 1, reverses direction, pauses again at t = 3, then moves forward again. Drag your t_0 slider through these points to watch the position point reverse on the curve.
Velocity graph not appearing?
Check that you defined s(t) before v(t) in your expression list. Desmos needs the original function to exist before it can compute the derivative.
If you see an error, make sure you typed the apostrophe character (') for the prime notation, not a backtick or accent mark. Help me get the derivative notation working in Desmos.
Graph acceleration and observe all three curves together
Acceleration measures how quickly velocity itself is changing. It is the second derivative of position.
- Define the acceleration function by typing this in a new expression line:
a(t) = s''(t)
What does double-prime notation mean?
The notation s''(t) is the derivative of the derivative. It tells you how fast velocity is changing at each instant.
When acceleration is positive, the object is speeding up in the positive direction. When negative, it is slowing down or speeding up in the reverse direction.
- Confirm that you now see three curves on your graph at once: the position curve, the velocity curve, and the acceleration line.
- Drag the t_0 slider slowly from 0 to 5.
Watch how the three values relate at each instant. When velocity crosses zero, the position point changes direction on the curve.
The position-velocity-acceleration chain
You now have the fundamental relationship of classical mechanics on your screen. Position tells you where. Velocity (first derivative) tells you how fast and which direction. Acceleration (second derivative) tells you how the speed is changing.
This chain through derivatives is exactly what Newton's laws describe. Force equals mass times acceleration, and acceleration is the second derivative of position. Every physics problem from projectiles to planetary orbits starts here.
Curves overlapping and hard to read?
Click the colored circle next to each expression in the list to change its color. Use distinct colors for s(t), v(t), and a(t) so you can tell them apart.
You can also click the wrench icon in the top right to adjust the axis ranges if the curves go off-screen. Help me read my three overlapping curves in Desmos.
✔️ Awesome, I've got everything!
Great. You should have all five expressions in your expression list and three visible curves on the graph.
ⓧ I'd like to double check the full expressions
Here is the complete list of expressions your Desmos graph should contain:
s(t) = -t^3 + 6t^2 - 9t + 4
t_0 = 0
(t_0, s(t_0))
v(t) = s'(t)
a(t) = s''(t)
The t_0 slider should have a range of 0 to 5. All three function curves (position, velocity, acceleration) should be visible on the graph simultaneously.
Secret mission
Model Free Fall with Air Resistance
In the real world, falling objects do not accelerate forever. Air resistance builds until it balances gravity, and the object reaches a maximum speed called terminal velocity. Your mission is to model this using derivatives and prove exactly when and why an object stops accelerating.
Clean Up Your Resources
Clean Up Your Resources
This project runs entirely in Desmos, which is free to use with no account required. There are no ongoing costs or cloud resources to manage.
Decide whether to keep your graphs accessible, bookmark them for later, or close everything out.
Resources you used:
- Desmos graph with limit exploration (table and zooming examples).
- Desmos graph with motion model (position, velocity, acceleration functions).
- Desmos graph with free-fall air resistance model (Secret Mission).
Keep everything running
No action needed. Choose this if you want your graphs to stay accessible in your browser.
- Your Desmos graphs persist in your browser session automatically. As long as you do not clear your browser data, your graphs will still be there when you return.
- To save your graphs permanently, create a free Desmos account by clicking the hamburger menu (three lines) in the top left corner of Desmos, then click Sign In. This lets you access your graphs from any device.
Pause - I'll come back to this later
Bookmark your graph URLs so you can return to them without searching. There are no running processes or costs to pause.
- In each Desmos tab, bookmark the URL in your browser. Each graph has a unique URL that preserves your expressions.
- Alternatively, create a free Desmos account (click the menu icon in the top left, then Sign In) and save each graph with a descriptive name.
Delete - I don't want to use this again
Remove all project graphs and start fresh. Since everything lives in your browser, deletion is straightforward.
- Close all Desmos browser tabs containing your project graphs (limit explorer, motion model, and free-fall model).
- If you saved graphs to a Desmos account, open each saved graph from your account dashboard, click the menu icon in the top left, and select Delete Graph.
- To clear any cached Desmos data from your browser, open your browser settings and clear site data for desmos.com.
Nice Work!
Nice Work!
Nice work! You just built a complete interactive calculus dashboard in Desmos that visually proves derivatives are the mathematical language of motion.
You've learned how to:
- Built a limit explorer that shows function values converging from both sides, proving limits are about approaching rather than arriving.
- Created a secant-to-tangent visualizer that demonstrates the derivative as the limit of the secant slope, the fundamental definition of calculus.
- Constructed a complete position-velocity-acceleration motion model linked by derivatives, showing that calculus is the language of motion.
- (Secret Mission) Modeled realistic free fall with air resistance and identified terminal velocity using derivative analysis.
Ready to quiz yourself?