Archive for the ‘Surface Integrals’ Tag

Math 213: How to Integrate

After the second test, most of Calc III revolves around various methods for finding line and surface integrals (in Rogawski’s text, this corresponds to chapter 16). Evaluating these integrals is straightforward, particularly once you know the shortcuts (e.g., divergence theorem). Even without the shortcuts, however,  integrals of this type are simple so long as you know which formula to use when. So, what follows is a flowchart you can follow to figure out which formula to use. After the chart are a number of example problems solved using the flowchart.

Before I introduce the flowchart, however, keep a few things in mind:

  • Your final answer should always be a number. So, if you integrate and your answer is a vector, you’ve done something wrong! Specifically, if you’re trying to integrate a vector-valued function (e.g., \langle x^2y, ye^z,\sin y \rangle ), you should do a dot product at some point.
  • Sometimes, you’ll have to figure out which parametrization to use. If you’re given something like y=f(x) , you should probably parametrize like  {\mathbf c}(t) = \langle t, f(t) \rangle . Here, t will have the same bounds as x. If you’re given something else, you’ll have to work a little harder. Some common cases are the parametrization of a line and parametrization of a circle. Say you’re given two points, {\mathbf a} and {\mathbf b}. Then, it’s probably easiest to parametrize like {\mathbf c}(t)={\mathbf a}+({\mathbf b}-{\mathbf a})t for 0\leq t \leq 1 (Note: You can also find an equation for you line in terms of y=mx+b and use {\mathbf c}(t) = \langle t, f(t) \rangle . Sometimes this is easier, sometimes it’s harder – it’s hard to say a priori how it will go. Really, the parametrization you use is a matter of personal preference and how comfortable you are with each method.). Parameterizing a circle is a little more straightforward. Unless you have a particularly compelling reason not to (and off the top of my head, I certainly can’t think of any), always use {\mathbf c}(t)=\langle r\cos \theta, r\sin \theta \rangle. Then, make your \theta bounds correspond to how much of the circle you’re considering.
  • The above point is, of course, a little trickier for 3D surfaces, but the same ideas roughly apply. For example, if you’re given z=f(x,y), you can parametrize using {\mathbf\phi}(r,s) = \langle r,s,f(r,s)\rangle. Here, your bounds on r and s correspond to your bounds on x and y.  See your book (or me or Gus) for more details.

With those points out of the way, we can now look at the flowchart. Though it doesn’t explicitly say so, start in the upper-left corner (click on the image to make it bigger).

This flowchart describes (essentially) four cases. We’ll give an example of each.

Example 1: Contour Integral of a scalar function

Say we’re trying to find \int_c xy ds over the contour described by x^2+y^2=16. Following the flowchart, we answer a few questions. First, we are given a function (xy), so we move on to answer if our function is scalar or vector. Obviously, we know from the title of this example that we have a scalar function. If we weren’t given that information, however, we would still know we have a scalar function (recall, a scalar function is anything which isn’t a vector function). Moreover, since we’re integrating over something in 2D, x^2+y^2=16, we know that we have a contour (or line) integral. So, following the flowchart, we evaluate our integral using \int_a^b f({\mathbf c}(t))||{\mathbf c}^\prime(t)||dt. That is, we only have three more things to do until we’ve found our answer: first, we must find {\mathbf c}(t) and its derivative. Second, we substitute what we’ve just found into the equation for scalar line integrals. Finally, we evaluate the integral.

Since we’re integrating over a circle of radius 4 (recall that a circle with radius r is written implicitly as x^2+y^2=r^2), we want to parametrize using {\mathbf c}(t) = \langle 4\cos\theta, 4\sin\theta \rangle for 0\leq \theta \leq 2\pi . So, {\mathbf c}^\prime(t) = \langle -4\sin\theta, 4\cos\theta \rangle. Thus, we’ve accomplished our first step. Second, we want to substitute these into our integral, giving

\int_a^b f({\mathbf c}(t))||{\mathbf c}^\prime(t)||dt = \int_0^{2\pi} (4\cos\theta)(4\sin\theta)\sqrt{(-4\sin\theta)^2+(4\cos\theta)^2} = 64\int_0^{2\pi} \cos\theta\sin\theta .

Finally, we want to evaluate this integral. There are a few methods for doing this (one could, say, rewrite this integral using trig-identities). I’ll use u-substitution. So, setting u=\sin\theta, we have du=\cos\theta d\theta, and our bounds go from \theta=0 to u=\sin 0=0 and from \theta=2\pi to u=\sin 2\pi=0. Since our bounds now go from 0 to 0, we’re not integrating over any area! That is, our final answer is

\int_c xy ds = 0 .

Of course, since we’re integrating over a closed contour, this is expected.

Example 2: Contour integral of a vector function

When we have a vector-valued function, we know we need to take a dot product. Otherwise, we’d be integrating over a vector (which we know is wrong from the bulleted list above!). So, say we have {\mathbf F}=\langle x,y,z \rangle and a contour described by {\mathbf c}(t)=\langle t, e^t,t^2 \rangle for 0\leq t \leq 2. Following the flowchart, we get to a point where we have to test if {\mathbf F} is conservative. Indeed, testing each of our conditions, we find that {\mathbf F} is conservative. So, we can use the fundamental theorem of line integrals to evaluate our answer quite easily. We’ll do it the long way too, for practice.

  • Using the Fundamental Theorem of Line Integrals (FTLI)

To use the FTLI, we have to first find the potential function for {\mathbf F}. In this case, it’s pretty straightforward. We want to find a scalar function, say \phi, such that \nabla \phi={\mathbf F}. By inspection, we see that \phi=\frac{x^2}{2}+\frac{y^2}{2}+\frac{z^2}{2} will work (\nabla[\frac{x^2}{2}+\frac{y^2}{2}+\frac{z^2}{2}] = \langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z} \rangle[\frac{x^2}{2}+\frac{y^2}{2}+\frac{z^2}{2}] = \langle x,y,z\rangle). So, to finish evaluating, we simply use the formula \phi({\mathbf c}(2))-\phi({\mathbf c}(0)) = \phi(2,e^2,4)-\phi(0,1,0) = \frac{19+e^4}{2}.

  • Using Parameterization

Following the flowchart the wrong way leads to the formula \int_c {\mathbf F}\cdot d{\mathbf s} = \int_a^b {\mathbf F}(\mathbf{c}(t))\cdot {\mathbf c}^\prime(t) dt. Like in Example 1, we follow a three step process here. First, we find {\mathbf c}^{\prime} (t) = \langle 1, e^t,2t \rangle. Next, we find {\mathbf F}({\mathbf c}(t))\cdot{\mathbf c}^{\prime}(t) = 2t^3+t+e^{2t}. Finally, we integrate this function, \int_0^2 2t^3+t+e^{2t} dt = \frac{19+e^4}{2}. These are the same answers (which is nice).

Example 3 : Surface integral of a scalar function

Let’s consider \int_S xy+z ds over the surface x+2y+z=2 in the first octant (x,y,z\geq 0). Following the flowchart appropriately, we arrive at the formula \int\int_S f ds = \int\int_D f(\phi(u,v))||\phi(u,v)_u\times\phi(u,v)_v||.  So, to continue, we need to find a parametrization, \phi(u,v) of our surface, x+2y+z=2. One valid parametrization here is \phi(u,v)=\langle u,v,2-u-2v \rangle. Note that this comes from solving the surface equation x+2y+z=2 for z and replacing x and y with u and v, respectively. Then, to find our normal vector, we compute

{\mathbf n} = \phi_u\times\phi_v = \langle 1,2,1 \rangle.

(It’s quite hard to write down how to do a cross product in wordpress. If you’re unsure how I got \langle 1,2,1 \rangle, check your book, or ask me or Gus). Now that we have our normal vector, we simply need to take its magnitude and take the actual integral. So, we find that ||{\mathbf n}|| = \sqrt{1^2+2^2+1^2}=\sqrt{6}. Here, it’s important to point out an important short-cut for this. You learned in class that, if you can write your surface as z=f(x,y) for some function f(x,y), you can use the formula ||{\mathbf n}|| = \sqrt{1+\left(\frac{\partial f}{\partial x}\right)^2+\left(\frac{\partial f}{\partial y}\right)^2}. Let’s try that in this case: \frac{\partial f}{\partial x} = -1 and \frac{\partial f}{\partial y} = -2. So, \sqrt{1+\left(\frac{\partial f}{\partial x}\right)^2+\left(\frac{\partial f}{\partial y}\right)^2} = \sqrt{6}, just like we found above.The next step is to determine that f(\phi(u,v))=uv+2-u-2v.

Finally, we just need to find the bounds of our integral and actually compute the answer. Because we’re doing a surface integral, we only look at the projection of our surface. In other words, we need to find the triangle in the xy-plane. So, we set z=0 and find y=1-\frac{1}{2}x. Thus, the bounds on our integral will be 0\leq x \leq \frac{1}{2} and 0\leq y \leq 1-\frac{1}{2}x . So, our integral becomes \sqrt{6}\int_0^\frac{1}{2}\int_0^{1-\frac{1}{2}u} uv-u-2v+2 dvdu = \frac{659}{1536}\sqrt{6}. This is an ugly answer, but it’s certainly an answer.

Example 4 : Surface integral of a vector function

Finally, let’s find the surface integral of the vector field {\mathbf F}=\langle x,y^2,xy \rangle over the helicoid parameterized by \phi(u,v)=\langle u \cos v, u\sin v, v \rangle for 0\leq u \leq 1 and 0 \leq v \leq 2\pi. Following the flowchart, we see that this integral is fairly straightforward. We simply need to find: {\mathbf F(\phi(u,v))}, {\mathbf n}=\phi_u\times \phi_v, and {\mathbf F}(\phi(u,v))\cdot {\mathbf n}. So, we do each of these in turn.

Substituting \phi(u,v) into {\mathbf F} gives u\cos v,u^2\sin^2 v,u^2\cos v\sin v \rangle. Then, taking the cross product of the partials of \phi will give {\mathbf n} = \phi_u\times \phi_v = \langle \sin v, -\cos v, u \rangle. Next, we find the dot product of these two quantities, giving \langle u\cos v,u^2\sin^2 v,u^2\cos v\sin v\rangle\cdot\langle \sin v, -\cos v, u \rangle = u\cos v\sin v - u^2\sin^2 v\cos v+u^3\cos^2 v\sin v. This is a particularly ugly integrand, but we can certainly do it (mostly by using integration-by-parts). In fact, we’ll find that \int_0^1\int_0^{2\pi} u\cos v\sin v - u^2\sin^2v\cos v+u^3\cos^2v\sin v dvdu = 0.

So that’s it – how you do surface and line integrals without any of the tools from chapter 17. Do you have any questions after that? Did I make any mistakes in my math? If so, feel free to comment below (or send me an email) and I’ll do my best to fix things!