III. Calculus
31. Definite integrals and their applications
The app computes a definite integral by the Newton–Leibniz formula (the fundamental theorem of calculus) and draws the area under the graph – the part above the x-axis in a different colour from the part below. It also handles improper integrals and applications: area, arc length, volume and surface area of a solid of revolution, also for curves given parametrically and in polar coordinates.
Definite integral
The app finds the antiderivative as for an indefinite integral and substitutes the limits. With a substitution it converts the limits right away. On an interval symmetric about zero it uses the symmetry: the odd part's integral is zero without any antiderivative, and √(r² − x²) is recognized as the area of a half disc. Without an elementary antiderivative it gives the exact form with a higher function (such as 2 Si(π)) and computes its number from a power series with an error estimate; where it finds no exact form, it computes the value numerically and says by which method.
Letters in the problem (∫ √(r² − x²) dx from −r to r) are positive parameters: the result is a formula (πr²/2), checked numerically for various values of the parameters, and the graph has a slider for each letter.
How to enter it
int(x^2, x, 0, 3) | An integral with the variable and the limits. |
\int_{0}^{\pi} \sin x\,dx | From a photo or in LaTeX. |
x^2 | A function with the “Integrate” chip – fill in the limits in the fields. |
Examples
int(3x^2 cos(x^3), x, 0, 1)


int((x^3*cos(x/2) + 1/2)*sqrt(4 - x^2), x, -2, 2)


int(sin(x)/x, x, -pi, pi)


int(sqrt(r^2-x^2), x, -r, r)


Improper integrals
The app handles an infinite limit or an unbounded function with a limit of the antiderivative and says whether the integral converges or diverges. If that limit cannot be computed, it decides by a comparison test.
Integrals ∫₀^∞ x^(s − 1) lnᵏx/(xⁿ + aⁿ)^m dx (0 < s < mn, k = 0 to 3) are computed exactly even without an antiderivative: as the k-th derivative with respect to s of the integral with a parameter I(s). The app finds I(s) by the substitution t = xⁿ/(xⁿ + aⁿ) via the beta function and the reflection formula (chip “Beta function”), or over a keyhole contour around the positive half-axis via residues (chip “Residues”). Where an antiderivative exists, the Newton–Leibniz formula stays the default (chip “Antiderivative”). The value is always checked numerically.
Another improper integral without an antiderivative is compared with 1/x^α at each end (an infinite limit or a point where the function grows beyond all bounds) by the limit comparison test. Only when it converges at every end does the app compute the value numerically (≈); a divergent integral is reported as divergent.
Examples
int(1/x^2, x, 1, oo)


int(1/sqrt(x), x, 0, 1)



int(x^3*ln(x)^2/(1+x^6), x, 0, oo)


int(x^3*ln(x)^2/(1+x^6), x, 0, oo) Residues


int(1/(x^3+ln(x)), x, 2, oo)


Area under a curve and between curves
The app computes the area between a graph and the x-axis, or between two curves, as the integral of the absolute value of the difference – parts above and below both count as positive. You don't have to enter the limits: it finds them as the intersections of the curves.
How to enter it
area(x^2, x) | The area between two curves, limits from the intersections. |
area(sin x, 0, pi) | The area between a curve and the x-axis on an interval. |
x^2 | A function with the “Integrate” chip → “Area between curves”; fill in the second curve and the limits in the fields. |
Examples
x^2 Area between curves, second curve x


Arc length
The app computes the length of a graph on an interval by the formula l = ∫√(1 + f′²) dx. It tries to simplify the root (for a semicircle it comes out as arcsine); where the integral has no elementary antiderivative, the result is numerical.
How to enter it
length(x^(3/2), 0, 4) | The arc length on an interval. |
Examples
sqrt(1 - x^2) Arc length, limits −1 and 1


Volume of a solid of revolution
The app computes the volume of a solid of revolution about the x-axis by the formula V = π∫f² dx (between two curves as washers), about the y-axis by the shell method. It also shows the solid in 3D – rotate it with your finger.
How to enter it
volume(sqrt(x), 0, 4) | The volume of the solid rotated about the x-axis. |
volume(x^2, 0, 2, y) | Rotation about the y-axis. |
Examples
sqrt(x) Volume of a solid, limits 0 and 4


Surface area of a solid of revolution
The app computes the lateral surface area by the formula S = 2π∫f√(1 + f′²) dx; the product under the root often simplifies (for a sphere it comes out constant).
How to enter it
surface(sqrt(4 - x^2), -2, 2) | The surface of the solid rotated about the x-axis. |
Examples
sqrt(4 - x^2) Surface of a solid, limits −2 and 2


Applications with parameters
Every letter except x is a positive parameter and the result is a formula, such as the sphere's volume 4πr³/3. Numeric checks run with values filled in. The graph and the 3D solid have a slider for each parameter.
How to enter it
objem(sqrt(r^2-x^2), -r, r) | The volume of a sphere of radius r. |
Examples
objem(sqrt(r^2-x^2), -r, r)


objem(a+(b-a)*x/h, 0, h)


Centroid
The centroid of a region under or between curves, of an arc and of a solid of revolution comes from integrals with all the steps and is marked in the graph. Letters work as parameters.
How to enter it
teziste(x^2, 0, 1) | A region under the curve; a second function gives a region between curves. |
teziste(sqrt(r^2-x^2), -r, r, oblouk) | The last word oblouk or teleso picks an arc or a solid of revolution. |
Examples
teziste(sqrt(r^2-x^2), -r, r)




teziste(r*x/h, 0, h, teleso)


Parametric curves and curves in polar coordinates
Write a curve x = φ(t), y = ψ(t) on two lines, a curve in polar coordinates as r = ρ(φ). The “Integrate” chip then offers the area, length, volume and surface; the limits of the parameter are optional (without them from 0 to 2π). The graph shades the region, and volume and surface appear as a 3D solid. Rotation is about the x- or y-axis; for the y-axis add y as the last argument.
How to enter it
x = t - sin(t) | A parametric curve on two lines. |
r = 1 + cos(phi) | A curve in polar coordinates (also r^2 = … for a lemniscate). |
length(x=cos(t)^3, y=sin(t)^3, t, 0, 2pi) | The written form with the parameter and the limits. |
Examples
x = t - sin(t)
y = 1 - cos(t) Area


r = 1 + cos(phi) Arc length


x = cos(t)^3
y = sin(t)^3




Curves given by an equation
For an equation in x and y (x³ + y³ = 3xy) the “Integrate” chip offers the area, the length, the volume and the surface. Without limits it takes the whole closed curve: a circle or an ellipse in parametric form by cos and sin, a loop through the origin (the folium of Descartes) by the lines y = tx – the loop’s area then exactly from the sectors, the length, volume and surface numerically. With limits in x it uses the upper branch y = f(x).
How to enter it
x^3 + y^3 = 3xy | A closed curve – the “Integrate” chip without limits. |
y^2 = x^3 | A curve that isn’t closed – the “Integrate” chip with limits in x (the upper branch y = x^(3/2)). |
Examples
x^3 + y^3 = 3xy Integrate → Area


(x^2+y^2)^2 = x^2-y^2


x^2+x*y+y^2 = 1




Known limitations
- The arc length of y = ∛x (and similar curves) is only computed numerically – it leads to an elliptic integral, which has no elementary antiderivative.
- Rotation about the y-axis only for a region on one side of the axis.
- A formula with parameters is given only where the result doesn't depend on how they compare; if the sign changes with their values, no formula is given.
- For implicit curves without limits: conics (even with an xy term), a loop through the origin and curves of two homogeneous parts (a lemniscate).
- A definite integral with a parameter only with finite limits so far.
- When the limit comparison test doesn't decide (the integrand oscillates at infinity, say cos x/(x + ln x)), the app gives no value without a proof of convergence and reports the integral as not solved yet.