Line Integrals
Line Integral Paths
Draw the path of a scalar or vector line integral, with direction arrows. A vector integral can also show the field.
Generate Graph draws line_integral(x+y,(t,t),t,0,1) as the segment from (0, 0) to (1, 1). Direction arrows follow the parameter from 0 to 1, and the caption reports sqrt(2). The path is the highlighted curve on the existing board. Zoom, pan, and export stay on that board.
line_integral((y,x),(t,t),t,0,1) uses the same segment and adds a Vector field button, because the integral is F·dr and equals 1. line_integral((-y,x),(cos(t),sin(t)),t,0,2*pi) draws the unit circle with counterclockwise arrows and equals 2*pi. A 3D path uses the existing space-curve viewer. The field overlay is optional and does not start a second renderer.
Equation
line_integral(x+y,(t,t),t,0,1)
Graph preview
How a line integral is formed
A scalar line integral adds f times arc length along a path. If the path is r(t), the element is ds = ||r'(t)|| dt, and the integral runs from the lower parameter to the upper one after those bounds are ordered. Reversing the bounds does not change the value, because speed is positive. A vector line integral instead adds F(r(t)) · r'(t) dt. That dot product keeps the direction, so traversing the path backward changes the sign. The same line_integral command chooses the scalar form when the first argument is a scalar and the vector form when the first argument is a tuple (P, Q) or (P, Q, R).
The path may be written as (x(t), y(t)) or (x(t), y(t), z(t)). The older flat form, with each component as its own argument, still uses the same calculation. An exact antiderivative is preferred. When symbolic integration does not finish, one adaptive quadrature is accepted only if its estimated error is small, and the steps say the value is numerical. A divergent integral, a singularity on the interval, a zero-length parameter interval, or a path whose derivative is identically zero is reported as an error rather than as a number. The path is drawn with direction arrows. A vector integral can also show the field.
Reading the input
line_integral(x+y,(t,t),t,0,1)— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Other versions of this example
These stay on this page so each version keeps the same explanation. Choose Try example to run a version in its Studio workflow, or copy it into the editable field below.
Scalar segment
Expected value sqrt(2). The path is the segment from (0, 0) to (1, 1), and ds uses the speed sqrt(2).
line_integral(x+y,(t,t),t,0,1)
Vector segment
Expected value 1. This is the circulation form F·dr, so reversing the bounds changes the sign.
line_integral((y,x),(t,t),t,0,1)
Unit circle
Expected value 2*pi. The arrows follow the counterclockwise orientation.
line_integral((-y,x),(cos(t),sin(t)),t,0,2*pi)
Try a change
- Reverse the parameter bounds on line_integral((y, x), (t, t), t, 0, 1). The vector value changes sign. The scalar line_integral(x+y, (t, t), t, 0, 1) stays sqrt(2).
- After Generate Graph, use Vector field on a vector integral. The extra arrows sample F around the highlighted path. Direction arrows stay on the path.
- Try line_integral(1/x, (t, 0), t, -1, 1). The integrand is singular at t = 0, so the result says the integral does not converge.
Generate Graph draws the integration path on the 2D board, or as a space curve in the existing 3D viewer, and highlights it with direction arrows. A vector integral can overlay the field. Zoom, pan, and the board export stay available. A 3D curve uses the viewer orbit. GLB export follows the existing surface path and is not offered for a bare space curve.