Frictionlessbeta
beta

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 kWh312\text{ 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 FF is constant over a stretch Δx\Delta x, the work is W=F⋅ΔxW=F\cdot\Delta x. On an F(x)F(x) graph that is simply the area of a rectangle of height FF and width Δx\Delta x.

What if the force changes? Then we cut the stretch [x1; x2][x_1;\,x_2] into NN thin strips of width Δx\Delta x. Within one strip the force hardly changes, so its area is FiΔxF_i\Delta x. The area of the whole shape is approximately

F1Δx+F2Δx+⋯+FNΔxF_1\Delta x+F_2\Delta x+\dots+F_N\Delta 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=1NFi Δx\displaystyle\sum_{i=1}^{N}F_i\,\Delta x. The more strips (and so the smaller Δx\Delta x), the fewer “steps” are left along the curve. When N→∞N\to\infty and Δx→0\Delta x\to0, the sum Σ\Sigma “stretches” into an elongated S, the integral sign.

01234048121620x [m]F [N]Fi·Δx
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 NN and watch the staircase error vanish.

▶ SymulacjaSimulation: Riemann sum and the integral⚑︎
🎯 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
0123456024681012x [m]F [N]ab20406080100810121416NS_N [J]∫
Sum (N strips): ∑i=18F(xi) Δx=14 J\sum_{i=1}^{8}F(x_i)\,\Delta x=14\ \text{J}
Exact integral: ∫04F dx=16 J\int_{0}^{4}F\,\mathrm{d}x=16\ \text{J}
Staircase error: SN−∫=−2 JS_N-\int=-2\ \text{J} (-12.5%)
Unsigned area: ∫∣F∣ dx=16 J\int\lvert F\rvert\,\mathrm{d}x=16\ \text{J}
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−tv_x(t)=4-t (in m/s\text{m/s}) the body moves forward until t=4 st=4\text{ s} and then comes back. The integral from 00 to 8 s8\text{ s} is

Δx=∫08(4−t) dt=8⏟above the axis−8⏟below the axis=0 m\Delta x=\int_0^8(4-t)\,\mathrm{d}t=\underbrace{8}_{\text{above the axis}}-\underbrace{8}_{\text{below the axis}}=0\text{ m}

The body is back at the start, so the displacement is zero although it traveled 16 m16\text{ m}. You get the distance by adding the areas without sign: s=∫∣vx∣ dt=16 ms=\displaystyle\int\lvert v_x\rvert\,\mathrm{d}t=16\text{ m}.

012345678-5-4-3-2-1012345t [s]vx [m/s]+8 m−8 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)F(x) whose derivative is f(x)f(x) is called an antiderivative of ff.

abxF(x)F(a)F(b) − F(a)antiderivative: F′(x) = f(x)area under the graph of f from a to b= the rise of F from a to b
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) dsA(x)=\displaystyle\int_a^xf(s)\,\mathrm{d}s be the area from aa to xx. When xx grows by a small Δx\Delta x, the area grows by a thin strip: ΔA≈f(x) Δx\Delta A\approx f(x)\,\Delta x. Hence ΔAΔx→f(x)\dfrac{\Delta A}{\Delta x}\to f(x), i.e. A′(x)=f(x)A'(x)=f(x): the area AA is an antiderivative of ff. Any other antiderivative FF differs from AA only by a constant, and the difference F(b)−F(a)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:

4.The definite integral of f(x) from a to b is:

Score: 0 / 4

Problems

ZadanieExerciseŚrednieMedium

Problem 1 – a nonlinear spring. The force with which a nonlinear spring (e.g. with a rubber insert) resists stretching is F(x)=kx+βx3F(x)=kx+\beta x^3, where k=200 N/mk=200\text{ N/m} and β=2500 N/m3\beta=2500\text{ N/m}^3. Find the work needed to stretch it from 00 to 0.2 m0.2\text{ m}. What would the work be without the βx3\beta x^3 term?

J
Pokaż wskazówkęShow hint

Integrate term by term: ∫x dx=12x2\int x\,\mathrm{d}x=\tfrac12x^2 and ∫x3 dx=14x4\int x^3\,\mathrm{d}x=\tfrac14x^4. Plug in the upper limit 0.2 m0.2\text{ m} (the lower limit gives zero).

Rozwiązanie krok po krokuStep-by-step solution

W=∫00.2(kx+βx3) dx=12kx2+14βx4∣00.2W=\int_0^{0.2}(kx+\beta x^3)\,\mathrm{d}x=\frac12kx^2+\frac14\beta x^4\Big|_0^{0.2}

W=12⋅200⋅0.04+14⋅2500⋅0.0016=4+1=5 JW=\frac12\cdot200\cdot0.04+\frac14\cdot2500\cdot0.0016=4+1=5\text{ J}

Without the cubic term the work would be 4 J4\text{ J}. The extra term adds 1 J1\text{ J} because at large extensions the force grows faster than linearly.

ZadanieExerciseŁatweEasy

Problem 2 – a cart that turns around. The velocity of a cart on a straight track is vx(t)=6−2tv_x(t)=6-2t (in m/s\text{m/s}, tt from 00 to 5 s5\text{ s}). Find its displacement and the distance traveled. When does the cart turn around?

m
Pokaż wskazówkęShow hint

The displacement is ∫vx dt\int v_x\,\mathrm{d}t with sign. The cart turns around when vx=0v_x=0. Compute the distance separately for [0; tt][0;\,t_t] and [tt; 5][t_t;\,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\Delta x=\int_0^5(6-2t)\,\mathrm{d}t=\bigl[6t-t^2\bigr]_0^5=30-25=5\text{ m}

The cart turns around when 6−2t=06-2t=0, i.e. t=3 st=3\text{ s}. Until then x=18−9=9 mx=18-9=9\text{ m}, and then it moves back to 5 m5\text{ m}, i.e. by 4 m4\text{ m}:

s=9+4=13 ms=9+4=13\text{ m}

The distance (13 m13\text{ m}) is larger than the displacement (5 m5\text{ m}) because the cart turned around.

ZadanieExerciseŚrednieMedium

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)=12r2F(r)=\dfrac{12}{r^2} (in N\text{N}, rr in m\text{m}). Find the work when the sample is moved from r=1.5 mr=1.5\text{ m} to r=6 mr=6\text{ m}. How does the result change if we swap the limits?

J
Pokaż wskazówkęShow hint

The antiderivative of 12r2\dfrac{12}{r^2} is −12r-\dfrac{12}{r}. 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.5612r2 dr=[−12r]1.56=−2−(−8)=6 JW=\int_{1.5}^{6}\frac{12}{r^2}\,\mathrm{d}r=\Bigl[-\frac{12}{r}\Bigr]_{1.5}^{6}=-2-(-8)=6\text{ J}

After swapping the limits: ∫61.5=−6 J\displaystyle\int_6^{1.5}=-6\text{ J}. The integral changes sign because the displacement now points the other way, while the function F(r)F(r) is the same.

ZadanieExerciseŚrednieMedium

Problem 4 – electricity use over a day. The power of a heat pump changes during the day as P(t)=1.2+0.8sin⁡ ⁣(πt12)P(t)=1.2+0.8\sin\!\left(\dfrac{\pi t}{12}\right) (in kW\text{kW}, tt in hours from midnight). Find the energy drawn over the whole day (00–24 h24\text{ h}) and in the first 1212 hours.

kWh
Pokaż wskazówkęShow hint

The energy is ∫P dt\int P\,\mathrm{d}t. The antiderivative of the constant 1.21.2 is 1.2 t1.2\,t, and of sin⁡(ωt)\sin(\omega t) it is −1ωcos⁡(ωt)-\tfrac1\omega\cos(\omega t) with ω=π/12\omega=\pi/12.

Rozwiązanie krok po krokuStep-by-step solution

E=∫024P dt=[1.2 t−0.8⋅12πcos⁡πt12]024E=\int_0^{24}P\,\mathrm{d}t=\Bigl[1.2\,t-0.8\cdot\frac{12}{\pi}\cos\frac{\pi t}{12}\Bigr]_0^{24}

The cosine has the same value 11 at both ends (cos⁡0=cos⁡2π=1\cos0=\cos2\pi=1), so the sine part cancels: E=1.2⋅24=28.8 kWhE=1.2\cdot24=28.8\text{ kWh}.

For 00–12 h12\text{ h}: cos⁡π=−1\cos\pi=-1, so

E12=1.2⋅12+0.8⋅12π(1−(−1))=14.4+19.2π≈14.4+6.11=20.5 kWhE_{12}=1.2\cdot12+0.8\cdot\frac{12}{\pi}\bigl(1-(-1)\bigr)=14.4+\frac{19.2}{\pi}\approx14.4+6.11=20.5\text{ kWh}

In the first half of the day the pump draws more than in the second, because only then is the sine positive.

ZadanieExerciseTrudneHard

Problem 5 – how much error do the steps make? For F(r)=8r2F(r)=\dfrac{8}{r^2} (in N\text{N}) find the work from r=1 mr=1\text{ m} to r=3 mr=3\text{ m} in three ways: a) exactly, b) with a Riemann sum of N=4N=4 strips and left edges, c) with a Riemann sum of N=4N=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\Delta r=(3-1)/4=0.5\text{ m}. Left edges: r=1; 1.5; 2; 2.5r=1;\,1.5;\,2;\,2.5. Midpoints: r=1.25; 1.75; 2.25; 2.75r=1.25;\,1.75;\,2.25;\,2.75.

Rozwiązanie krok po krokuStep-by-step solution

a) W=[−8r]13=−83+8=163≈5.333 J\displaystyle W=\Bigl[-\frac8r\Bigr]_1^3=-\frac83+8=\frac{16}{3}\approx5.333\text{ J}.

b) Left edges: 8+3.556+2+1.28=14.848+3.556+2+1.28=14.84, so WL≈14.84⋅0.5=7.42 JW_L\approx14.84\cdot0.5=7.42\text{ J}. Relative error ≈+39%\approx+39\%.

c) Midpoints: 5.12+2.612+1.580+1.058=10.375.12+2.612+1.580+1.058=10.37, so WM≈10.37⋅0.5=5.19 JW_M\approx10.37\cdot0.5=5.19\text{ J}. Relative error ≈−2.8%\approx-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.

Coś się nie zgadza albo jest niejasne?Something wrong or unclear? ⚑︎ Zgłoś problemReport a problem