Line Integral Calculator
Free line integral calculator for scalar fields (∫f ds) and vector fields (∫F·dr). Enter a parametrised curve and get the value, plus the arc length of the curve, with worked examples.
Compute ∫f ds along a curve, or the work ∫F·dr done by a vector field. Give the curve as x(t), y(t) and z(t) with a range for t, and the calculator handles the differentiation and integration — reporting the arc length too.
Example: x+y, x^2*y, sqrt(x^2+y^2). Use f = 1 to get arc length.
Curve C: r(t) = (x(t), y(t), z(t))
Leave z(t) as 0 for a plane curve
How to compute a line integral
- 1
Parametrise the curve
Express x, y and z as functions of a single parameter t, and note the range of t.
- 2
Differentiate
Find r′(t). For a scalar integral you need its magnitude |r′(t)|; for a vector integral you need the components.
- 3
Substitute the field
Replace x, y and z in the field by their expressions in t, so everything becomes a function of t alone.
- 4
Integrate over t
Evaluate the resulting single integral between the parameter limits.
The two formulas
Scalar field
∫₃ f ds = ∫ᵤᵛ f(r(t))·|r′(t)| dt
The factor |r′(t)| is the speed along the curve; it converts a step in t into a step of arc length. Independent of direction, so reversing the curve changes nothing.
Vector field
∫₃ F·dr = ∫ᵤᵛ F(r(t))·r′(t) dt
This is work in physics: only the component of F along the direction of travel counts. Reversing the curve negates the answer.
Common parametrisations
| Curve | r(t) | Range |
|---|---|---|
| Circle, radius R | (R cos t, R sin t) | 0 to 2π |
| Segment A to B | (A + t(B − A)) | 0 to 1 |
| Parabola y = x² | (t, t²) | over the x-range |
| Helix | (cos t, sin t, t) | 0 to 2π per turn |
| Ellipse | (a cos t, b sin t) | 0 to 2π |
| Graph y = f(x) | (t, f(t)) | over the x-range |
Worked line integrals
Frequently asked questions
What is a line integral? ▾
A line integral adds up the values of a field along a curve rather than over an interval. For a scalar field it weights each bit of arc length ds by the field's value there; for a vector field it accumulates the component of the field pointing along the curve.
What is the difference between ∫f ds and ∫F·dr? ▾
∫f ds integrates a scalar function against arc length and does not depend on the direction you travel. ∫F·dr integrates a vector field against the direction of travel, so reversing the curve flips its sign. The first measures something like total mass along a wire; the second measures work.
How do you parametrise a curve? ▾
Write each coordinate as a function of one parameter t over an interval. A circle of radius R is x = R cos t, y = R sin t for t from 0 to 2π; a straight segment from A to B is r(t) = A + t(B − A) for t from 0 to 1.
What does it mean for a line integral to be path independent? ▾
It means the value depends only on the endpoints, not the route. That happens exactly when the vector field is conservative — when it is the gradient of some potential function. For such a field, every closed-loop integral is zero.
How do I compute arc length with this calculator? ▾
Choose the scalar field mode and set f = 1. The integral ∫1 ds is precisely the arc length. The calculator also reports the arc length alongside every result.
How does Green's theorem relate to line integrals? ▾
Green's theorem converts a closed line integral in the plane into a double integral over the enclosed region: ∮(P dx + Q dy) = ∬(∂Q/∂x − ∂P/∂y) dA. It is often much quicker than parametrising the boundary.
About this Calculator
Free line integral calculator for scalar fields (∫f ds) and vector fields (∫F·dr). Enter a parametrised curve and get the value, plus the arc length of the curve, with worked examples.