You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the derivatives topics extended somewhat naturally from their Calculus I counturparts and that will be the same here. However, because we are now involving functions of two or three variables there will be some differences as well. There will be new notation and some new issues that simply don't arise when dealing with function of a single variable. In mathematics (specifically multivariable calculus), a multiple integral is a definite integral of a function of several real variables, for instance,
$f(x, y)$ or $f(x, y, z)$.
Integrals of a function of two variables over a region in $$\mathbb{R^2}$$ (the real-number plane) are called double integrals or two dimensional planar regions and surfaces, and integrals of a function of three variables over region in $\mathbb{R^2}$ (real-number 3D space (volumes) are called triple integrals. When integrating over curves and surfaces, one can integral vector fields, where the one integrates either the tangential (for curves) or the normal (for surfaces) component of the vector field.
Double integrals
A double integral is defined as the limit of sums. Why bother with sums and limits in the first place?. Two reasons. There has to be a definition and a computation to fall back on, when the single intagrals are difficult or impossible. And also, this we emphasize multiple integrals represent more than area and volume. The true applications are mostly to other things, but the central idea is always the same: Add up small pieces and take limits. We begin with the area of $R$ and the volume of $V$, by double integrals.
Question: What is the volume above $R$ and below the graph of $z=f(x,y)$?.
Answer: It is a double integral, the integral of$f(x, y)$ over $R$.
For single integrals, the interval $[a,; b]$ is divided into short pieces of length $\Delta x$. For double integrals, $R$ is divided into small rectangles of area $$\Delta A = (\Delta x)(\Delta y)$$.
The simplest examples of such quantities are the volumes that have the surface $f(x, y)$ as height. Suppose that $R =[a, b] \times [c, d]$ is a rectangle in the $xy$-plane, where $x$ runs from $a$ to $b$ and $y$ runs from $c$ to $d$. Let's figure out the volume of the solid over the rectangle $R$, between the $xy$-plane and the surface $z=f(x, y)$. We can divide the rectangle into a grid, $m$ subdivisions in one direction and $n$ in the other.
With functions of one variable, we take the limit of the approximations of area under a curve $f$ and get an integral:
Similarly, given our double sum approximation the volume, the limit of this sum is the defenition of a (double) integral. The double integral of $f$ over $R$ is:
(When we take the limit, it doesn't matter which sample point we take, so we take the upper-right corner of the rectangle $R_{ij}$). The double integral of $f$ over the region $R$. The notation $dA$ indicates a small bit of area, without specifying any particular order for the variables $x$ and $y$. It is shorter and more 'generic' than writing $dx ; dy$.
Triple Integrals
We can guess what triple integrals are like. Instead of a small interval or a small rectangle, there is a small box. Instead of length $dx$ or area $dx ; dy$, the box has volume $dV=dx dy dz$. The main problem will be to discover the correct limits on $x, y, z$. Then we add them all up and take the limit, to get an integral:
$$\int_{x_0}^{x_1} \int_{y_0}^{y_1} \int_{z_0}^{z_1} dz \; dy \; dx$$
If the limits are constant, we are simply computing the volume of a rectangular box.
Prior Knowledge
Integration
Limits
Partial Derivatives
Geometry
Linear Algebra
Preliminaries
scipy.integrate: definite integrals.
dblquad: double integrals.
tplquad: triple integrals.
Examples: Double Integrals
Shows the function $\int \int_R 1 + (x-1)^2 + 4y^2 \ dA$, where $R = [0, 3] \times [0, 2]$ in two ways.
To calculate the integral, we can simply use dlbquad, the function must be defined with the innermost variable $(y)$ given as the first argument, and its limits themselves defined as functions the outermost variable $(x)$.
fromscipy.integrateimportdblquaddeffunc(y, x):
return1+ (x-1)**2+4*y**2# Definite the limita, b=0, 3#Limits of the x integralc, d=0, 2# limit of the y integralresult=dblquad(func, a, b, lambdax: 0, lambdax: 2)
print('result:', result)
result: (44.0, 4.884981308350689e-13)
Exercises: Double Integrals
Compute $\int_0^1 \int_0^{x^2} x+2y^2 \ dy \ dx \Rightarrow$
fromscipy.integrateimportdblquaddeffunc(y, x):
returnx+2*y**2# Definite the limita, b=0, 1#Limits of the x integralresult=dblquad(func, a, b, lambdax: 0, lambdax: x**2)
print('result:', result)
fromscipy.integrateimportdblquadimportnumpyasnpdeffunc(x, y):
return1# Definite the limita, b=0, 1#Limits of the x integralresult=dblquad(func, a, b, lambday: y**2/2, lambday:np.sqrt(y))
print('result:', result)
result: (0.5000000000000001, 6.6077499564637e-15)
Compute $\int_1^2 \int_1^x \frac{x^2}{y^2} \ dy \ dx \Rightarrow$
fromscipy.integrateimportdblquaddeffunc(y, x):
returnx**2/y**2# Definite the limita, b=1, 2#Limits of the x integralresult=dblquad(func, a, b, lambdax: 1, lambdax: x)
print('result:', result)
$$\begin{align} u &= x^2 \\ du &= 2x \; dx \\ x\; dx &= \frac{1}{2} \; du \end{align}$$
Change the limits:
$$\begin{align} x &= 0 \Rightarrow u = 0^2 = 0 \\ x &= \sqrt{\pi / 2} \Rightarrow u = (\sqrt{\pi / 2})^2 = \pi / 2 \end{align}$$
Substitute the limits to integral:
$$\begin{align} \int_0^{\pi / 2} \frac{1}{2} \; sin \; u \; du &= \frac{1}{2} \left [-cos \; u \right]_0^{\pi / 2} \\ &= \frac{1}{2} \;(-cos(\pi / 2) - (-cos(0)) \\ &= \frac{1}{2} \end{align}$$
fromscipy.integrateimportdblquadimportnumpyasnpdeffunc(y, x):
returnx*np.cos(y)
# Definite the limita=0b=np.sqrt(np.pi/2) #Limits of the x integralresult=dblquad(func, a, b, lambdax: 0, lambdax: x**2)
print('result:', result)
fromscipy.integrateimportdblquadimportnumpyasnpdeffunc(y, x):
returnx# Definite the limita=0b=np.sqrt(2) /2#Limits of the x integralresult=dblquad(func, a, b, lambdax: -np.sqrt(1-2*x**2), lambdax: np.sqrt(1-2*x**2))
print('result:', result)