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\,dxFrom a photo or in LaTeX.
x^2A function with the “Integrate” chip – fill in the limits in the fields.

Examples

A substitution with the limits converted.
Input: int(3x^2 cos(x^3), x, 0, 1)
int(3x^2 cos(x^3), x, 0, 1)
int(3x^2 cos(x^3), x, 0, 1)int(3x^2 cos(x^3), x, 0, 1)
The odd part on a symmetric interval is zero, the rest is the area of a half disc – the result is π.
Input: int((x^3*cos(x/2) + 1/2)*sqrt(4 - x^2), x, -2, 2)
int((x^3*cos(x/2) + 1/2)*sqrt(4 - x^2), x, -2, 2)
int((x^3*cos(x/2) + 1/2)*sqrt(4 - x^2), x, -2, 2)int((x^3*cos(x/2) + 1/2)*sqrt(4 - x^2), x, -2, 2)
The antiderivative isn't elementary: exactly 2 Si(π), the value from a power series.
Input: int(sin(x)/x, x, -pi, pi)
int(sin(x)/x, x, -pi, pi)
int(sin(x)/x, x, -pi, pi)int(sin(x)/x, x, -pi, pi)
An integral with a parameter r – the area of a half-disc, πr²/2; the slider in the graph changes r.
Input: int(sqrt(r^2-x^2), x, -r, r)
int(sqrt(r^2-x^2), x, -r, r)
int(sqrt(r^2-x^2), x, -r, r)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

An infinite upper limit.
Input: int(1/x^2, x, 1, oo)
int(1/x^2, x, 1, oo)
int(1/x^2, x, 1, oo)int(1/x^2, x, 1, oo)
A function unbounded at the lower limit.
Input: int(1/sqrt(x), x, 0, 1)
int(1/sqrt(x), x, 0, 1)
int(1/sqrt(x), x, 0, 1)int(1/sqrt(x), x, 0, 1)int(1/sqrt(x), x, 0, 1)
∫₀^∞ x³ ln²x/(1 + x⁶) dx = I″(4) via the beta function – 5√3π³/972.
Input: int(x^3*ln(x)^2/(1+x^6), x, 0, oo)
int(x^3*ln(x)^2/(1+x^6), x, 0, oo)
int(x^3*ln(x)^2/(1+x^6), x, 0, oo)int(x^3*ln(x)^2/(1+x^6), x, 0, oo)
The same integral over a keyhole contour via residues.
Input: int(x^3*ln(x)^2/(1+x^6), x, 0, oo) Residues
int(x^3*ln(x)^2/(1+x^6), x, 0, oo)
int(x^3*ln(x)^2/(1+x^6), x, 0, oo)int(x^3*ln(x)^2/(1+x^6), x, 0, oo)
No antiderivative: convergence by comparison with 1/x³, then the value numerically.
Input: int(1/(x^3+ln(x)), x, 2, oo)
int(1/(x^3+ln(x)), x, 2, oo)
int(1/(x^3+ln(x)), x, 2, oo)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^2A function with the “Integrate” chip → “Area between curves”; fill in the second curve and the limits in the fields.

Examples

The area between a parabola and a line.
Input: x^2 Area between curves, second curve x
x^2
x^2x^2

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

The length of a semicircle.
Input: sqrt(1 - x^2) Arc length, limits −1 and 1
sqrt(1 - x^2)
sqrt(1 - x^2)sqrt(1 - x^2)

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

A paraboloid of revolution.
Input: sqrt(x) Volume of a solid, limits 0 and 4
sqrt(x)
sqrt(x)sqrt(x)

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

The surface of a sphere of radius 2.
Input: sqrt(4 - x^2) Surface of a solid, limits −2 and 2
sqrt(4 - x^2)
sqrt(4 - x^2)sqrt(4 - x^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

The volume of a sphere of radius r.
Input: objem(sqrt(r^2-x^2), -r, r)
objem(sqrt(r^2-x^2), -r, r)
objem(sqrt(r^2-x^2), -r, r)objem(sqrt(r^2-x^2), -r, r)
A frustum with radii a, b and height h.
Input: objem(a+(b-a)*x/h, 0, h)
objem(a+(b-a)*x/h, 0, h)
objem(a+(b-a)*x/h, 0, h)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

The centroid of a half-disc, 4r/(3π).
Input: teziste(sqrt(r^2-x^2), -r, r)
teziste(sqrt(r^2-x^2), -r, r)
teziste(sqrt(r^2-x^2), -r, r)teziste(sqrt(r^2-x^2), -r, r)teziste(sqrt(r^2-x^2), -r, r)teziste(sqrt(r^2-x^2), -r, r)
A cone's centroid, 3/4 of the height from the apex.
Input: teziste(r*x/h, 0, h, teleso)
teziste(r*x/h, 0, h, teleso)
teziste(r*x/h, 0, h, teleso)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)
y = 1 - cos(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

The area under an arch of a cycloid.
Input: x = t - sin(t)
y = 1 - cos(t)
Area
x = t - sin(t)
y = 1 - cos(t)
x = t - sin(t)
y = 1 - cos(t)x = t - sin(t)
y = 1 - cos(t)
The length of a cardioid.
Input: r = 1 + cos(phi) Arc length
r = 1 + cos(phi)
r = 1 + cos(phi)r = 1 + cos(phi)
An astroid rotated about the y-axis.
Input: x = cos(t)^3
y = sin(t)^3
x = cos(t)^3
y = sin(t)^3
x = cos(t)^3
y = sin(t)^3x = cos(t)^3
y = sin(t)^3x = cos(t)^3
y = sin(t)^3x = 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 = 3xyA closed curve – the “Integrate” chip without limits.
y^2 = x^3A curve that isn’t closed – the “Integrate” chip with limits in x (the upper branch y = x^(3/2)).

Examples

The area of the folium’s loop – by the lines y = tx and the sectors, S = 3/2.
Input: x^3 + y^3 = 3xy Integrate → Area
x^3 + y^3 = 3xy
x^3 + y^3 = 3xyx^3 + y^3 = 3xy
The area of a lemniscate, by polar coordinates.
Input: (x^2+y^2)^2 = x^2-y^2
(x^2+y^2)^2 = x^2-y^2
(x^2+y^2)^2 = x^2-y^2(x^2+y^2)^2 = x^2-y^2
A rotated ellipse with an xy term.
Input: x^2+x*y+y^2 = 1
x^2+x*y+y^2 = 1
x^2+x*y+y^2 = 1x^2+x*y+y^2 = 1x^2+x*y+y^2 = 1x^2+x*y+y^2 = 1

Known limitations