III. Calculus
28. Functions of several variables
Partial derivatives (first and second, mixed) and the gradient of a function of two or three variables – differentiating by one variable, the others are constants.
Local extrema of a function of two variables: the stationary points from f_x = 0, f_y = 0, each decided by the Hessian’s determinant D = f_xx·f_yy − f_xy² (a minimum, a maximum, a saddle). Constrained extrema with one constraint (“extrema of xy, x + y = 1”) by Lagrange’s method and the bordered Hessian.
The directional derivative (the gradient times a unit vector), the total differential with an approximate value and a surface’s tangent plane. A double integral is entered by iterated limits or as a region of inequalities; the app splits the region into normal parts, shows the inner and the outer integral and draws the region; the 3D switch shows the integrand’s surface over it. The chips below the result change the order of integration and switch to polar coordinates.
Vector analysis: the divergence, the curl (for a plane field a single number ∂Q/∂x − ∂P/∂y), the Laplacian and the potential of a conservative field – the app first checks the curl is zero, then finds φ by integrating the components one by one and checks ∇φ = F. A field is entered as a vector (P; Q; R) or (P; Q), also with the unit vectors i, j, k or named “F = …” on a line of its own. For a plane field the graph shows the field's arrows and the potential's level curves. Chips below the result switch between the divergence, curl and potential of the same field.
Line integrals: of the first kind ∫_C f ds (a curve's length, a wire's mass) and of the second kind ∫_C F·dr (the work of a force, a circulation ∮ around a closed curve). The curve is given by a parametrization r(t) or a preset – a segment, a circle, a graph y = f(x), a polyline; the steps show the tangent vector, the substitution into the field and the integral in t. For a conservative field the app checks the result by the potential φ(B) − φ(A) (path independence), for a closed plane curve (a circle, an ellipse, a convex polygon) by Green's theorem – it also computes the double integral over the region inside. Chips below the result switch which way is the main one. The “Line integral” form (the “Applications” section, the Multivariable calculus field) offers the curve's presets; the graph shows the curve with its orientation over the field's arrows and Green's region, a space curve in 3D, turned by a finger.
Triple integrals: by iterated limits, over a solid of inequalities (∭_V, from a photo too) or with the “Triple integral” form (the “Applications” section, the Multivariable calculus field) with the presets box, ball, cylinder, cone, solid between graphs and inequalities. The app describes the solid as a normal region – the innermost variable between two surfaces over the projection – and computes three integrals one after another (Fubini's theorem). In cylindrical and spherical coordinates it shows the substitution with the Jacobian (r, ρ² sin θ) and the limits in the new variables; when Cartesian coordinates give no exact result, it switches to them by itself, and for a ball, a cylinder or x² + y² in the problem a chip offers them. The form also computes the volume, the mass with a density ρ, the centroid and the moment of inertia about an axis. A rotatable 3D graph shows the solid.
Letters other than x, y, z (a radius r, a height h, edges a, b, c) are positive parameters: the result is a formula, such as V = 4/3 πr³ for the ball ball(r) – beside the radius r the cylindrical coordinate is written ϱ – or V = abc for a box. The app checks the formula numerically for several values of the parameters; the 3D picture of the solid is drawn for the value 1.
Surface integrals: of the first kind ∬_S f dS (a surface’s area, a shell’s mass) and of the second kind – the flux ∬_S F·n dS. The surface is given by a preset – a graph z = g(x, y) over a region D, a sphere, a hemisphere, a cylinder, a cone (the whole surface with its discs, or the lateral surface alone) – or by a parametrization r(u, v). The steps show the tangent vectors r_u, r_v, the normal vector r_u × r_v with its orientation (outward for a closed surface, up for a graph, by the parametrization otherwise; outward, inward, up, down to choose), the surface element and the double integral over the parameters; a closed surface is added up from its parts. The flux through a closed surface is checked by Gauss’s theorem (the triple integral of the divergence), the flux of a curl by Stokes’ theorem – the line integral around the boundary; chips under the result switch the main way. The form “Surface integral” (the “Applications” section, the field Multivariable calculus) offers the surfaces’ presets; a rotatable 3D graph shows the surface with its normals, the field’s arrows and the boundary.
Wires and shells: the line and surface integral forms (the “What to compute” choice) and the notation quantity=mass / centroid / inertia compute the mass of a wire or a shell with a density f (empty = 1), its centroid and its moment of inertia about an axis (axis=x, y, z). The planimeter lineint(area; C) computes the area inside a closed plane curve as ½∮ x dy − y dx and checks it by Green's theorem.
How to enter it
partial derivatives x^2 y + y^3 | All first partial derivatives (with “second” the second ones). |
∂/∂x (x^2 y + y^3) | One partial derivative (also \frac{\partial}{\partial x}). |
gradient x^2 y + y^3 | The gradient. |
extrema of x^2 + y^2 - 2x + 4y | Local extrema of a function of two variables. |
extrema of xy, x + y = 1 | Constrained extrema – the function and the constraint after a comma. |
directional(x^2 y; [1; 2]; (3; 4)) | Directional derivative: the function, the point, the direction (also in words). |
totaldiff(x^2 y; [1; 2]; h=0.1 0.2) | Total differential; the point and the increments h are optional (also in words). |
tangentplane(z = x^2 + y^2; [1; 2]) | Tangent plane at a point, for z = f(x, y) or F(x, y, z) = 0 (also in words). |
∫_0^1 ∫_0^x x y dy dx | A double integral by iterated limits (also \int_0^1 dx \int_0^x ... dy). |
iint(x y; 0 <= x <= 1; 0 <= y <= x) | A double integral over a region of inequalities (also \iint_D ..., D: ...); you may add order=dxdy or polar. |
div(x y; y z; z x) | The divergence of a field (also ∇·F, \nabla \cdot, \operatorname{div}, in words “divergence”). |
∇×(y z; x z; x y) | The curl (also rot, curl, \nabla \times); for a field (P; Q) a single number. |
Δ(x^2 y + y^3) | The Laplacian of a function of two or three variables (also laplace(...), ∇², \Delta). |
potential (2x + y; x + 2y) | The potential of a conservative field (also potential(...)); the field may be named: “div F, F = (y; x; 0)”. |
lineint((y; -x); circle([0; 0]; 1)) | A line integral – a field (P; Q) or a function f, then the curve: r(t) = (…); t = a..b, segment(A; B), circle(S; r), graph(y = …; x = a..b), polyline(A; B; …); also cw (clockwise), method=green / method=potential (also in words “line integral … along …”). After the curve also quantity=mass / centroid / inertia (with axis=…); area instead of the function computes the area inside a closed curve. |
lineint(1; circle([0; 0]; 2); quantity=mass) | A wire's mass with the density f, quantity=centroid its centroid, quantity=inertia its moment of inertia (axis=x, y, z). |
lineint(area; polyline([0; 0]; [2; 0]; [2; 1]; [0; 1]; [0; 0])) | The planimeter – the area inside a closed plane curve from the integral around its boundary (Green's theorem). |
\oint_C x^2 y \, dx + x \, dy, C: x^2 + y^2 = 1 | From a photo ∮_C or ∫_C with P dx + Q dy, F·dr or f ds; the curve after a comma or on the next line (C: …). |
\int_C x y \, ds, C: x = \cos t, y = \sin t, 0 \le t \le \pi/2 | An integral of the first kind – the curve parametrically with the parameter's range (also t ∈ [a, b]). |
tint(z; x^2 + y^2 + z^2 <= 4; z >= 0; sph) | A triple integral – the function, then the solid by inequalities or a preset ball(R), ball(R; a; b; c), cylinder(R; h), cylinder(R; h1; h2), cone(R; h); coordinates cart, cyl, sph, the order order=dzdydx, quantity=volume / mass / centroid / inertia (with axis=x). In words “triple integral of z over V: …”, “volume of the solid …”, “mass of the solid … with density …”, “centroid of the solid …”, “moment of inertia of the solid … about the z-axis”. |
\iiint_V z \, dV, V: x^2 + y^2 + z^2 \le 4, z \ge 0 | From a photo ∭ (\iiint_V) with dV or dx dy dz; the solid after a comma (V: …) or under the integral. |
\int_0^1 \int_0^{1-x} \int_0^{1-x-y} x \, dz \, dy \, dx | By iterated limits – three integrals in a row, the differentials at the end or right after their integral. |
surfint((x; y; z); cylinder(1; 2)) | A surface integral – a function f, a field (P; Q; R) or curl(P; Q; R), then the surface: graph(z = …; inequalities of D), sphere(R), sphere(R; a; b; c), hemisphere(R), cylinder(R; h), cylinder(R; h1; h2), cone(R; h), r(u, v) = (…); u = a..b; v = c..d; lateral (the lateral surface alone), closed (a hemisphere with its base), outward / inward / up / down, method=gauss / method=stokes. In words “surface integral of … over …”, “flux of … through …”. With a function f also quantity=mass / centroid / inertia (with axis=…). |
\oiint_S \vec{F} \cdot d\vec{S}, \vec{F} = (x^2, y^2, z^2), S: x^2 + y^2 + z^2 = 1 | From a photo ∬_S or ∯_S with f dS, F·dS or F·n dS; the surface after a comma or on the next line: S: x² + y² + z² = R² (with z ≥ 0 a hemisphere), x² + y² = R² with bounds of z (a cylinder’s lateral surface), z = g(x, y) with inequalities, r(u, v) with the parameters’ ranges. |
\iint_S (\nabla \times \vec{F}) \cdot \vec{n} \, dS, \vec{F} = (y, -x, z), S: z = 4 - x^2 - y^2, z \ge 0 | The flux of a curl (∇ × F, rot F, curl F) – the field named apart; checked by Stokes’ theorem. |
surfint(1; sphere(1); quantity=inertia; axis=z) | A shell's mass, centroid or moment of inertia with the surface density f. |
Examples
second partial derivatives x^2 y + y^3


extrema of x^3 - 3xy + y^3


extrema of xy, x + y = 1


directional(x^2 y; [1; 2]; (3; 4))![directional(x^2 y; [1; 2]; (3; 4))](img/mv-directional.png)
![directional(x^2 y; [1; 2]; (3; 4))](img/mv-directional-1.png)
![directional(x^2 y; [1; 2]; (3; 4))](img/mv-directional-2.png)
tangentplane(z = x^2 + y^2; [1; 2])![tangentplane(z = x^2 + y^2; [1; 2])](img/mv-plane.png)
![tangentplane(z = x^2 + y^2; [1; 2])](img/mv-plane-1.png)
![tangentplane(z = x^2 + y^2; [1; 2])](img/mv-plane-2.png)
∫_0^1 ∫_0^x x y dy dx


∫_0^1 ∫_x^1 e^(y^2) dy dx


iint(x^2 + y^2; x^2 + y^2 <= 1; x >= 0; y >= 0; polar)


div(x y; y z; z x)
rot(-y; x)


Δ(x^2 - y^2)


potential(2x y; x^2)


lineint((2x y; x^2); r(t) = (t; t^3); t = 0..1)


\oint_C x^2 y \, dx + x \, dy, C: x^2 + y^2 = 1


lineint(1; graph(y = x^2; x = 0..1))


lineint((-y; x; z); r(t) = (cos t; sin t; t); t = 0..2π)


lineint(1; r(t) = (cos t; sin t); t = 0..π; quantity=centroid)


lineint(area; r(t) = (3 cos t; 2 sin t); t = 0..2π)


tint(z; x^2 + y^2 + z^2 <= 4; z >= 0; sph)


\int_0^1 \int_0^{1-x} \int_0^{1-x-y} x \, dz \, dy \, dx


tint(1; cone(1; 2); cyl; quantity=volume)


tint(1; x^2 + y^2 + z^2 <= 1; z >= 0; quantity=centroid)


tint(1; cylinder(1; 2); cyl; quantity=inertia; axis=z)


surfint((x; y; z); sphere(2))


surfint(1; graph(z = x^2 + y^2; x^2 + y^2 <= 1))


surfint((x; y; z); cylinder(1; 2); method=gauss)


surfint(curl((-y; x; 0)); hemisphere(1))


\iint_S z \, dS, S: x^2 + y^2 + z^2 = 4, z \ge 0


surfint(1; sphere(1); quantity=inertia; axis=z)


A map of the integral theorems
All the integral theorems say the same: the integral of a derivative over a region equals an integral over its boundary. The boundary of a segment is two points, of a surface a curve, of a solid a closed surface; the generalized Stokes theorem ∫_Ω dω = ∫_∂Ω ω says it all at once. The app uses the theorems as a second way of computing and as a check (the chips under a result); the glossary shows the same map under “Integral theorems”.
How to enter it
∫ f′(x) dx (a..b) = f(b) − f(a) | The Newton–Leibniz formula – inside: the derivative on [a, b], on the boundary: the values at the endpoints. |
∫_C ∇φ · dr = φ(B) − φ(A) | The gradient theorem (a potential, path independence) – inside: the gradient along a curve, on the boundary: the potential at its ends. |
∬_D (Q_x − P_y) dA = ∮_∂D P dx + Q dy | Green’s theorem – inside: ∂Q/∂x − ∂P/∂y over a plane region, on the boundary: the circulation around the closed curve. |
∬_S (∇ × F) · n dS = ∮_∂S F · dr | Stokes’ theorem – inside: the flux of the curl through a surface, on the boundary: the circulation around its edge. |
∭_V div F dV = ∯_∂V F · n dS | Gauss’s theorem – inside: the divergence over a solid, on the boundary: the outward flux through the closed surface. |
Physical applications of the integral theorems
The “Applications” section (the Physics and Multivariable calculus fields, electricity also in Electrical engineering, flow and heat in Engineering) has models with units: Gauss's law (a sphere, a line, a plane), Ampère's and the Biot–Savart law (a wire, a solenoid, a toroid, a current loop), electromagnetic induction (a magnetic flux, a changing field, a generator), a capacitor (parallel-plate, spherical, cylindrical), the energy of a field, work in a force field (gravity, a spring, the Coulomb force), fluid flow (a flow rate, a parabolic profile, the continuity equation, circulation and curl), heat conduction (a plane and a cylindrical wall) and the gravitational field by Gauss's law.
The steps start with the integral law, then explain the symmetry (on the chosen surface or curve the field is constant and points along the normal or the tangent), show the evaluated integral, the enclosed charge, current or mass and the formula to substitute into. The electromagnetic laws come with their differential form – the glossary term “Maxwell's equations” has both forms side by side. The graph shows the field against the distance (E(r), B(r), g(r)), a velocity profile, the temperature in a wall or a generator's voltage.
Examples
model(gauss; find=E[V_m]; Q=1[nC]; R=10[cm]; r=5[cm]; mode=sphere; charge=ball)![model(gauss; find=E[V_m]; Q=1[nC]; R=10[cm]; r=5[cm]; mode=sphere; charge=ball)](img/vf-gauss-ball.png)
![model(gauss; find=E[V_m]; Q=1[nC]; R=10[cm]; r=5[cm]; mode=sphere; charge=ball)](img/vf-gauss-ball-1.png)
![model(gauss; find=E[V_m]; Q=1[nC]; R=10[cm]; r=5[cm]; mode=sphere; charge=ball)](img/vf-gauss-ball-2.png)
model(ampere; find=B[uT]; I=10[A]; R=1[mm]; r=5[cm]; mode=wire)![model(ampere; find=B[uT]; I=10[A]; R=1[mm]; r=5[cm]; mode=wire)](img/vf-ampere-wire.png)
![model(ampere; find=B[uT]; I=10[A]; R=1[mm]; r=5[cm]; mode=wire)](img/vf-ampere-wire-1.png)
![model(ampere; find=B[uT]; I=10[A]; R=1[mm]; r=5[cm]; mode=wire)](img/vf-ampere-wire-2.png)
model(ampere; find=B[uT]; I=5[A]; Rl=10[cm]; z=10[cm]; mode=loop)![model(ampere; find=B[uT]; I=5[A]; Rl=10[cm]; z=10[cm]; mode=loop)](img/vf-biot-loop.png)
![model(ampere; find=B[uT]; I=5[A]; Rl=10[cm]; z=10[cm]; mode=loop)](img/vf-biot-loop-1.png)
![model(ampere; find=B[uT]; I=5[A]; Rl=10[cm]; z=10[cm]; mode=loop)](img/vf-biot-loop-2.png)
model(induction; find=emf[V]; N=200[one]; B=0.1[T]; A=500[cm2]; omega=314.16[rad_s]; mode=rotating)![model(induction; find=emf[V]; N=200[one]; B=0.1[T]; A=500[cm2]; omega=314.16[rad_s]; mode=rotating)](img/vf-generator.png)
![model(induction; find=emf[V]; N=200[one]; B=0.1[T]; A=500[cm2]; omega=314.16[rad_s]; mode=rotating)](img/vf-generator-1.png)
![model(induction; find=emf[V]; N=200[one]; B=0.1[T]; A=500[cm2]; omega=314.16[rad_s]; mode=rotating)](img/vf-generator-2.png)
model(capacitor; find=C[pF]; epsr=2.3[one]; r1=1[mm]; r2=3.5[mm]; L=1[m]; mode=cylindrical)![model(capacitor; find=C[pF]; epsr=2.3[one]; r1=1[mm]; r2=3.5[mm]; L=1[m]; mode=cylindrical)](img/vf-coax.png)
![model(capacitor; find=C[pF]; epsr=2.3[one]; r1=1[mm]; r2=3.5[mm]; L=1[m]; mode=cylindrical)](img/vf-coax-1.png)
![model(capacitor; find=C[pF]; epsr=2.3[one]; r1=1[mm]; r2=3.5[mm]; L=1[m]; mode=cylindrical)](img/vf-coax-2.png)
model(fieldenergy; find=W[J]; B=1[T]; V=1[l]; mode=magnetic)
model(fieldwork; find=W[MJ]; M=5.972e24[kg]; m=1[kg]; r1=6371[km]; r2=12742[km]; mode=gravity)![model(fieldwork; find=W[MJ]; M=5.972e24[kg]; m=1[kg]; r1=6371[km]; r2=12742[km]; mode=gravity)](img/vf-work.png)
![model(fieldwork; find=W[MJ]; M=5.972e24[kg]; m=1[kg]; r1=6371[km]; r2=12742[km]; mode=gravity)](img/vf-work-1.png)
![model(fieldwork; find=W[MJ]; M=5.972e24[kg]; m=1[kg]; r1=6371[km]; r2=12742[km]; mode=gravity)](img/vf-work-2.png)
model(flow; find=Q[l_s]; vmax=2[m_s]; R=5[cm]; mode=parabolic)![model(flow; find=Q[l_s]; vmax=2[m_s]; R=5[cm]; mode=parabolic)](img/vf-poiseuille.png)
![model(flow; find=Q[l_s]; vmax=2[m_s]; R=5[cm]; mode=parabolic)](img/vf-poiseuille-1.png)
![model(flow; find=Q[l_s]; vmax=2[m_s]; R=5[cm]; mode=parabolic)](img/vf-poiseuille-2.png)
model(heatflux; find=P[W]; k=0.04[W_mK]; L=1[m]; r1=2[cm]; r2=4[cm]; T1=80[degC]; T2=20[degC]; mode=cylinder)![model(heatflux; find=P[W]; k=0.04[W_mK]; L=1[m]; r1=2[cm]; r2=4[cm]; T1=80[degC]; T2=20[degC]; mode=cylinder)](img/vf-insulation.png)
![model(heatflux; find=P[W]; k=0.04[W_mK]; L=1[m]; r1=2[cm]; r2=4[cm]; T1=80[degC]; T2=20[degC]; mode=cylinder)](img/vf-insulation-1.png)
![model(heatflux; find=P[W]; k=0.04[W_mK]; L=1[m]; r1=2[cm]; r2=4[cm]; T1=80[degC]; T2=20[degC]; mode=cylinder)](img/vf-insulation-2.png)
model(gravityfield; find=g[m_s2]; M=5.972e24[kg]; R=6371[km]; r=3185.5[km]; mode=ball)![model(gravityfield; find=g[m_s2]; M=5.972e24[kg]; R=6371[km]; r=3185.5[km]; mode=ball)](img/vf-earth.png)
![model(gravityfield; find=g[m_s2]; M=5.972e24[kg]; R=6371[km]; r=3185.5[km]; mode=ball)](img/vf-earth-1.png)
![model(gravityfield; find=g[m_s2]; M=5.972e24[kg]; R=6371[km]; r=3185.5[km]; mode=ball)](img/vf-earth-2.png)
Known limitations
- Extrema only for functions of two variables, constrained ones with one constraint. A double integral only over a bounded region whose boundary is at most quadratic in one variable; the surface z = f(x, y) is drawn in 3D only for the double integral so far. Vector fields only in the variables x, y (z), other letters are constants; arrows are drawn only for a plane field. The potential is found by integrating the components – if an integral isn't elementary, it isn't found. Line integrals: Green's theorem is checked only for a circle, an ellipse and a convex polygon; a closed curve made of a graph and a segment can be entered only as a polyline or piecewise parametrically. A triple integral only over a bounded solid that is normal with respect to one variable (one lower and one upper surface over the whole projection) and whose inequalities are at most quadratic in it; spherical coordinates only for a solid whose angles θ and φ form a rectangle.
- Surface integrals: Gauss’s theorem is checked only for the presets (a sphere, a closed hemisphere, a cylinder, a cone), Stokes’ only for the flux of a curl written as curl or ∇ × F; a graph z = g(x, y) only over a region the double integral handles; enter a sphere with a bound other than z ≥ 0 as a graph or by a parametrization.
- The physical applications of the integral theorems compute only symmetric cases (a sphere, an infinite line and plane, a long coil, a uniform field) where the integral becomes a product; enter a general distribution of charge or current as a line or surface integral. They neglect the displacement current in the Ampère–Maxwell law and model materials only by a capacitor's relative permittivity.