Welcome to calculus. I'm professor Greist. We're about to begin lecture 31 on complex areas. >> Computing areas by means of a definite integral is one of the classic applications of calculus. But it's not always so straight forward. Some shapes are too complex to be easily decomposed into triangles or rectangles. This is especially true in the context of applications where simplicity must yield to reality. In this lesson, we'll learn how to handle some of those problems by using the area element. >> We begin this lesson with a quick, classical example of computing the area between two curves, y-x = 0 and y squared + x = 2. The first of these is the diagonal line, slope one. The second is a parabola that opens to the left. We need to compute the area of the region between them. I'll leave it to you to do the substitution and algebra to determine the intersection points at one comma one, and negative two comma, negative two. And now to compute the area, we could proceed as before by sweeping out with a vertical strip as an area element. But if we do this, then we need to decompose the region into two different parts. The area element is, on the first part, as x goes from negative two to one, the difference in height. We need to solve for the y coordinates. In doing so, we can write the area element as the top y equals x minus negative square root of two minus x. This height is multiplied by the width dx. For the right hand side of this region as x is going from one to two. Then the area element is twice square root of two minus x times dx. And to compute the area, we need to integrate this area element. That means we're going to have to write down a pair of integrals. The integral is x goes from negative two to one of x plus root two minus x, dx plus the integral as x goes from one to two of twice root two minus x, dx. Now neither of these is a terribly difficult integral. But we're not going to do it. Why? Because there is a simpler method. We're going to reverse. The direction of integration and integrate with respect to y, instead of with respect to x. And so, solving for the x coordinate and sweeping out via a horizontal strip as our area element we see there is a uniform area element and it will reduce to a single integral. What is this area element? If we take the x coordinate on the right, that's two minus y squared. Subtract the x coordinate on the left, namely y. Multiply by the thickness d-y. Then we can integrate this area element. As y goes from negative two to one. This is a much simpler integral, and we get, simply, 2y minus y cubed over three, minus y squared over two, evaluated from negative two to one. That equals nine-halves. The area. The direction matters. If you encounter integral that is too difficult, try reversing the direction. A related albeit more complex example comes to us from thermodynamics in the analysis of an idealized heat engine. What happens to a gas in a chamber, in something that, say, might power an automobile? Now we're going to go over a couple of terms from thermodynamics, very quickly. All of these have to do with measuring what is happening to the volume, V, and the pressure, P, of the gas in the chamber. In this idealized heat engine, there are four stages, or strokes. The first is called a combustion stage, otherwise known as an isothermal expansion. The volume is increasing and the pressure, P, times the volume, V, is constant. Let's call that A. So in this first stroke, you're moving to the right along a curve in the V-P plane when a product is a constant. The second stroke is the power stroke. Sometimes called an isotropic expansion. In this case you're moving along the curve p times v to the gamma equals another constant let's say B. Here, gamma is yet another constant that is greater than one and depends upon the properties of the gas. The third stroke, or stage, is the exhaust stroke. This is an isothermal contraction, in which V is decreasing, and you're moving along a curve, P times V equals another constant. Let's call this one a sub zero, and we'll call the former PV constant a sub one. Now we’re moving to the left along one of these curves. The last stroke, is the compression stroke. Otherwise known as an isentropic contraction. Volume is decreasing, and you move along the curve. PV to the gamma equals a constant. We’ll call this fourth constant B naught, replacing the B in our earlier isentropic expansion with B1. All right, that's a lot of setup. What's the payoff here? In thermodynamics, you trace out this region in the V-P plane, and the work that the engine does over four strokes of a cycle is equal to the area that is traced out in this plane. And so we're motivated to find that area. If we sweep out this region, integrating with respect to V, using vertical strips, it's not so simple. It seems to have several different pieces. Perhaps reversing the direction would help? No, this does not make things any simpler at all. Let's go back to integrating with respect to V. In this case, the region breaks up into three distinct zones. Each requiring its own integral. In the first piece, we have on the top the curve PV equals A1. Solving for P gives us A1/V. Subtracting the P value for the bottom curve Means subtracting B naught over V to the gamma. That's for the first region. The second region is between two isothermal curves. That gives us A1 minus A naught over V. The third region, with a little bit of work gives us an integrant of B1 over V to the gamma minus A naught over V. Now, none of these integrals is difficult to perform. What is difficult is determining the limits of integration because we have to find all four intersection points of these curves, and determine their v values. I'll leave it to you to show with not a small amount of work, that the first intersection point on the left is quantity b naught over a1 raised to the power, one minus gamma. You can imagine how much work it's going too take to do and simplify these integrals. That's the bad news. The good news is that the answer at the end is really quite simple. A one, minus A not, over gamma, minus one, times log of B one, over B naught. If the answer was that simple, well isn't there an easier way to do the integral? And there is, but you're going to have to wait to find out. Complicated shapes require new techniques. And here's one approach. In the case where a shape is defined by a radial distance. We can use what is called polar coordinates. So if we have a shape of the form r equals f of theta, where r is a distance to the origin. Theta is an angle made to the X axis. Then, trying to fill out such a region by vertical or horizontal strips as an area element is likely to lead to frustration. And so, as we did in the case of a circular disk, we can use an angular wedge, and sweep that around based at the origin. What will this area element look like? We'll approximate it as a triangle, whose length is r, the radial distance, and whose height is r times d theta. In this case, the area element is the area of this triangle, 1/2 r (r d theta). And that is 1/2 r squared d theta, but remember r is given as a function, f of theta, hence, we have something that we can integrate to get the area. That being, the integral of one-half quantity f of theta squared, d theta. Well let's explore this in the context of an example. Compute the area between the regions. R less than or equal to two sine theta, and r greater than or equal to one. We can clearly see that r equals one is a circle, radius one, centered at the origin. I'll leave it to you to discover that r equals two sine theta is likewise a circle of radius one shifted up the y axis. These curves intersect at two points. What are they? Well, by setting the r values equal and solving for theta, we see that these points are at theta equals pi over six and five pi over six. Now we want to compute the area of the region between the one and the other by sweeping out with a angular wedge. This area element is going to look like the difference between two triangles centered at the origin. The area element, dA in this case, is going to be, what? Well, we take the outer area element that is one-half of the outer radius squared and subtract off one-half times the inner radius squared. Of course, the outer radius is r equals two sin theta, the inner radius is r equals one, paying careful attention to our inequalities. We have to perform this integration as theta goes from pi over six to five pi over six. And so we see, that with a little bit of simplification using the double angle formula, we can reduce this integral to one minus cosine two theta minus a half d theta. Simplifying a little bit, we can integrate negative cosine two theta to minus one half sin two theta, and one-half becomes one-half theta. Evaluating this from pi over six to five pi over six, gives us, with work, our answer, pi over three plus square root of three over two. Now, these examples, though complicated, illustrate a deeper truth, namely, that by changing coordinates, we can make the integral simpler. It looks like we're playing around with triangles and area elements like that. But what we're really doing is changing coordinates, so that we can integrate with respect to theta. Likewise in the problem that we didn't solve about thermodynamics. The right way to solve that problem is to change to a new coordinate system in which the associated shape becomes a rectangle. That will make things easier to handle. You're gonna have to wait until you get to multi-variable calculus to see how to do this properly. >> Through solving or at least attempting some more challenging problems, we're led to a new perspective, that of a change of variables formula for planar two-dimensional shapes. We're going to save the full exposition of those ideas for multi-variable calculus. But if you'd like to see a preview, check out the bonus material. Then, we'll move on to our next lesson, where we'll compute volumes.