Welcome to the fifth lecture in the seventh week of our course Analysis of a Complex Kind. In today's lecture, I'll show you a number of examples that demonstrate how the Residue Theorem can be used to evaluate complex integrals. Let me start by reminding you of the Residue Theorem. Suppose this is simply connected to main and f is analytic in D with the exception of isolated singularities. That the note of isolated singularities will double cross this below. Suppose furthermore that C is a simple closed curve in D. It doesn't pass through any of the singularities of f. And let z1 through zn be those similarities of f, that's our surrounded backseat. Then the integral of f over the group c can be found as 2 pi i times the sum of the residents at those ones who are surrounded by c. Lets look at an example. So suppose we wanted to find the integral of the function e to the 3 over c, over the circle of radius one center of the origin. Where does the function f have similarities? Even the three of z is undefined when z is equal to 0 because we would be dividing by 0 at that point. But it's actually analytic everywhere else. So we have an isolated singularity at 0. And it turns out that isolated singularities and the essential singularities. The integral can therefore be found by the residue theorem, it's 2 pi i times the residue of f at 0. How do we find that residue? First we remember that the exponential function has a Taylor series representation centered at the origin as 1 + w + w squared over 2 factorial, and so forth. If we write that in summation notation, that is the sum of k from 0 to infinity of 1 / k factorial times w to the k. Now we want to find the raw series expansion for either 3 over z so that we can find the residue of e to the 3 / z at the origin. Because 0 is an essential singularity for the function f, we can't use any of the tricks we learned class. Rather we actually have to find the Laurent series expansion. But that's now easy because we simply plug in 3 over z for w. We find that e to the 3 over z is some 1/k! (3/z) to the k. In order to find the residue of this function at 0 we need to find the 1/z term. What does 1/z get multiplied with? Well we get 1/z exactly when this k=1. When that k is equal to 1, we have a 1 over 1 factorial and the 3 from the numerator. That must be my a negative 1 term. So therefore the residue, which is a -1 = 3. And that means that the integral that we're interested in, the integral of the function e to the 3 over z integrated over the circle of radius 1 is equal to 3 times 2 pi i, and that equals 6 pi i. Here's another example. Suppose we wanted to integrate the function tan z over the circle of radius 2. Where are the isolated singularities of the tangent function? Tangent z is sine z over cosine z, which is analytic everywhere except for cosine z = 0. But cosine z = 0 at pi/2, -pi/2, 3pi/2. -3 pi over 2 and so forth. Those singularities that are surrounded by that circle of radius 2 are at pi over 2 and -pi over 2. In order to evaluate the integral I therefore need to find the residue of the tangent function at pi over 2, and then negative pi over 2. We need to add those two residues up and multiply the result by 2 pi. How do we find the residue of f at pi over 2? We notice that f is of the form of an analytic function divided by another analytic function, sine z and cosine z. And those two analytic functions satisfy that the denominator function is equal to 0 and has a simple 0 at pi over 2. But theorem that we ended with in the last class. We remember that we can find the residue of f at pi over 2. By simply taking the numerator function and evaluating it at pi over 2 and dividing it by the derivative of the denominator at pi over 2. The numerator is sin z so when you define sin of pi over 2. The denominator is cosine z. Its derivative is negative sine z and pi/2 and that gets us negative sine of pi/2. Sine of pi/2 is 1, negative sine of pi/2 is -1, the quotient evaluates to -1 and therefore the residue of f(pi/2)=-1. Similarly, the residue of f at negative pi over 2 is the numerator at negative pi over 2 divided by the derivative of the denominator at negative pi over 2 because the denominator function cosine is given a simple 0 at negative pi over 2. Therefore, we can evaluate g of negative pi over 2 which is sine of negative pi over 2. Divide that by the derivative of the denominator, negative sine of negative pi over 2, and we find ourselves with -1 which is sine of negative pi over 2 and -(-1), which evaluates altogether to a quotient of -1. Those residues are actually equal to -1, so that the integral of tan zdz over the circle of radius 2 evaluates to 2 pi i times -1 + -1, which equals -4 pi i. Here's a third example. Here's a function we've looked at before, f of z equals 1 over z-1 squared and z-3. This function has isolated singularities x=1, and z=3. I've drawn two curves here, curve C1 that surrounds only the singularity of 1, and curve C2 that surrounds both of these isolated singularities. We'll find both integrals. First we'll start with the integral over the curve c1 Which, by the residue theorem, is 2 pi i times the residue of f and 1. To find the residue of f and 1, I notice that, in 1, the function has a double pole. To find the residue at the double pole, I simply multiply the function by z minus the double pole squared. And then take the derivative and then the limit as z approaches the vault. That's the formula we developed last class. Conveniently we noticed that z- 1 squared in the numerator and z- 1 squared in the denominator cancel out. So that we're left with having to find the derivative of 1/z-3. And then the limit of z approaches 1. But the derivative of 1 over z- 3 is -1 over z- 3 squared. When we take a limit as z approaches 1 we can simply replace the z with 1. 1-3 equals -2, we square that, we get 4. So the residue is equal to -1/4. Therefore the interval of my function over the curve c1 is 2 pi i times- 1/4. And that evaluates to -pi i over 2. Next let's look at the other curve, the curve C2. This time we need to find the residue of f(1) and the residue of f(3) and add those two things up. We already found the residue of f(1) and that is equal to -1/4. Now we need to find the residue of f at 3. We notice that the function has a simple pole, let's review. Therefore we multiply by z- 3 and then take the limit of z approaches 3. No need to take the derivative for a simple. You'll notice that the z-3 term cancels out conveniently and we're left with having to find limit as z approaches 3 of z-1 squared. To find that limit, we simply replace z with 3, 3- 1 = 2, 2 squared is 4, the residue turns out to be one-fourth. Now we know this when we add those two residues, making it 1/4 plus 1/4 adds up to 0. So the integral comes out to being 0. When we integrate over the curve C2. So far all the integrals we evaluated were integrals in a complex plane. The Residue Theorem can actually also be used to evaluate real integrals, for example of the following forms. An integral for a rational function of cosine t and sine t. You use the irrational function of x and y. Both the numerator and denominator are polynomials in x and y. Whenever you place x and y by cosine t and sine t, you find that R cosine t and sine t equals cos squared t minus sin square t over 1- cos t plus 1/4, and then we can actually find this integral using the residual theorem. And it turns out, this integral equals pi over 3. Other examples are integrals of rational functions, integrals of the rational function times the cosine of alpha x integral of the rational function times sine of alpha x. In the next and last lecture, I will demonstrate for you how to find an integral of this last type. I will evaluate an integral from minus infinity to infinity for rational function times cosine [INAUDIBLE]