Overview
This worksheet turns the language of the Motion worksheet into equations that predict where an object will be and when it will get there. It covers rates of change, the constant acceleration equations, vectors in two dimensions, and projectile motion, and finishes by working out the gravity a game needs for a jump to feel right.
It closes with a short C++ console program that simulates a projectile one small time step at a time and checks the result against the exact answer.
Learning Objectives
By the end of this lab you will be able to:
- Read velocity and acceleration as derivatives of position, and recognise the area under a graph as an integral
- Derive the constant acceleration equations from a velocity-time graph and choose the right one for a problem
- Resolve a two-dimensional vector into components and recombine components into a magnitude and direction
- Solve projectile motion problems by treating horizontal and vertical motion independently
- Calculate the gravity and launch velocity needed for a jump of a given height and time to the top
- Implement a console program that steps a projectile forward in time and compares it with the analytic solution
Concept
In the Motion worksheet, velocity was the gradient of a position-time graph and displacement was the area under a velocity-time graph. Calculus gives those two ideas names. The gradient at a single instant is the derivative, written , and the area under a curve is the integral. You will not need to calculate any derivatives by hand here. You only need to read the notation as "the rate of change of x with respect to time".
When the acceleration is constant, the area under a velocity-time graph is a simple trapezium, and that one picture produces all five of the constant acceleration equations, often called the SUVAT equations after their symbols. Each equation leaves out one of the five quantities, so the trick to any problem is to list what you know and choose the equation that leaves out the one quantity you neither know nor need.
The most powerful idea in this worksheet is that perpendicular directions are independent. A ball thrown across a field moves horizontally at a constant velocity, because nothing pushes it sideways, while it accelerates vertically under gravity. Solving the two directions separately, then combining them at the end, turns any projectile problem into two one-dimensional problems that you already know how to solve.
Tasks
Task 1 - Rates of change
Hook
A speed camera works out your speed by timing you between two lines painted on the road. A speedometer shows your speed at this exact instant. How can a speed exist at a single instant, when speed is distance divided by time and no time passes in an instant?
Intuition
Start with an average over an interval, the slope of the straight line joining two points on a position-time graph. This line is called a secant. Now shrink the interval. The second point slides toward the first, and the secant swings round until it just touches the curve at a single point. That touching line is the tangent, and its slope is the instantaneous velocity.
Shrink the interval below and watch the two readings converge.
Formalise
The derivative is the limit of the average rate of change as the interval shrinks to zero. Velocity is the derivative of position, and acceleration is the derivative of velocity, which makes it the second derivative of position. Going the other way, the area under a velocity-time graph, the integral, gives displacement.
Worked example
The curve in the diagram is . At , compare the average velocity over the next 2.5 s, 0.1 s and 0.01 s.
- Over 2.5 s. , so .
- Over 0.1 s. , so .
- Over 0.01 s. .
The averages settle on 2.9 m/s, the instantaneous velocity at 3 s.
Your turn
What does represent?
On a velocity-time graph, what does the integral, the area under the curve, give?
On a position-time graph, the tangent at a point is horizontal. What is the object doing at that instant?
Explain in words what means and give its SI unit.
Task 2 - The constant acceleration equations
Hook
A car brakes from 25 m/s with a constant deceleration. How far does it travel before it stops? You know the start speed, the end speed and the acceleration, but not the time. Is there an equation that skips the time completely?
Intuition
With constant acceleration, a velocity-time graph is a straight line from the initial velocity to the final velocity over a time . Its gradient is . The area underneath, a trapezium, is the displacement . Writing down the gradient and the area in different ways gives five equations linking the five quantities .
| Equation | Leaves out |
|---|---|
Formalise
The gradient of the line gives the first equation, and the area of the trapezium gives the second. Substituting one into the other produces the rest.
Worked example 1
The braking car. , , . Find the stopping distance and the time.
- Distance, which needs no time. , so .
- Time. , so .
Worked example 2
A ball is dropped from rest 20 m above the ground. Take down as positive, so .
- Time. , so .
- Landing speed. , so .
Your turn
You know , and and want . Which equation?
You know , and and want . Which equation?
You know , and and want . Which equation?
When are the SUVAT equations valid?
A car accelerates from 10 m/s at 2 m/s² for 5 s. Its final speed is m/s and it travels m.
A ball is thrown straight up at 15 m/s. It reaches a maximum height of m after s, both to 3 significant figures.
Task 3 - Vectors in two dimensions
Hook
A boat points straight across a river and motors at 4 m/s. The river flows sideways at 3 m/s. How fast is the boat actually moving, and in which direction?
Intuition
Any vector in a flat plane can be split into two perpendicular components, one along x and one along y. The vector is the diagonal of the rectangle they form. Splitting a vector is called resolving it, and it is what makes two-dimensional problems manageable. To add two vectors, either place them tip to tail, or simply add their x components and their y components separately.
Drag the tip of vector A below. Then switch to "Add a second vector" and drag the tip of B.
Formalise
For a vector of size at angle above the positive x axis.
Worked example
The boat. Take x as downstream and y as straight across.
- Components. , .
- Size. .
- Direction. from the bank, which is downstream of straight across.
Your turn
Give angles in degrees from the positive x axis.
A velocity of 10 m/s at 30° has components vx = m/s and vy = m/s, to 3 significant figures.
A vector with components (6, 8) has magnitude and direction °, to 3 significant figures.
Adding the vectors (2, 5) and (4, -1) gives (, ).
A force of 50 N at 150° has an x component of N, to 3 significant figures.
A vector points down and to the left. What are the signs of its components?
A calculator gives tan⁻¹(4 / -3) = -53.1°. The vector is (-3, 4). What is its true direction?
Task 4 - Projectile motion
Hook
At the same moment, one ball is fired horizontally from a table and another is simply dropped from the same height. Which lands first?
Intuition
They land together. Gravity acts only vertically, so it changes only the vertical velocity. Both balls start with zero vertical velocity and gain it at the same rate, so they fall the same distance in the same time. The fired ball also moves sideways, at a constant horizontal velocity, but that has no effect on how quickly it falls.
Fire the launcher below. The teal arrows show the horizontal velocity at regular times, and they never change. The red arrows show the vertical velocity, which shrinks to zero at the top and then grows downward. Try angles of 30° and 60°, and then find the angle that gives the longest range.
Formalise
Split the launch velocity at angle into and . Horizontally there is no acceleration. Vertically the acceleration is . For a launch and landing at the same height, setting gives the flight time, and the other results follow.
Worked example
A ball is launched at 20 m/s at 30° above level ground.
- Components. , .
- Flight time. .
- Range. .
- Maximum height. .
Because is largest at , the range on level ground is greatest at 45°. Angles that add to 90°, such as 30° and 60°, give the same range.
Your turn
In the hook, which ball lands first?
What happens to the horizontal velocity of a projectile during its flight, ignoring air resistance?
At the highest point of its flight, what is a projectile's acceleration?
A ball is thrown horizontally at 12 m/s from the top of a 20 m cliff. It takes s to land and lands m from the foot of the cliff, both to 3 significant figures.
Just before landing, its vertical speed is m/s and its total speed is m/s, both to 3 significant figures.
Task 5 - Designing a jump
Hook
A level designer wants the player character to jump exactly 3 m high, the height of three tiles, and to reach the top of the jump in 0.4 s so it feels snappy. What value of gravity, and what launch speed, does the game need?
Intuition
This is the SUVAT problem run backwards. Designers choose how high and how fast the jump should feel, and the physics then tells them what gravity and launch velocity to put in the code. At the top of the jump the vertical velocity is zero, which gives the extra piece of information needed.
Formalise
Taking up as positive, with at the apex, and , the equations and give the following.
Worked example
With and .
- Gravity. .
- Launch speed. .
That gravity is almost four times Earth's. Real people jumping 3 m would hang in the air for much longer, which feels floaty and slow in a game. Many platformers go further and use a larger gravity on the way down than on the way up, and cut the upward velocity when the jump button is released, so a tap gives a short hop and a hold gives a full jump.
Your turn
A jump should reach 4 m in 0.5 s. The game needs g = m/s² and a launch speed of m/s.
With that gravity and launch speed, the whole jump from take-off back to the ground lasts s.
In a game engine where screen y increases downward, how do the signs of gravity and the jump velocity change compared with the worked example?
Task 6 - Simulating a projectile frame by frame
A game does not use the projectile equations directly. It steps the motion forward in small time steps, the same frame-by-frame update from the Motion worksheet, now with two components. In this task you write that loop in C++ and compare it with the exact answer from Task 4.
Create a new Console App (C++) project in Visual Studio named Projectile, and replace the contents of the generated source file with the skeleton below, saved as Projectile.cpp. It uses only the standard library.
- Inside the loop, add
accelerationscaled bydttovelocity, for both components. - Then add the new
velocityscaled bydttoposition, for both components. Updating velocity before position is called semi-implicit Euler. - After
tandstepare advanced,breakout of the loop ifposition.yhas dropped below zero. - After the loop, calculate the analytic flight time and range using the formulas from Task 4 and print them next to the simulated values. You will need to keep a copy of the launch velocity before the loop changes it.
Success condition: with dt = 0.001 the program prints a table of positions every 0.1 s, and the simulated range is within 0.05 m of the analytic 35.3 m. Then change dt to 0.1, run it again, and record how far the range is off.
#include <cmath>
#include <iomanip>
#include <iostream>
struct Vec2
{
double x;
double y;
};
int main()
{
const double pi = 3.14159265358979;
const double g = 9.81;
const double speed = 20.0;
const double angleDegrees = 30.0;
const double dt = 0.001;
const double angle = angleDegrees * pi / 180.0;
Vec2 position{ 0.0, 0.0 };
Vec2 velocity{ speed * std::cos(angle), speed * std::sin(angle) };
const Vec2 acceleration{ 0.0, -g };
const int printEvery = static_cast<int>(std::round(0.1 / dt));
int step = 0;
double t = 0.0;
std::cout << std::fixed << std::setprecision(3);
std::cout << "t (s) x (m) y (m)\n";
while (t < 10.0)
{
if (step % printEvery == 0)
{
std::cout << t << " " << position.x << " " << position.y << "\n";
}
// TODO: add acceleration scaled by dt to velocity, both components
// TODO: add velocity scaled by dt to position, both components
t += dt;
step++;
// TODO: stop the loop once the projectile has dropped below y = 0
}
// TODO: calculate the analytic flight time T = 2 * uy / g and range
// R = ux * T from the launch velocity, then print them next to the
// simulated landing time t and landing distance position.x
return 0;
}
Why does the larger time step of 0.1 s give a less accurate landing point than 0.001 s?
Solution
Try the tasks above before revealing the solution.