To wczesna wersja strony: treści i symulacje wciąż się zmieniają, a niektóre mogą mieć błędy.This is an early version of the site: lessons and simulations are still changing, and some may contain mistakes.Zgłoś problemReport a problem
The Definite Integral in Physics
The electricity meter at home shows one number, say 312 kWh per month, although the power of the appliances changes every second: the fridge switches on, the kettle heats for a minute, and at night we draw almost nothing. How do we get one total from a constantly changing power? We have to add up the contributions of very many very short moments. The mathematics of this adding is called the definite integral.
Co musisz umieć?What you need to know(1)(matematyka szkolnaschool maths: 1 · akademickauniversity: 2)
Matematyka, poziom szkolny (algebra, trygonometria, składowe wektorów)Maths, school level (algebra, trigonometry, vector components)
współczynnik kierunkowyslopeNachylenie prostej a = Δy/Δx. W fizyce ma jednostkę (jednostka y podzielona przez jednostkę x), np. m/s.The steepness of a line, a = Δy/Δx. In physics it has a unit (unit of y divided by unit of x), e.g. m/s.Dowiedz się więcej →Learn more →
Matematyka, poziom akademicki (pochodne, całki, iloczyny wektorowe, gradient)Maths, university level (derivatives, integrals, cross products, gradient)
pochodnaderivativeChwilowe tempo zmian wielkości: granica ilorazu Δx/Δt, gdy Δt dąży do zera. Graficznie: nachylenie stycznej do wykresu.The instantaneous rate of change of a quantity: the limit of Δx/Δt as Δt tends to zero. Graphically: the slope of the tangent to the graph.Dowiedz się więcej →Learn more →
zapis sumacyjny Σsummation notation ΣSkrót do dodawania wielu wyrazów: Σ od i = 1 do n z aᵢ to a₁ + a₂ + … + aₙ. To ta sama litera Σ, co na przycisku „Σ Wzory”.A shorthand for adding many terms: the sum from i = 1 to n of aᵢ means a₁ + a₂ + … + aₙ. It is the same letter Σ as on the “Σ Formulas” button.Dowiedz się więcej →Learn more →
Najedź na pojęcie, żeby zobaczyć krótką definicję, albo kliknij „Dowiedz się więcej”.Hover a term for a short definition, or click “Learn more”.
1. The area under a graph as a sum of strips
Let us start with a case you already know. If the force F is constant over a stretch Δx, the work is W=F⋅Δx. On an F(x) graph that is simply the area of a rectangle of height F and width Δx.
What if the force changes? Then we cut the stretch [x1;x2] into N thin strips of width Δx. Within one strip the force hardly changes, so its area is FiΔx. The area of the whole shape is approximately
F1Δx+F2Δx+⋯+FNΔx
The summation notationSkrót do dodawania wielu wyrazów: Σ od i = 1 do n z aᵢ to a₁ + a₂ + … + aₙ. To ta sama litera Σ, co na przycisku „Σ Wzory”.A shorthand for adding many terms: the sum from i = 1 to n of aᵢ means a₁ + a₂ + … + aₙ. It is the same letter Σ as on the “Σ Formulas” button.Dowiedz się więcej →Learn more → from the previous lesson shortens this to i=1∑NFiΔx. The more strips (and so the smaller Δx), the fewer “steps” are left along the curve. When N→∞ and Δx→0, the sum Σ “stretches” into an elongated S, the integral sign.
Eight strips of width Δx = 0.5 m. One strip has area Fᵢ·Δx, and the sum of the strips approximates the area under the curve. “Steps” remain between the strips and the curve, and they vanish as the strips get narrower.
In the lab, change the number of strips N and watch the staircase error vanish.
▶ SymulacjaSimulation: Riemann sum and the integralSpacja: start/pauza · R: resetSpace: start/pause · R: reset⚑︎
🎯 What question does this simulation answer? How do we turn “the area under a graph” into a number, and why is the definite integral the limit of strip sums as the strips multiply?
🧪 Try these in turn:
▶ Drag the N slider (number of strips) and the bounds a, b.
🎨 Legend:■ strip above the axis (positive)■ strip below the axis (negative)■ exact area (the integral)■ the function graph
▶ Right now: You cut the interval [0; 4] into N = 8 strips of width 0.5 and add their areas: S = 14 J. The exact integral is 16 J, so the error is -2 J.
⚙ More settings: where to take the strip height
■■Sum (N strips):∑i=18F(xi)Δx=14J
■Exact integral:∫04Fdx=16J
Staircase error:SN−∫=−2J (-12.5%)
Unsigned area:∫∣F∣dx=16J
The rectangles (green above the axis, pink below it) are the sum of strips. The light-blue background is the exact area. The plot on the right shows the sum approaching the integral as N grows.
2. Signed area: displacement versus distance
When a function changes sign, some strips lie below the axis and contribute negatively. For the velocity vx(t)=4−t (in m/s) the body moves forward until t=4 s and then comes back. The integral from 0 to 8 s is
Δx=∫08(4−t)dt=above the axis8−below the axis8=0 m
The body is back at the start, so the displacement is zero although it traveled 16 m. You get the distance by adding the areas without sign: s=∫∣vx∣dt=16 m.
The areas above the axis (+8 m) and below it (−8 m) cancel, so the displacement is 0 m. The distance is the sum of the areas without signs: 16 m.
3. How to compute in practice: the antiderivative
Counting strips with a limit is tedious. Fortunately there is a shortcut, because integrating is undoing differentiation. A function F(x) whose derivative is f(x) is called an antiderivative of f.
The definite integral of f is the difference in height on the graph of the antiderivative: how much F has risen between a and b. A constant added to F shifts the whole graph up or down, but does not change this difference.✦ Dla ciekawych (poziom akademicki, można pominąć)For the curious (university level, can be skipped) · why integrating undoes differentiating
Let A(x)=∫axf(s)ds be the area from a to x. When x grows by a small Δx, the area grows by a thin strip: ΔA≈f(x)Δx. Hence ΔxΔA→f(x), i.e. A′(x)=f(x): the area A is an antiderivative of f. Any other antiderivative F differs from A only by a constant, and the difference F(b)−F(a) cancels the constant.
4. Pitfalls in integrating
Quiz: test yourself
1.The signed area under a force graph F(x) between x₁ and x₂ means:
2.What is the integral from 0 to 3 of 2t dt?
3.On a v(t) graph the area above the axis is 12 m and below the axis 12 m. The displacement and distance are:
Problem 1 – a nonlinear spring. The force with which a nonlinear spring (e.g. with a rubber insert) resists stretching is F(x)=kx+βx3, where k=200 N/m and β=2500 N/m3. Find the work needed to stretch it from 0 to 0.2 m. What would the work be without the βx3 term?
J
Pokaż wskazówkęShow hint
Integrate term by term: ∫xdx=21x2 and ∫x3dx=41x4. Plug in the upper limit 0.2 m (the lower limit gives zero).
Rozwiązanie krok po krokuStep-by-step solution
W=∫00.2(kx+βx3)dx=21kx2+41βx400.2
W=21⋅200⋅0.04+41⋅2500⋅0.0016=4+1=5 J
Without the cubic term the work would be 4 J. The extra term adds 1 J because at large extensions the force grows faster than linearly.
Problem 2 – a cart that turns around. The velocity of a cart on a straight track is vx(t)=6−2t (in m/s,t from 0 to 5 s). Find its displacement and the distance traveled. When does the cart turn around?
m
Pokaż wskazówkęShow hint
The displacement is ∫vxdt with sign. The cart turns around when vx=0. Compute the distance separately for [0;tt] and [tt;5] and add the absolute values.
Rozwiązanie krok po krokuStep-by-step solution
Δx=∫05(6−2t)dt=[6t−t2]05=30−25=5 m
The cart turns around when 6−2t=0, i.e. t=3 s. Until then x=18−9=9 m, and then it moves back to 5 m, i.e. by 4 m:
s=9+4=13 m
The distance (13 m) is larger than the displacement (5 m) because the cart turned around.
Problem 3 – a sample in a source’s field. A small sample is in a field where the external force needed to move it slowly is F(r)=r212 (in N,r in m). Find the work when the sample is moved from r=1.5 m to r=6 m. How does the result change if we swap the limits?
J
Pokaż wskazówkęShow hint
The antiderivative of r212 is −r12. Plug in the upper limit and subtract the value for the lower one. Swapping the limits changes the sign of the integral.
Rozwiązanie krok po krokuStep-by-step solution
W=∫1.56r212dr=[−r12]1.56=−2−(−8)=6 J
After swapping the limits: ∫61.5=−6 J. The integral changes sign because the displacement now points the other way, while the function F(r) is the same.
Problem 4 – electricity use over a day. The power of a heat pump changes during the day as P(t)=1.2+0.8sin(12πt) (in kW,t in hours from midnight). Find the energy drawn over the whole day (0–24 h) and in the first 12 hours.
kWh
Pokaż wskazówkęShow hint
The energy is ∫Pdt. The antiderivative of the constant 1.2 is 1.2t, and of sin(ωt) it is −ω1cos(ωt) with ω=π/12.
Rozwiązanie krok po krokuStep-by-step solution
E=∫024Pdt=[1.2t−0.8⋅π12cos12πt]024
The cosine has the same value 1 at both ends (cos0=cos2π=1), so the sine part cancels: E=1.2⋅24=28.8 kWh.
Problem 5 – how much error do the steps make? For F(r)=r28 (in N) find the work from r=1 m to r=3 m in three ways: a) exactly, b) with a Riemann sum of N=4 strips and left edges, c) with a Riemann sum of N=4 strips and midpoints. Which relative error is smaller and why?
J
Pokaż wskazówkęShow hint
The strip width is Δr=(3−1)/4=0.5 m. Left edges: r=1;1.5;2;2.5. Midpoints: r=1.25;1.75;2.25;2.75.
Rozwiązanie krok po krokuStep-by-step solution
a)W=[−r8]13=−38+8=316≈5.333 J.
b) Left edges: 8+3.556+2+1.28=14.84, so WL≈14.84⋅0.5=7.42 J. Relative error ≈+39%.
c) Midpoints: 5.12+2.612+1.580+1.058=10.37, so WM≈10.37⋅0.5=5.19 J. Relative error ≈−2.8%.
The function decreases, so the left edge is always above the curve (it overestimates the area) and the right edge below it (it underestimates). The midpoint lies in between and the errors on both sides of the strip largely cancel, so it is much more accurate for the same number of strips.