Uploaded by UCBerkeley on 18.11.2009

Transcript:

Hi, good to see you guys as always.

I would like to say a few things about Lagrange

multipliers.

That's the subject of the lecture on Tuesday.

When we talk about Lagrange multipliers there's one

important aspect which one has to realize and that aspect has

to do with whether the curve we're dealing with

is bounded or not.

The example which we discussed in great detail last time was

the example where the curve was an ellipse.

An ellipse is bounded.

Now what do I mean by boundedness?

It's bounded because it is contained in a disk of

a large enough radius.

So in this case, I think this was 1 and this was 1/2.

And this is negative 1, negative 1/2.

So we can take a disk of radius 1 and this entire

curve will be inside.

Or if you want take a disk of radius 2, even bigger.

So for sure it'll be inside.

In other words there are no branches of this curve

which go to infinity.

An object is called bounded if it is contained entirely

in a large enough disk.

Or a bowl if we are in the three-dimensional space.

So this kind of curve is bounded.

And for bounded curves the method works in

the best possible way.

Namely, we will be able to find the maximum and the

minimum of our function.

Our function will have a maximum point, which was here

and a minimum point, which was here in our example.

But if the curve is not bounded then it may not have a

maximum or minimum, or both.

So that's an important remark that I wanted to make.

Because actually on the homework, as you have probably

already seen, there are some exercises where

that is the case.

So let me contrast that this to the following curve.

And this is actually exercise number 3 in 14.8.

I know it's on the homework, but it's my gift to you.

We'll of you like that I can do it again, maybe next

week or a couple of weeks.

So in this exercise the curve is given by the

equation xy equals 1.

So what is this curve?

Well to understand that it's best to rewrite this

equation in a more familiar form, y equals 1/x.

If you write it in this form we see immediately that this the

graph of the function 1/x.

And that's what we call hyperbola.

So that's actually something we learned a long time ago

and it looks like this.

It has two branches.

One here and one here, so this a point 1, 1 and this is a

point negative 1, negative 1.

And in this exercise your asked to find the maxima and minima

of the function f of xy, which is x squared plus y squared.

So this curve is not bounded.

While this was bounded, this is unbounded.

Why?

Because well, intuitively because it goes to infinity.

It

has branches which go all the way to infinity.

More precisely, no matter how big a disk you take,

it will not be contained.

This curve will not be contained in that disk.

There will still be some points outside.

So it is not bounded and that changes the

equation so to speak.

It changes the game.

So let's see, what are the maxima and minima?

So let's apply blindly, just the Lagrange method,

and see what we get.

So the Lagrange method tells us that nabla f -- we should

look at the equation nabla f equals lambda times nabla g.

In this particular case the function f is x squared

plus 2 plus y squared.

So this is 2x, 2y and the function g is xy because the

equation is xy equals 1.

This equation.

We get lambda times y, x.

And then this corresponds to a system of two equations, 2x is

equal to lambda y and then you have 2y equals lambda x.

Of course, the third equation, which I forget.

Which is xy equals 1.

Let's do this in the following way.

Let's find y is 1/x, so let's substitute.

Substitute this in both equations.

So we get 2x is equal to lambda times 1/x and here 2 1/x is

equal to lambda times x.

So from this we can find that lambda is equal to 2x squared.

And so then we substitute in this.

2x squared, so we get 2 1/x is equal to 2x cubed.

Which means that x to the fourth is equal to 1.

Which means that x is equal to plus or minus 1.

So far so good?

OK, now we would two points.

We find two points.

One point is 1 -- when x is 1, we use this equation to find

that in this case y is also 1.

And the second is negative 1.

And again, y is also negative 1.

And then let's evaluate the value of the function,

f. f is x squared plus y squared so we get value 2.

And then here we also get the value 2.

So that looks like a puzzle because we just follow

blindly the method.

We find two points.

So we think well perhaps one of them is the maximum, the other

one is minimum, but when we evaluate the function we see

that the values are the same.

So what does it mean?

Does it really mean that the maximum value of the function

is 2 and the minimum value of the function is also 2?

That would mean that the function is constant, is

equal to 2 everywhere.

But this function is not constant, right?

It's x squared plus y squared.

For example, this is actually equal to 0 here.

Or it's not even constant.

That's not the valid argument because we have to look at the

restriction of the function to our curve, but the restriction

of the function to our curve is x squared plus 1/x

squared, right?

So again, it's quite clear that the function is not constant.

So what happens?

So to see what happens-- I mean, so far I just did

this calculation blindly.

I guess what you would do without drawing the picture,

you just do the calculation and then you see cost, oh gosh,

the answers are the same.

So that's strange.

What really happened?

So now let's find out what happened.

So the best thing to do is to go back to how we actually

derived the Lagrange equation in the first place.

When we derived the Lagrange equations we looked at the

level curves of our function.

In this case the level curves are extremely simple.

They are x squared plus y squared equals k.

And this of course is the equation of a circle of

radius square root of k.

So the level curves are concentric circles of

all possible radii.

And there's more.

More and more and more.

So each of these circles represents the set of points

for which the value of the function f is the same.

So for example, the function takes the same value

on this circle.

It takes the same value on this circle and so on.

Which means in particular that the function is the same here

and here and here and here, which are the points of

intersection of that level curve with our

curve, xy equals 1.

Now if you just look at this you see that the value of the

function f increases as we go outward.

As we go outward the radius of the circle becomes larger and

because the function is essentially the square of

the radius of the circle.

It grows when the radius becomes larger.

And likewise, it becomes smaller when the radius

becomes smaller.

But because the curve is unbounded you see that

this function doesn't have a maximum.

Because ant positive real value greater than the value at this

point will actually be realized.

And the value

at this point is equal to 2.

Any value will be realized.

If you want a value, you know, a million, the value a million

will be realized -- or maybe twice million would be easier.

So then it would be like x and y equal to 1,000.

You'll get twice, two times a million.

So any value will be realized because the curve is unbounded.

So that means that the function actually has no maximum.

This function has no maximum value on this curve.

So what about these values?

Well these values here realize that these two points, which I

have marked from the beginning.

And this actually you can see that these are the smallest

possible values because these are exactly the points where

the level curve for f touched our curve.

The level curve for f is a circle and it touches our

curve, the hyperbola, at this point and at this point.

So this is really the smallest valued, the minimal value

because if you take a radius any smaller than this

you will lose contact.

You lose intersection with our curve.

So therefore this is really the smallest possible value.

So I went through this argument in great detail on Tuesday.

I will not repeat it.

So that argument is valid for these two points.

And this argument shows that these are indeed the minimal

values, so it's not surprising that the two values

are the same.

They just both are attained.

Both gives us the minimum value.

It could happen for example, that I could just have changed

the setup and I could consider instead a curve where the right

top branch would be going here.

So it wouldn't be given by this equation but it would

a union of two curves.

One it would xy equal 1 in the third quadrant and the other

one would be xy equals 2 for example.

So then it would actually be higher.

In this case if we applied Lagrange method we would find

again, two points, but the values would be different.

In that case again, we've compared the values.

So if for example as a result of this calculation you could

actually get 2 and 3 say, if you chose the function a

slightly different way.

You could get different value.

And then it will be even more tempting for you to say OK,

this is maximum, this is minimum.

But actually I mean, this answer would not be correct.

One of those two answers would be miminum.

Namely, the one which is smaller.

But the function still wouldn't have a maximum because the

branches go to infinity.

In other words, don't think that the fact that they're both

equal is the only possible scenario which indicates that

the function doesn't have a maximum.

You could even have two different values, but both

of them-- say one of them would be minimum.

One of them would be neither maximum/minimum

and nor maximum.

It's also possible.

So these two are actually two minima.

Finally, there is the possibility that the function

doesn't have either maximal value or minimal value

on the given curve.

For instance, let's take the function y.

Let's take just half of the hyperbola.

Let our curve by y equals 1/x and y greater than 0.

And let's take as function f, let's just take y.

We can do that.

So in this case clearly there's no maximal value because

it goes to infinity.

Same reason, but there's also no minimal value for a

slightly different reason.

It's not because the function goes to minus infinity

the way it goes to plus infinity on this part.

It goes to 0 so you might be tempted to say that

the minimal value is 0.

but you can't say that because that value is never attained.

The value 0 is never attained.

You get as close as possible to it, but it's never attained.

So that means that there is no minimal value.

Because the 0 value is not attained, and any value which

is above 0 is attained, but it's not the smallest one

because you can always take 1/2 of it and you'd

get smaller values.

So this function has neither a maximum nor a minimum.

In other words, to summarize, it is boundedness which

guarantees the existence of maxima and minima.

If you have a bounded domain, you will always have a

maximum and a minimum.

If the domain is not bounded, or curve is not bounded in

this case, all bets are off.

Anything can happen.

You might have only a maximum, but no minimum.

Only minimum and no maximum or neither.

Finally, keep in mind the following thing that here

I wrote this equation just by itself.

I did not put any limits.

I didn't say, what are the ranges for x and y.

So if there are no limits it means that they

could be arbitrary.

That's why I drew the entire hyperbola.

But there could be a variation on this problem where -- let's

say, let's look at this problem and do the following

variation on this problem.

Where I would also say y equals 1/x, but I would actually

put explicitly the ranges.

Say x is between 1 and 2.

And then I will find maxima and minima of the function

f of xy equals y.

If I do that then my curve is not the entire hyperbola or

not the entire branch of the hyperbola, which is

drawn over there.

But only the part between 1 and 2.

And the part between 1 and 2 looks like this.

So this would be the two endpoints.

So this is 2 and this is 1.

This is 1 and this is 1/2.

So in this case you see the curve actually has boundary

points, so it is just like when we maximize, minimize functions

in one variable calculus on an interval, which includes

the endpoints.

So in this case the maximum, minimum could well be attained

at the endpoints, which is what happens here.

Here the maximum does exist, that it's at this point.

Because since I impose this condition I

cannot go any further.

In the previous example I had the entire hyperbola,

which went to infinity.

It was unbounded.

This guy is bounded.

It is certainly sitting inside a large enough disk.

This curve is bounded.

There is indeed a maximum and the minimum and the maximum

is when x is 1 and y is 1.

So let's just write f is 1 and the minimum is at x equal

2, in this f is 1/2.

Any questions about this?

So I try to give you several representative examples to give

you an idea of what are the possibilities and you should

keep these possibilities in mind when you do

problems like this.

When you solve problems like this.

Usually for an unbounded curve there's no way of telling

whether the points which you find are maxima and minima

just from the algebraic analysis like this.

You really have to visualize the picture.

Or use some way to reason, to argue, why it is

maximum or minimum.

In this case for example, let's say you don't want

to draw the picture.

You could argue as follows, you could say, OK, so both are the

same, which means that-- well, we know that the function

is not constant.

Both are the same so would be either maximum or minimum.

Which one is it?

Is it the maximum or minimum?

Well on this curve I could find the point for a very large x.

So let's say x is 1 million then y would

be 1 over 1 millions.

So it's like really small.

So the value would be 1 million squared.

On this curve I could find a point where the value is 1

million or million squared, right?

Which is greater than 2, so that means this is a

minimum and not a maximum.

So that's one way to argue even without drawing the picture,

but you have to have an additional argument to

say, which one is it, maximum or minimum.

So let's move on to the next subject.

And the next subject is integration.

I promised you at the beginning of this course that we will--

or maybe not promised.

Promised is not a good word, but I told you, I kind of gave

a preview and said that essentially you can break the

material into two parts.

One is integration and the other one is a differentiation.

These are in some sense, two opposite operations

that we do in calculus.

What we've studied in the last few weeks was the

differential calculus.

We studied things related to differentiation like Lagrange

method where to find the maxima and minima we had

to take derivatives.

We had to take partial derivatives for example, and

then solve some equations.

And now, for the next few weeks, we'll talk

about integration.

So today is the first installment of integration.

So what do we need to know about integration?

Well first of all, I would like to recall, as always, what we

learned about integration in the one-variable calculus.

Actually we already talked a little bit about this before

so I'll be very brief.

It one-variable calculus we are used to calculating integrals

of a function in one variable over an interval,

say from a to b.

So there are several things that we learned in that regard.

The first thing that we learned is that in the case when the

function is nonnegative on this interval, for

x between a and b.

So let's say this is a and this is b.

So if the function is nonnegative then the graph of

this function is going to lie entirely over this interval or

more precisely, the part of the graph above this interval or

corresponding to this interval will lie above the x-axis.

In other words, I want to avoid the situation where it goes

above and below the x-axis.

I'm not really losing much generality by assuming that

because even if were below I could just add a constant, a

significantly large constant to the function and

raise it above the axis.

So then the integral would be different from the original

integral by the integral of that constant.

But the integral of the constant we know.

It's that constant times b minus a.

We don't really lose much generality by assuming here

that the function is nonnegative on this interval.

And if it is nonnegative then actually this integral

represents the area what we call using informally

under the graph.

And when we say under the graph we mean the area of the region

bounded by the graph, the vertical lines y equal a and

y equal b and the x-axis.

Oh, yes. x equals, that's right.

Sorry.

Thank you. x equals a and -- This is y equals 0.

And this the graph, which is y equals f of x.

That's the first aspect.

That this is the way integral gives us the

area under the graph.

That's number one.

So the function is one variable.

The function is is one variable, but you get an area

of a two-dimensional object.

You start with a function in one variable, but you naturally

get a two-dimensional region because you look at the graph

and the graph lives on the plane.

You add one more variable y and then use the graph as

a boundary of this region.

So you've got a two-dimensional region and it has an area and

that area is represented by the integral.

That's the first aspect.

The second aspect of this, of the study of the integrals

is, how do we define it?

The first aspect is what does it represent?

And the answer is it represents the area.

The second aspect is, how do you define it?

And the way you define it is somewhat subtle.

The way we define it is we break this interval into

smaller pieces and then we approximate the function by

the step functions like this.

By just constant functions on each of these intervals.

And so on.

And that gives us the possibility to approximate the

entire area-- this entire area-- as the sum of areas of

all of those elementary rectangles.

So let's say here that one rectangle will look like this.

One of these rectangles will look like this.

Where there side will be delta x and this side

will be delta y.

That's actually not a good idea.

It's just going to be f.

Let's say this is a point, xi in the partition.

This is xi plus 1.

This will be f of xi.

And then the point is that we don't know a priori, at the

beginning, what the area of this complicated region is,

but we certainly know what the area of this one is.

The area of this one is f of xi times delta x because

it's a rectangle.

And for a rectangle the area is just a product of the sides.

So this is the important thing, which we have to know

in advance, the area of the elementary piece.

And after this, we take the sum.

Let's call this area number i, and then we take this sum

of this area's number i.

From 1 to n.

So let's say that there are n part, n pieces

in this partition.

And the size of each of them is delta x.

That's this delta x, which I wrote here.

So then this one, we take this as an approximation

to the value to the area.

And then the point is that as n goes to infinity, as the pieces

become smaller and smaller, this approximation for

functions satisfying some good properties like continuous

functions it's going to approximate this area

better and better.

So the actual area we will get in the limit when

n goes to infinity.

And that's this integral.

And so you recognize f of x dx as coming from this expression,

f of x delta x, which corresponds to the area of

this elementary rectangle.

There are some methods in mathematics which allow you to

show that this limit actually exists and so therefore

justifies this definition.

And again, for that you actually have to make some

assumptions in the function f.

But all the functions which we'll consider in this course

will satisfy this assumption, so I'm not going to

talk about those.

All right.

So that's the second aspect, the definition.

And finally, the third aspect is, how do you

actually compute it?

So I purposefully separate these two points.

The definition and the calculations because the

definition is rather complicated and in

some sense esoteric.

Because you are breaking something in smaller

pieces and so on.

So this is the hard part of this story.

But this is something which has been done.

Has been proved that this process gives you well-defined

definition of the integral and after that we have to chose an

efficient method to actually calculate this integral and

therefore calculate this area.

We're not going to actually calculate things by actually

breaking into pieces and taking the sum and taking the limit.

We're not going to do that each time.

In fact, we have a much more efficient method for

calculating these integrals and that's called the fundamental

theorem of calculus.

Of one variable calculus, or [UNINTELLIGIBLE]

formula.

And that's the formula which tells you that to find this

integral, you need to take the anti-derivative.

Where f if x is f prime of x.

So in other words, to calculate the integral you have to

perform the operation which opposite or reverse to get the

operation of differentiation.

And it is in the sense that we can say that integration is

reverse or opposite to differentiation.

Something which is not at all obvious from the original

definition as an area or as a limit of this partial sum,

which nevertheless is one of the most important

results here.

And this is what we use in practice to

calculate the integral.

I have summarized for you the story of the integral of a

function in one variable.

And in this course we're dealing with functions in

two and three variables.

So of course, we're going to have integrals pf such

functions as well, integrals for functions in two

and three variables.

The structure of the story is very similar to the structure

which I've just outlined.

It also has essentially three parts.

One is, what does it represent?

Two is, how do you define it?

And three, how do you compute it?

Let's talk about functions in two variables.

A function in two variables also has a graph.

So let's say you have function f of xy.

Function in two variables also has a graph and the graph now

lives in three dimensions.

So we draw a thee-dimensional coordinate system.

Where in addition to our variables x and y we

introduce one more variable, which we call z.

So the next step is to realize, what is the analog of this

area under the graph.

So here we're talking about the region which is bounded by the

graph and the x-axis and these vertical lines.

Third is, there's a clear analog of this in the

two-dimensional case.

Because in the two-dimensional case we can instead of the

inteval, x from a to b we can look at the rectangle, where x

is from a to b and y is from c to d.

So let me draw it.

So let's say this is x equal a, I mean this is x equal b and

this is x equal a and then this will be y equals c

and y equals d.

So I'm talking about this rectangle.

So this is a, this is b, this is c and this is d.

I'm talking about this rectangle.

Don't confuse this rectangle with this rectangle because

those are both rectangles, but they have totally

different meaning.

In this rectangle the variable is one side and the other side

corresponds to the function.

And now we're just talking about the variables.

Now we have two variables, so we have this rectangle

on the xy-plane.

Now let's suppose that the function f of xy, our

function, is nonnegative on this rectangle.

So that means that the graph of this function is going to lie

above the xy-plane if we look at the part of the graph

corresponding to this rectangle.

So what does it look like?

The way it's going to look is as follows.

So let me draw first the kind of the walls of this picture.

So it's going to be something above, something curvy

above this rectangle.

So let's say it could lool something like this.

This would be the part of the graph above this rectangle.

And the graph could continue, but we will only be interested

in what happens above this rectangle.

So now we clearly have a three-dimensional region, which

is bounded by these walls.

The walls correspond to-- so this would be dotted line.

So the walls correspond to this vertical planes, which are

obtained by taking these segments and kind of moving

them vertically up.

So you've got this three-dimensional region bonded

by those walls by this rectangle at the bottom.

And by the graph of the function at the top.

And this three-dimensional region is an analog for our

function in two variables of this two-dimensional region.

And the integral of the function f will represent

the volume of this three-dimensional region.

So we've got this three-dimensional region, which

we'll often call it solid.

We'll refer to it as solid.

So think of it as a piece of solid.

And the integral-- let me just write here-- the integral of

the function f of xy dA-- this will be the notation for this

integral-- over this rectangle.

Let's call this rectangle r.

So this is r, will represent the volume of this solid.

So you see, all dimensions get bumped by 1.

Here you had the function in one variable, so the bottom

of this picture is one-dimensional,

it's an interval.

The region is two-dimensional and it's represented

by a single integral.

Where as now you have a function in two-variables, so

instead of one you get two.

You have a three-dimensional region or solid.

The bottom of this region is a rectangle in your

original variables x and y.

And the volume of this three-dimensional object,

three-dimensional solid is represented by a double

integral, which is denoted like this.

Where dA sort of stands for the elementary area.

Just like dx was the notation for sort of

the elementary length.

So this is notation, which we will use.

And what I've explained now is the first aspect of the story,

which is what does this integral represent?

This represents the volume of this solid.

Provided that the function is above the xy-plane, but again

that assumption we can make without loss of generality

because any function can be made so by adding a

sufficiently large constant to it.

Now the second aspect of the story.

How do you actually define it?

And again, it's very much parallel to the

definition here.

You break this solid into smaller pieces.

To do that you first break the rectangle into smaller

rectangles by choosing some step, delta x and delta y.

So you kind of make a grid of rectangles with sizes

delta x and delta y.

And for each of these very small elementary rectangles,

you draw-- actually let's do this one.

For each of them you draw a sort of a skyscraper, which

goes all the way up to graph.

So that's sort of like a skyscraper, which sits at

this cell of this grid.

And then for each of them you do the same.

And then the point is that the entire volume can be

approximated as the sum of volumes of those skyscrapers.

So this is precisely analogous to what we did in the

one-dimensional case.

I mean, in the one-dimensional case the bottom was like a

little interval and now the bottom is going to be a

little rectangle of sizes delta x and delta y.

But otherwise, it looks exactly the same.

So here is going to be the height of this, is going to be

let's say if this is a point xi, yi on our partition, the

height will be the value of the function f of xi, yi.

Now we just use the same formula except it's no

longer area, it's volume.

And it doesn't depend just in i, but it depends on i and j,

so I actually should have said, yi, xi and yj.

The ij's cell of that grid.

So that will be volume ij.

This would be f of xi jy times delta x times delta y.

And when we take the sum of all of these volumes where n and m

go to 0. n and m being the numbers of partitions for

x and y, we will get a double intergral.

So exactly the same idea.

Approximate by sum of volumes of this very thin skyscrapers

and when the partition becomes finer and finer, this sum will

tend to the actual volume.

Provided that this function satisfies some natural

properties like being bounded and continuous.

So that's the definition.

But again, we're not going to use this definition to

actually compute things.

We want to use a much more powerful method like the method

which we have-- I have to be careful when I open the board.

Never know what's behind it.

We want to use a more powerful method for computation like the

fundamental theorem of calculus.

In other words, we would like to do it by taking some

anti-derivatives of some sorts, right?

And this is what I'm going to explain now, the computation.

Any questions so far?

Yes?

[UNINTELLIGIBLE PHRASE].

That's right.

Very good.

Thank you.

So actually double is going to be double summation.

That's actually a very good point.

I'm glad that you point this out because this illustrates

more clearly why this should be a double integral because this

is really a double summation.

Why is it a double summation?

Because it is a summation over little rectangles in this grid.

So this grid actually looks like this.

So there will be 1, 2, 3, up to n along side and the 1, 2,

3 up to m along this side.

So it's really a double sum and in the limit this double sum

becomes a double integral.

Any other questions?

So now we talk about how to compute this.

We again take as a hint we take the formula from the

one-dimensional calculus, which is that we essentially have to

take the anti-derivative of our function.

But if you have a function in two variables it's not clear

which anti-derivative you should take because actually

there are two functions, sorry, two variables.

When we talked about derivatives we saw that

there are actually two parts to derivatives.

Respect to x and respect to y.

Likewise, there are two partial anti-derivatives.

You can take the anti-derivative with respect

to x and respect to y.

And the point is that there is actually an anaolog of

this formula in which you actually have to do both.

You have first take the anti-derivative with respect to

one of two variables and then anti-derivative with respect to

the second one and that will give you the answer.

That's the idea.

So let me explain this.

So the computation is given by the following formula.

That this integral, f of xy dA over r can be written as what's

called the iterated integral.

Iterated meaning that we do something one after another.

A certain procedure one after another.

We iterate a certain procedure and that procedure in

essentially taking the anti-derivative, which we

should do twice because there are two variables.

So it's sort of very reasonable.

So the way it works is the following.

We first take the integral of f of xy with respect

to the variable x.

And so the limits will be a to b.

So we take this integral assuming that y is a constant.

This should remind you of the notion of parts of derivative.

So in fact when you do with that you can express this as

the difference of values of a sort of function with points b

and a and that function will be nothing but the anti-partial

derivative with respect to x of this function.

As a result you'll get a function depending on y because

think of this as a family of integrals depending on y.

So you have integrated out x, but y still remains

as a parameter.

So the resulting object is a function of y.

And then you just integrate this functional of

y from c to d dy.

That's called iterated integral because you iterate the

procedure of taking anti-derivative or doing

one-dimensional integral.

But you could also do it in the opposite order.

So in that sense it's kind of the reminiscent of the Clairaut

theorem, which told us that we can apply partial derivatives

in any order and we'll get the same result.

Likewise, here we're doing partial anti-derivatives and we

can apply them in either of the two possible orders giving

us the same answer.

So that would mean that first we integrate out dy.

As a result we'll get something which will depend on x.

So in this integral y is frozen.

And x is a live variable.

So we're integrating.

After we integrate it we start remembering about y and we get

a function of y, which we then integrate.

Likewise here, y is the live variable, which we integrate.

But x is a parameter.

When we make this integration we get something

which depend on x.

It's a function of x, which we then integrate itself

with respect to x.

So these are two different formulas for the same integral.

Depending on the choice of the order.

First x then y or first y and then x.

And the fact that you can write the integral like this is

what's often referred to as the Fubini theorem.

Again, this is something which we're not going to prove, but

we're going to use it in practical calculations.

Just like from the fundamental theorem of calculus, we didn't

really prove it, but we used it extensively to calculate

one-dimensional integrals.

So let's see how this works in practice.

OK, so let's do this example.

Suppose that r is the rectangle where x is from 0 to 2

and y is from 0 to 1.

And the function f of xy is x cubed, y cubed

plus 3xy squared.

So you want to compute the integral of f of xy dA

over this rectangle.

And I'm just using Fubini's theorem, so I have to choose

which way I want to integrate.

Which variable first goes first.

Let's say I want to do first the y variable.

So that means that first I do the integral from 0 to one. x

cubed y cubed plus 3xy squared dy.

And then I do the integral with respect to x from 0 to 2.

It is tempting to just continue writing this formula.

But then you have to carry with you both integration signs and

so on, so this is a sure way to make mistakes.

So I think it's much better to do the first integral, do the

inner integral first, get the result and substitute

it into the formula.

It's a much more straightforward way, I think.

You'll see it yourselves when you work on this.

So let's do the inner integral by itself. x cubed y cubed

plus 3xy squared dy.

From 0 to 1.

Use the fundamental theorem of calculus and assume that x is

just a scalar, is just a constant.

So we have to take the anti-derivative of this.

What's the anti-derivative of this?

The anti-derivative of y cubed is 1/4 of y to the fourths

and this is just a constant for now.

We have frozen it, just like when we were doing

partial derivatives.

So just carry x cubed.

Next take the anti-derivative of this again thinking

of x as a constant.

You get xy cubed.

And now you have to evaluate at 1 and 0.

So you get 1/4 of x cubed plus x.

And now we'll substitute it back.

We have now calculated the inner integral, so let's us

substitute it in this double integral.

So we'll get 1/4 x cubed plus x dx.

So we get 1 over.

So now that's just easy, it's just the usual way.

So that's going to be 1 over 16 x to the fourth plus

1/2 x squared from 2 to 0.

That's going to be 16/16.

That's 1 plus 1/2, so that's 3/2.

Sorry, plus 2. 3.

That's that answer.

Any questions?

Yes?

[INAUDIBLE]

Single integral?

[INAUDIBLE]

The question is why do write it as a double integral.

[INAUDIBLE]

Oh, you mean the notation for dA or for this.

I see.

So the question is, why do we use this notation.

Well see before when we separated we were writing

say f sub x or f sub y for partial derivatives.

So now, I see, so you probably mean to say that when we would

write it we would use this other d, we woudl use this

kind of curly d and now we're using this d.

Well because the reason is that this is really just d of x.

This is really like a differential.

So here there's no ambiguity.

Ambiguity arises when you have a function which depends

on two variables.

So then you have to say df respect to x or respect to y.

But here we're taking dx, x doesn't depend on anything.

So we don't have to give any additional

information about that.

It's just the differential.

When you have a function in one variable we still

write just a straight d.

So x is like a function of itself so that's why dx-- it's

the same dx which we use in the differentials actually.

So it is this dx and not this dx.

But for now just think of it as a notation, and don't

read too much into it.

Any other questions?

Yes?

[INAUDIBLE]

Well, I have to say that now we're studying integrals

and not differentials.

You should have asked me this question when we

studied differentials.

But since you asked me, I will answer it.

Think of this as a digression or think of it as a time

machine, we are going back a couple of weeks when we

talked about differentials.

So remember, df is f sub x dx plus f sub y dy.

So in principle you could write df/dx and this would be f

sub x plus f sub y dy/dx.

So you could so that.

And so, that by the way is related to derivatives

of implicit functions.

But this is not the same as df/dx, which is just

a notation for f sub x.

So here this is an addition term.

Because a differential has two terms.

One related to fx and one related to fy so you could

divide this, it's OK.

You get this expression for what it's worth.

And in fact, this is a good way to find dy/dx.

When you have x and y constraint.

For example if you know that f is equal to 0 or something.

f equals some scalar.

That gives you a way to calculate.

That's how you get the formula dy/dx is going to

be negative for fx/fy.

This is a formula we studied when we talked about

implicit differentiation.

But this on the hand with curly d is just a new notation for f

sub x, so that's the difference.

But in some sense, this is related because actually this

is the same dx as this dx.

But it's not like df because this is not like df.

F is actually outside of the differential.

This is just dx.

And for dx we don't use like this doesn't exist.

Only this exists.

This does exist.

Yes?

[INAUDIBLE]

Can I explain--

[INAUDIBLE]

I would love to, but actually I've got something

planned to talk about.

So maybe in the office hours?

All right.

But it might be that what I'm going to explain next is

the example from the book.

But let me take a look.

Maybe number two.

Well example number two by the way, is just like this one.

It looks like a different function, but it's

actually very similar.

But let me move on actually to a harder example.

More difficult example.

So, what else can we do?

For now the region of integration in this example,

n in example number two is a rectangle.

But we are actually going to study more complicated regions

because well we know that on the plane there are many

other regions as well.

So, maybe I should do it here.

So the next thing we're going to discuss is how to apply

this to compute integrals for more general regions.

So for example, suppose if you had the following region

that's defined by the following formulas.

Let's draw this.

So x is from 0 to 1 and for each value of x y is

confined between this value and this value.

So to sketch this region what we need to do is we need to

sketch the graph's of these two functions. y equals square root

of x and y equals 2 minus x.

So the first one is going to look like this because I only

look at it on this interval.

And 2 minus x will look like this.

This is 2, this is 1.

When we say for each value of x y is confined between square

root of x and 2 minus x, dramatically, this simply

means that it lives on this little vertical interval.

And so our region is just built from these little

vertical intervals.

It is just this domain, this this.

This shaded region.

So that's more complicated than regions we have looked at

so far, which were simply rectangles.

A rectangle like this.

So how do we approach this?

How do we calculate the integral when the regions

are given by such formulas?

So the point is that to compute that we just slightly

generalize our formula.

We still do it as an iterated integral but we first integrate

over y but we integrate with the bounds of integration

explicitly depending on x.

Namely, we'll go from square root of x to 2 minus x

and then we'll put our function, f of xy dy.

You see now before the bounds of integration

were say c and d.

They were fixed.

But now the bounds actually depend on x because that's

the way the region works.

For each value of x we have a certain segment or interval in

y and we are integrating over this interval, but the interval

itself, the bounds of this interval actually depend

on x in this way.

So there's no problem because we're integrating over y, so

it is OK if the limits of integration depend on x.

You certainly wouldn't want to put something

depending on y in here.

But putting the limits, which are functions of x only is OK.

The result of this calculations is something which depend on x

and it depends on x for two reasons.

First of all, the function f dependent on x.

So even in the old calculation when the limits were constant

the result was a function of x.

But now there's a second reason why it depends on x because

the limits also depend on x.

After you compute this you get a function of x and then you

integrate this function over the limits, over the

region given for x.

And that region already is independent of y

or anything else.

These are just constants, 0 y.

So that's the formula.

It slightly generalizes the old formula in that we now allow

the limits to depend explicitly on one of the variables.

So let me calculate this integral in a special case.

Let's say f of xy is 2xy.

So let's do the inner integral from square

root of x to 2 minus x .

So you have 2xy dy.

Take the anti-derivative.

Same rule as before, take the anti-derivative

of this function.

Anti-derivative of this function is x times y squared.

Because x is scalar.

And now you have to take it between 2 minus x

and square root of x.

So what do we get?

We get x times 2 minus x squared minus x times

squar root of x squared.

What do we get?

We get 4x minus 4x squared plus x cubed minus x squared.

So we got this.

So we got x cubed minus 5 x squared plus 4x.

So you see the result is just a function of x.

I mean, this calculation is not much more complicated than

the previous calculation.

The only difference is that in the previous calculation

the limites were 0 and 1.

OK, so you substitute 0 and 1 and you get a function of x.

Now the limits are square root of x, 2 minus x.

But again, you just substitute and you get a function of x.

You were going to get a function of x anyway.

You might as well allow limits to depend on x also.

Yes?

[INAUDIBLE]

Very good question.

I'll explain in a second.

Let me just finish this example and I'll explain it.

So what's the end result?

We just substitute this into the outer integral so we

get 1x cubed minus 5x squared plus x cubed.

So this is-- sorry, dx, so that's 1/4 x to the fourth

minus 5/3 x cubed plus 1/4 x to the fourth from 1 to 0, which

is 1/4 minus 5/3 plus 1/4

[INAUDIBLE]

x to the fourth.

Sorry, 1/5.

[INAUDIBLE]

Oh, yes.

All right.

So all of you and just me, huh?

OK.

You were right.

So 4x, right.

That's going to be 2x squared.

So plus 2.

Is that OK?

Then I'll let you calculate this.

Now this naturally begs the question, which you asked.

Which is, is it possible that we would have at some point

encounter integrals in which for both inner and outer

integral there would be some dependence of the

limits on x and y?

So let me answer this.

The point is that this will never be necessary, for

the following reason.

Let's look at the most general domain and the most

general domain could look something like this.

So the point is that I can always break it into what the

book calls regions of tyoe 1.

By cutting it by vertical lines in a clever way I break it here

into 5 pieces each of the 5 pieces can be represented

as a region of this type.

So all of them can be thought of in this way.

Well in this case that would be like it touches here, but this

would be-- for example, so this would be some function y equals

f 2 of x and this would be y equals f 1 of x.

So here you would have y equals f2 and here you will

have y equals f1 of x.

So when you have this region, what is a description of

this region? description is the x goes from a to b.

See no dependence on anything.

But for each x the values of y are bounded between

f 1 of x and f 2 of x.

For example, in this case f 1 of x was square root of

x and f 2 of x 2 minus x.

And any region can be broken into such and so therefore,

then the integral would be equal to the sum of integrals.

It goes without saying of course, that if you take an

integral over this entire region, double integral over

this entire region, this would be the sum of the

integrals over the pieces.

When you decompose it into a disjoint region like this of no

overlapping subregions then the integral can always be found as

the sum of the integrals of the parts.

Integral of the whole thing is a sum of integrals

of its parts.

And then each of those guys, you can represent in this way.

Then of course, the point is that sometimes it is

advantageous to represent it not by cutting by vertical

lines but by cutting by horizontal lines.

And this actually gives you a sort of a second way to

evaluate your integral.

And sometimes it can happen that one way the integral is

very difficult to compute, but the other way it's much easier.

So let me give you an example of this.

Here's an example.

So suppose you have the region like this.

So you have xy where y is between 0 and 1.

And x is between-- no sorry, x is between 0 and 1 and y is

between 0 and x squared.

And you're asked to compute the integral of the function square

root of x cubed plus 1 dA.

So let's draw this region. x between 0 and 1 and y

between 0 and x squared.

It's a parabola, like this.

So this is a region.

This is 1, this is 1.

And this is --

So since it's written in this way, we can write it down as an

iterate integral in the same way as we did in the

previous example.

So that means we would first be integrating x over x, right?

I mean, not the first, but the outer integral

would be respect to x.

But the inner integral would be with respect to y.

So that would be from 0 to x squared.

Square root of x cubed plus 1 dy.

Let's compute the inner integral.

So this inner integral is --

OK, so this function look very complicated.

But remember we're now integrating over y, so

this is a constant.

So constant function now because x is frozen.

The anti-derivative is actually this constant, so to speak

because it's independent of y times y.

And then you do it from 0 to x squared, so you get square root

of x cubed plus 1 times x squared.

And now you have to integrate the result, which is very easy

because you could introduce a new variable z, which is x

cubed and then dz is 3x squared dx.

So that this because 1/3 of dz and this becomes

1/3 of z plus 1, dz.

Which is very easy.

I'm just trying to save time because I only

have two minutes left.

So this is easy, but don't do that on your midterm.

I have an excuse because I don't have enough time to fill

it, and I want to explain something to you.

So here's a tricky question, which you'll find

on the homework.

The tricky question is the following.

Let's think of the same region, but from a

different point of view.

Let's cut it by horizontal lines.

If we cut by horizontal line then the same region would be

xy where now y is between 0 and 1 and x is between what? x is

between the square root of so this y, that's right.

Between square root of y, right?

And 1.

If I do that then the same integral will be

written like this.

So now the outer integral would be respect to y.

It's always the case.

That variable for which the limits are independent of

any variables, which are constant, like 0 and 1.

This is the variable, which is variable of outer integration.

The inner integration will be from square root of y to 1.

And the function will be x cubed plus 1-- same function,

but now we have to integrate this with respect to x and

you see this is much harder.

This is hard.

Because it is not clear what the anti-derivative is of this.

See, now you can appreciate how much easier it is to calculate

the anti-derivative of this function with respect to y

because y doesn't know about x.

So this is a constant.

So you're doing the anti-derivative of a

constant function.

That's why you get this very simple function and then you

luck out that you get x squared so it becomes much easier.

But here you get a function of x and it's not clear what

the anti-derivative is.

So you have to be aware of this.

That there are two different ways to compute and one way

could be much easier than the other.

I would like to say a few things about Lagrange

multipliers.

That's the subject of the lecture on Tuesday.

When we talk about Lagrange multipliers there's one

important aspect which one has to realize and that aspect has

to do with whether the curve we're dealing with

is bounded or not.

The example which we discussed in great detail last time was

the example where the curve was an ellipse.

An ellipse is bounded.

Now what do I mean by boundedness?

It's bounded because it is contained in a disk of

a large enough radius.

So in this case, I think this was 1 and this was 1/2.

And this is negative 1, negative 1/2.

So we can take a disk of radius 1 and this entire

curve will be inside.

Or if you want take a disk of radius 2, even bigger.

So for sure it'll be inside.

In other words there are no branches of this curve

which go to infinity.

An object is called bounded if it is contained entirely

in a large enough disk.

Or a bowl if we are in the three-dimensional space.

So this kind of curve is bounded.

And for bounded curves the method works in

the best possible way.

Namely, we will be able to find the maximum and the

minimum of our function.

Our function will have a maximum point, which was here

and a minimum point, which was here in our example.

But if the curve is not bounded then it may not have a

maximum or minimum, or both.

So that's an important remark that I wanted to make.

Because actually on the homework, as you have probably

already seen, there are some exercises where

that is the case.

So let me contrast that this to the following curve.

And this is actually exercise number 3 in 14.8.

I know it's on the homework, but it's my gift to you.

We'll of you like that I can do it again, maybe next

week or a couple of weeks.

So in this exercise the curve is given by the

equation xy equals 1.

So what is this curve?

Well to understand that it's best to rewrite this

equation in a more familiar form, y equals 1/x.

If you write it in this form we see immediately that this the

graph of the function 1/x.

And that's what we call hyperbola.

So that's actually something we learned a long time ago

and it looks like this.

It has two branches.

One here and one here, so this a point 1, 1 and this is a

point negative 1, negative 1.

And in this exercise your asked to find the maxima and minima

of the function f of xy, which is x squared plus y squared.

So this curve is not bounded.

While this was bounded, this is unbounded.

Why?

Because well, intuitively because it goes to infinity.

It

has branches which go all the way to infinity.

More precisely, no matter how big a disk you take,

it will not be contained.

This curve will not be contained in that disk.

There will still be some points outside.

So it is not bounded and that changes the

equation so to speak.

It changes the game.

So let's see, what are the maxima and minima?

So let's apply blindly, just the Lagrange method,

and see what we get.

So the Lagrange method tells us that nabla f -- we should

look at the equation nabla f equals lambda times nabla g.

In this particular case the function f is x squared

plus 2 plus y squared.

So this is 2x, 2y and the function g is xy because the

equation is xy equals 1.

This equation.

We get lambda times y, x.

And then this corresponds to a system of two equations, 2x is

equal to lambda y and then you have 2y equals lambda x.

Of course, the third equation, which I forget.

Which is xy equals 1.

Let's do this in the following way.

Let's find y is 1/x, so let's substitute.

Substitute this in both equations.

So we get 2x is equal to lambda times 1/x and here 2 1/x is

equal to lambda times x.

So from this we can find that lambda is equal to 2x squared.

And so then we substitute in this.

2x squared, so we get 2 1/x is equal to 2x cubed.

Which means that x to the fourth is equal to 1.

Which means that x is equal to plus or minus 1.

So far so good?

OK, now we would two points.

We find two points.

One point is 1 -- when x is 1, we use this equation to find

that in this case y is also 1.

And the second is negative 1.

And again, y is also negative 1.

And then let's evaluate the value of the function,

f. f is x squared plus y squared so we get value 2.

And then here we also get the value 2.

So that looks like a puzzle because we just follow

blindly the method.

We find two points.

So we think well perhaps one of them is the maximum, the other

one is minimum, but when we evaluate the function we see

that the values are the same.

So what does it mean?

Does it really mean that the maximum value of the function

is 2 and the minimum value of the function is also 2?

That would mean that the function is constant, is

equal to 2 everywhere.

But this function is not constant, right?

It's x squared plus y squared.

For example, this is actually equal to 0 here.

Or it's not even constant.

That's not the valid argument because we have to look at the

restriction of the function to our curve, but the restriction

of the function to our curve is x squared plus 1/x

squared, right?

So again, it's quite clear that the function is not constant.

So what happens?

So to see what happens-- I mean, so far I just did

this calculation blindly.

I guess what you would do without drawing the picture,

you just do the calculation and then you see cost, oh gosh,

the answers are the same.

So that's strange.

What really happened?

So now let's find out what happened.

So the best thing to do is to go back to how we actually

derived the Lagrange equation in the first place.

When we derived the Lagrange equations we looked at the

level curves of our function.

In this case the level curves are extremely simple.

They are x squared plus y squared equals k.

And this of course is the equation of a circle of

radius square root of k.

So the level curves are concentric circles of

all possible radii.

And there's more.

More and more and more.

So each of these circles represents the set of points

for which the value of the function f is the same.

So for example, the function takes the same value

on this circle.

It takes the same value on this circle and so on.

Which means in particular that the function is the same here

and here and here and here, which are the points of

intersection of that level curve with our

curve, xy equals 1.

Now if you just look at this you see that the value of the

function f increases as we go outward.

As we go outward the radius of the circle becomes larger and

because the function is essentially the square of

the radius of the circle.

It grows when the radius becomes larger.

And likewise, it becomes smaller when the radius

becomes smaller.

But because the curve is unbounded you see that

this function doesn't have a maximum.

Because ant positive real value greater than the value at this

point will actually be realized.

And the value

at this point is equal to 2.

Any value will be realized.

If you want a value, you know, a million, the value a million

will be realized -- or maybe twice million would be easier.

So then it would be like x and y equal to 1,000.

You'll get twice, two times a million.

So any value will be realized because the curve is unbounded.

So that means that the function actually has no maximum.

This function has no maximum value on this curve.

So what about these values?

Well these values here realize that these two points, which I

have marked from the beginning.

And this actually you can see that these are the smallest

possible values because these are exactly the points where

the level curve for f touched our curve.

The level curve for f is a circle and it touches our

curve, the hyperbola, at this point and at this point.

So this is really the smallest valued, the minimal value

because if you take a radius any smaller than this

you will lose contact.

You lose intersection with our curve.

So therefore this is really the smallest possible value.

So I went through this argument in great detail on Tuesday.

I will not repeat it.

So that argument is valid for these two points.

And this argument shows that these are indeed the minimal

values, so it's not surprising that the two values

are the same.

They just both are attained.

Both gives us the minimum value.

It could happen for example, that I could just have changed

the setup and I could consider instead a curve where the right

top branch would be going here.

So it wouldn't be given by this equation but it would

a union of two curves.

One it would xy equal 1 in the third quadrant and the other

one would be xy equals 2 for example.

So then it would actually be higher.

In this case if we applied Lagrange method we would find

again, two points, but the values would be different.

In that case again, we've compared the values.

So if for example as a result of this calculation you could

actually get 2 and 3 say, if you chose the function a

slightly different way.

You could get different value.

And then it will be even more tempting for you to say OK,

this is maximum, this is minimum.

But actually I mean, this answer would not be correct.

One of those two answers would be miminum.

Namely, the one which is smaller.

But the function still wouldn't have a maximum because the

branches go to infinity.

In other words, don't think that the fact that they're both

equal is the only possible scenario which indicates that

the function doesn't have a maximum.

You could even have two different values, but both

of them-- say one of them would be minimum.

One of them would be neither maximum/minimum

and nor maximum.

It's also possible.

So these two are actually two minima.

Finally, there is the possibility that the function

doesn't have either maximal value or minimal value

on the given curve.

For instance, let's take the function y.

Let's take just half of the hyperbola.

Let our curve by y equals 1/x and y greater than 0.

And let's take as function f, let's just take y.

We can do that.

So in this case clearly there's no maximal value because

it goes to infinity.

Same reason, but there's also no minimal value for a

slightly different reason.

It's not because the function goes to minus infinity

the way it goes to plus infinity on this part.

It goes to 0 so you might be tempted to say that

the minimal value is 0.

but you can't say that because that value is never attained.

The value 0 is never attained.

You get as close as possible to it, but it's never attained.

So that means that there is no minimal value.

Because the 0 value is not attained, and any value which

is above 0 is attained, but it's not the smallest one

because you can always take 1/2 of it and you'd

get smaller values.

So this function has neither a maximum nor a minimum.

In other words, to summarize, it is boundedness which

guarantees the existence of maxima and minima.

If you have a bounded domain, you will always have a

maximum and a minimum.

If the domain is not bounded, or curve is not bounded in

this case, all bets are off.

Anything can happen.

You might have only a maximum, but no minimum.

Only minimum and no maximum or neither.

Finally, keep in mind the following thing that here

I wrote this equation just by itself.

I did not put any limits.

I didn't say, what are the ranges for x and y.

So if there are no limits it means that they

could be arbitrary.

That's why I drew the entire hyperbola.

But there could be a variation on this problem where -- let's

say, let's look at this problem and do the following

variation on this problem.

Where I would also say y equals 1/x, but I would actually

put explicitly the ranges.

Say x is between 1 and 2.

And then I will find maxima and minima of the function

f of xy equals y.

If I do that then my curve is not the entire hyperbola or

not the entire branch of the hyperbola, which is

drawn over there.

But only the part between 1 and 2.

And the part between 1 and 2 looks like this.

So this would be the two endpoints.

So this is 2 and this is 1.

This is 1 and this is 1/2.

So in this case you see the curve actually has boundary

points, so it is just like when we maximize, minimize functions

in one variable calculus on an interval, which includes

the endpoints.

So in this case the maximum, minimum could well be attained

at the endpoints, which is what happens here.

Here the maximum does exist, that it's at this point.

Because since I impose this condition I

cannot go any further.

In the previous example I had the entire hyperbola,

which went to infinity.

It was unbounded.

This guy is bounded.

It is certainly sitting inside a large enough disk.

This curve is bounded.

There is indeed a maximum and the minimum and the maximum

is when x is 1 and y is 1.

So let's just write f is 1 and the minimum is at x equal

2, in this f is 1/2.

Any questions about this?

So I try to give you several representative examples to give

you an idea of what are the possibilities and you should

keep these possibilities in mind when you do

problems like this.

When you solve problems like this.

Usually for an unbounded curve there's no way of telling

whether the points which you find are maxima and minima

just from the algebraic analysis like this.

You really have to visualize the picture.

Or use some way to reason, to argue, why it is

maximum or minimum.

In this case for example, let's say you don't want

to draw the picture.

You could argue as follows, you could say, OK, so both are the

same, which means that-- well, we know that the function

is not constant.

Both are the same so would be either maximum or minimum.

Which one is it?

Is it the maximum or minimum?

Well on this curve I could find the point for a very large x.

So let's say x is 1 million then y would

be 1 over 1 millions.

So it's like really small.

So the value would be 1 million squared.

On this curve I could find a point where the value is 1

million or million squared, right?

Which is greater than 2, so that means this is a

minimum and not a maximum.

So that's one way to argue even without drawing the picture,

but you have to have an additional argument to

say, which one is it, maximum or minimum.

So let's move on to the next subject.

And the next subject is integration.

I promised you at the beginning of this course that we will--

or maybe not promised.

Promised is not a good word, but I told you, I kind of gave

a preview and said that essentially you can break the

material into two parts.

One is integration and the other one is a differentiation.

These are in some sense, two opposite operations

that we do in calculus.

What we've studied in the last few weeks was the

differential calculus.

We studied things related to differentiation like Lagrange

method where to find the maxima and minima we had

to take derivatives.

We had to take partial derivatives for example, and

then solve some equations.

And now, for the next few weeks, we'll talk

about integration.

So today is the first installment of integration.

So what do we need to know about integration?

Well first of all, I would like to recall, as always, what we

learned about integration in the one-variable calculus.

Actually we already talked a little bit about this before

so I'll be very brief.

It one-variable calculus we are used to calculating integrals

of a function in one variable over an interval,

say from a to b.

So there are several things that we learned in that regard.

The first thing that we learned is that in the case when the

function is nonnegative on this interval, for

x between a and b.

So let's say this is a and this is b.

So if the function is nonnegative then the graph of

this function is going to lie entirely over this interval or

more precisely, the part of the graph above this interval or

corresponding to this interval will lie above the x-axis.

In other words, I want to avoid the situation where it goes

above and below the x-axis.

I'm not really losing much generality by assuming that

because even if were below I could just add a constant, a

significantly large constant to the function and

raise it above the axis.

So then the integral would be different from the original

integral by the integral of that constant.

But the integral of the constant we know.

It's that constant times b minus a.

We don't really lose much generality by assuming here

that the function is nonnegative on this interval.

And if it is nonnegative then actually this integral

represents the area what we call using informally

under the graph.

And when we say under the graph we mean the area of the region

bounded by the graph, the vertical lines y equal a and

y equal b and the x-axis.

Oh, yes. x equals, that's right.

Sorry.

Thank you. x equals a and -- This is y equals 0.

And this the graph, which is y equals f of x.

That's the first aspect.

That this is the way integral gives us the

area under the graph.

That's number one.

So the function is one variable.

The function is is one variable, but you get an area

of a two-dimensional object.

You start with a function in one variable, but you naturally

get a two-dimensional region because you look at the graph

and the graph lives on the plane.

You add one more variable y and then use the graph as

a boundary of this region.

So you've got a two-dimensional region and it has an area and

that area is represented by the integral.

That's the first aspect.

The second aspect of this, of the study of the integrals

is, how do we define it?

The first aspect is what does it represent?

And the answer is it represents the area.

The second aspect is, how do you define it?

And the way you define it is somewhat subtle.

The way we define it is we break this interval into

smaller pieces and then we approximate the function by

the step functions like this.

By just constant functions on each of these intervals.

And so on.

And that gives us the possibility to approximate the

entire area-- this entire area-- as the sum of areas of

all of those elementary rectangles.

So let's say here that one rectangle will look like this.

One of these rectangles will look like this.

Where there side will be delta x and this side

will be delta y.

That's actually not a good idea.

It's just going to be f.

Let's say this is a point, xi in the partition.

This is xi plus 1.

This will be f of xi.

And then the point is that we don't know a priori, at the

beginning, what the area of this complicated region is,

but we certainly know what the area of this one is.

The area of this one is f of xi times delta x because

it's a rectangle.

And for a rectangle the area is just a product of the sides.

So this is the important thing, which we have to know

in advance, the area of the elementary piece.

And after this, we take the sum.

Let's call this area number i, and then we take this sum

of this area's number i.

From 1 to n.

So let's say that there are n part, n pieces

in this partition.

And the size of each of them is delta x.

That's this delta x, which I wrote here.

So then this one, we take this as an approximation

to the value to the area.

And then the point is that as n goes to infinity, as the pieces

become smaller and smaller, this approximation for

functions satisfying some good properties like continuous

functions it's going to approximate this area

better and better.

So the actual area we will get in the limit when

n goes to infinity.

And that's this integral.

And so you recognize f of x dx as coming from this expression,

f of x delta x, which corresponds to the area of

this elementary rectangle.

There are some methods in mathematics which allow you to

show that this limit actually exists and so therefore

justifies this definition.

And again, for that you actually have to make some

assumptions in the function f.

But all the functions which we'll consider in this course

will satisfy this assumption, so I'm not going to

talk about those.

All right.

So that's the second aspect, the definition.

And finally, the third aspect is, how do you

actually compute it?

So I purposefully separate these two points.

The definition and the calculations because the

definition is rather complicated and in

some sense esoteric.

Because you are breaking something in smaller

pieces and so on.

So this is the hard part of this story.

But this is something which has been done.

Has been proved that this process gives you well-defined

definition of the integral and after that we have to chose an

efficient method to actually calculate this integral and

therefore calculate this area.

We're not going to actually calculate things by actually

breaking into pieces and taking the sum and taking the limit.

We're not going to do that each time.

In fact, we have a much more efficient method for

calculating these integrals and that's called the fundamental

theorem of calculus.

Of one variable calculus, or [UNINTELLIGIBLE]

formula.

And that's the formula which tells you that to find this

integral, you need to take the anti-derivative.

Where f if x is f prime of x.

So in other words, to calculate the integral you have to

perform the operation which opposite or reverse to get the

operation of differentiation.

And it is in the sense that we can say that integration is

reverse or opposite to differentiation.

Something which is not at all obvious from the original

definition as an area or as a limit of this partial sum,

which nevertheless is one of the most important

results here.

And this is what we use in practice to

calculate the integral.

I have summarized for you the story of the integral of a

function in one variable.

And in this course we're dealing with functions in

two and three variables.

So of course, we're going to have integrals pf such

functions as well, integrals for functions in two

and three variables.

The structure of the story is very similar to the structure

which I've just outlined.

It also has essentially three parts.

One is, what does it represent?

Two is, how do you define it?

And three, how do you compute it?

Let's talk about functions in two variables.

A function in two variables also has a graph.

So let's say you have function f of xy.

Function in two variables also has a graph and the graph now

lives in three dimensions.

So we draw a thee-dimensional coordinate system.

Where in addition to our variables x and y we

introduce one more variable, which we call z.

So the next step is to realize, what is the analog of this

area under the graph.

So here we're talking about the region which is bounded by the

graph and the x-axis and these vertical lines.

Third is, there's a clear analog of this in the

two-dimensional case.

Because in the two-dimensional case we can instead of the

inteval, x from a to b we can look at the rectangle, where x

is from a to b and y is from c to d.

So let me draw it.

So let's say this is x equal a, I mean this is x equal b and

this is x equal a and then this will be y equals c

and y equals d.

So I'm talking about this rectangle.

So this is a, this is b, this is c and this is d.

I'm talking about this rectangle.

Don't confuse this rectangle with this rectangle because

those are both rectangles, but they have totally

different meaning.

In this rectangle the variable is one side and the other side

corresponds to the function.

And now we're just talking about the variables.

Now we have two variables, so we have this rectangle

on the xy-plane.

Now let's suppose that the function f of xy, our

function, is nonnegative on this rectangle.

So that means that the graph of this function is going to lie

above the xy-plane if we look at the part of the graph

corresponding to this rectangle.

So what does it look like?

The way it's going to look is as follows.

So let me draw first the kind of the walls of this picture.

So it's going to be something above, something curvy

above this rectangle.

So let's say it could lool something like this.

This would be the part of the graph above this rectangle.

And the graph could continue, but we will only be interested

in what happens above this rectangle.

So now we clearly have a three-dimensional region, which

is bounded by these walls.

The walls correspond to-- so this would be dotted line.

So the walls correspond to this vertical planes, which are

obtained by taking these segments and kind of moving

them vertically up.

So you've got this three-dimensional region bonded

by those walls by this rectangle at the bottom.

And by the graph of the function at the top.

And this three-dimensional region is an analog for our

function in two variables of this two-dimensional region.

And the integral of the function f will represent

the volume of this three-dimensional region.

So we've got this three-dimensional region, which

we'll often call it solid.

We'll refer to it as solid.

So think of it as a piece of solid.

And the integral-- let me just write here-- the integral of

the function f of xy dA-- this will be the notation for this

integral-- over this rectangle.

Let's call this rectangle r.

So this is r, will represent the volume of this solid.

So you see, all dimensions get bumped by 1.

Here you had the function in one variable, so the bottom

of this picture is one-dimensional,

it's an interval.

The region is two-dimensional and it's represented

by a single integral.

Where as now you have a function in two-variables, so

instead of one you get two.

You have a three-dimensional region or solid.

The bottom of this region is a rectangle in your

original variables x and y.

And the volume of this three-dimensional object,

three-dimensional solid is represented by a double

integral, which is denoted like this.

Where dA sort of stands for the elementary area.

Just like dx was the notation for sort of

the elementary length.

So this is notation, which we will use.

And what I've explained now is the first aspect of the story,

which is what does this integral represent?

This represents the volume of this solid.

Provided that the function is above the xy-plane, but again

that assumption we can make without loss of generality

because any function can be made so by adding a

sufficiently large constant to it.

Now the second aspect of the story.

How do you actually define it?

And again, it's very much parallel to the

definition here.

You break this solid into smaller pieces.

To do that you first break the rectangle into smaller

rectangles by choosing some step, delta x and delta y.

So you kind of make a grid of rectangles with sizes

delta x and delta y.

And for each of these very small elementary rectangles,

you draw-- actually let's do this one.

For each of them you draw a sort of a skyscraper, which

goes all the way up to graph.

So that's sort of like a skyscraper, which sits at

this cell of this grid.

And then for each of them you do the same.

And then the point is that the entire volume can be

approximated as the sum of volumes of those skyscrapers.

So this is precisely analogous to what we did in the

one-dimensional case.

I mean, in the one-dimensional case the bottom was like a

little interval and now the bottom is going to be a

little rectangle of sizes delta x and delta y.

But otherwise, it looks exactly the same.

So here is going to be the height of this, is going to be

let's say if this is a point xi, yi on our partition, the

height will be the value of the function f of xi, yi.

Now we just use the same formula except it's no

longer area, it's volume.

And it doesn't depend just in i, but it depends on i and j,

so I actually should have said, yi, xi and yj.

The ij's cell of that grid.

So that will be volume ij.

This would be f of xi jy times delta x times delta y.

And when we take the sum of all of these volumes where n and m

go to 0. n and m being the numbers of partitions for

x and y, we will get a double intergral.

So exactly the same idea.

Approximate by sum of volumes of this very thin skyscrapers

and when the partition becomes finer and finer, this sum will

tend to the actual volume.

Provided that this function satisfies some natural

properties like being bounded and continuous.

So that's the definition.

But again, we're not going to use this definition to

actually compute things.

We want to use a much more powerful method like the method

which we have-- I have to be careful when I open the board.

Never know what's behind it.

We want to use a more powerful method for computation like the

fundamental theorem of calculus.

In other words, we would like to do it by taking some

anti-derivatives of some sorts, right?

And this is what I'm going to explain now, the computation.

Any questions so far?

Yes?

[UNINTELLIGIBLE PHRASE].

That's right.

Very good.

Thank you.

So actually double is going to be double summation.

That's actually a very good point.

I'm glad that you point this out because this illustrates

more clearly why this should be a double integral because this

is really a double summation.

Why is it a double summation?

Because it is a summation over little rectangles in this grid.

So this grid actually looks like this.

So there will be 1, 2, 3, up to n along side and the 1, 2,

3 up to m along this side.

So it's really a double sum and in the limit this double sum

becomes a double integral.

Any other questions?

So now we talk about how to compute this.

We again take as a hint we take the formula from the

one-dimensional calculus, which is that we essentially have to

take the anti-derivative of our function.

But if you have a function in two variables it's not clear

which anti-derivative you should take because actually

there are two functions, sorry, two variables.

When we talked about derivatives we saw that

there are actually two parts to derivatives.

Respect to x and respect to y.

Likewise, there are two partial anti-derivatives.

You can take the anti-derivative with respect

to x and respect to y.

And the point is that there is actually an anaolog of

this formula in which you actually have to do both.

You have first take the anti-derivative with respect to

one of two variables and then anti-derivative with respect to

the second one and that will give you the answer.

That's the idea.

So let me explain this.

So the computation is given by the following formula.

That this integral, f of xy dA over r can be written as what's

called the iterated integral.

Iterated meaning that we do something one after another.

A certain procedure one after another.

We iterate a certain procedure and that procedure in

essentially taking the anti-derivative, which we

should do twice because there are two variables.

So it's sort of very reasonable.

So the way it works is the following.

We first take the integral of f of xy with respect

to the variable x.

And so the limits will be a to b.

So we take this integral assuming that y is a constant.

This should remind you of the notion of parts of derivative.

So in fact when you do with that you can express this as

the difference of values of a sort of function with points b

and a and that function will be nothing but the anti-partial

derivative with respect to x of this function.

As a result you'll get a function depending on y because

think of this as a family of integrals depending on y.

So you have integrated out x, but y still remains

as a parameter.

So the resulting object is a function of y.

And then you just integrate this functional of

y from c to d dy.

That's called iterated integral because you iterate the

procedure of taking anti-derivative or doing

one-dimensional integral.

But you could also do it in the opposite order.

So in that sense it's kind of the reminiscent of the Clairaut

theorem, which told us that we can apply partial derivatives

in any order and we'll get the same result.

Likewise, here we're doing partial anti-derivatives and we

can apply them in either of the two possible orders giving

us the same answer.

So that would mean that first we integrate out dy.

As a result we'll get something which will depend on x.

So in this integral y is frozen.

And x is a live variable.

So we're integrating.

After we integrate it we start remembering about y and we get

a function of y, which we then integrate.

Likewise here, y is the live variable, which we integrate.

But x is a parameter.

When we make this integration we get something

which depend on x.

It's a function of x, which we then integrate itself

with respect to x.

So these are two different formulas for the same integral.

Depending on the choice of the order.

First x then y or first y and then x.

And the fact that you can write the integral like this is

what's often referred to as the Fubini theorem.

Again, this is something which we're not going to prove, but

we're going to use it in practical calculations.

Just like from the fundamental theorem of calculus, we didn't

really prove it, but we used it extensively to calculate

one-dimensional integrals.

So let's see how this works in practice.

OK, so let's do this example.

Suppose that r is the rectangle where x is from 0 to 2

and y is from 0 to 1.

And the function f of xy is x cubed, y cubed

plus 3xy squared.

So you want to compute the integral of f of xy dA

over this rectangle.

And I'm just using Fubini's theorem, so I have to choose

which way I want to integrate.

Which variable first goes first.

Let's say I want to do first the y variable.

So that means that first I do the integral from 0 to one. x

cubed y cubed plus 3xy squared dy.

And then I do the integral with respect to x from 0 to 2.

It is tempting to just continue writing this formula.

But then you have to carry with you both integration signs and

so on, so this is a sure way to make mistakes.

So I think it's much better to do the first integral, do the

inner integral first, get the result and substitute

it into the formula.

It's a much more straightforward way, I think.

You'll see it yourselves when you work on this.

So let's do the inner integral by itself. x cubed y cubed

plus 3xy squared dy.

From 0 to 1.

Use the fundamental theorem of calculus and assume that x is

just a scalar, is just a constant.

So we have to take the anti-derivative of this.

What's the anti-derivative of this?

The anti-derivative of y cubed is 1/4 of y to the fourths

and this is just a constant for now.

We have frozen it, just like when we were doing

partial derivatives.

So just carry x cubed.

Next take the anti-derivative of this again thinking

of x as a constant.

You get xy cubed.

And now you have to evaluate at 1 and 0.

So you get 1/4 of x cubed plus x.

And now we'll substitute it back.

We have now calculated the inner integral, so let's us

substitute it in this double integral.

So we'll get 1/4 x cubed plus x dx.

So we get 1 over.

So now that's just easy, it's just the usual way.

So that's going to be 1 over 16 x to the fourth plus

1/2 x squared from 2 to 0.

That's going to be 16/16.

That's 1 plus 1/2, so that's 3/2.

Sorry, plus 2. 3.

That's that answer.

Any questions?

Yes?

[INAUDIBLE]

Single integral?

[INAUDIBLE]

The question is why do write it as a double integral.

[INAUDIBLE]

Oh, you mean the notation for dA or for this.

I see.

So the question is, why do we use this notation.

Well see before when we separated we were writing

say f sub x or f sub y for partial derivatives.

So now, I see, so you probably mean to say that when we would

write it we would use this other d, we woudl use this

kind of curly d and now we're using this d.

Well because the reason is that this is really just d of x.

This is really like a differential.

So here there's no ambiguity.

Ambiguity arises when you have a function which depends

on two variables.

So then you have to say df respect to x or respect to y.

But here we're taking dx, x doesn't depend on anything.

So we don't have to give any additional

information about that.

It's just the differential.

When you have a function in one variable we still

write just a straight d.

So x is like a function of itself so that's why dx-- it's

the same dx which we use in the differentials actually.

So it is this dx and not this dx.

But for now just think of it as a notation, and don't

read too much into it.

Any other questions?

Yes?

[INAUDIBLE]

Well, I have to say that now we're studying integrals

and not differentials.

You should have asked me this question when we

studied differentials.

But since you asked me, I will answer it.

Think of this as a digression or think of it as a time

machine, we are going back a couple of weeks when we

talked about differentials.

So remember, df is f sub x dx plus f sub y dy.

So in principle you could write df/dx and this would be f

sub x plus f sub y dy/dx.

So you could so that.

And so, that by the way is related to derivatives

of implicit functions.

But this is not the same as df/dx, which is just

a notation for f sub x.

So here this is an addition term.

Because a differential has two terms.

One related to fx and one related to fy so you could

divide this, it's OK.

You get this expression for what it's worth.

And in fact, this is a good way to find dy/dx.

When you have x and y constraint.

For example if you know that f is equal to 0 or something.

f equals some scalar.

That gives you a way to calculate.

That's how you get the formula dy/dx is going to

be negative for fx/fy.

This is a formula we studied when we talked about

implicit differentiation.

But this on the hand with curly d is just a new notation for f

sub x, so that's the difference.

But in some sense, this is related because actually this

is the same dx as this dx.

But it's not like df because this is not like df.

F is actually outside of the differential.

This is just dx.

And for dx we don't use like this doesn't exist.

Only this exists.

This does exist.

Yes?

[INAUDIBLE]

Can I explain--

[INAUDIBLE]

I would love to, but actually I've got something

planned to talk about.

So maybe in the office hours?

All right.

But it might be that what I'm going to explain next is

the example from the book.

But let me take a look.

Maybe number two.

Well example number two by the way, is just like this one.

It looks like a different function, but it's

actually very similar.

But let me move on actually to a harder example.

More difficult example.

So, what else can we do?

For now the region of integration in this example,

n in example number two is a rectangle.

But we are actually going to study more complicated regions

because well we know that on the plane there are many

other regions as well.

So, maybe I should do it here.

So the next thing we're going to discuss is how to apply

this to compute integrals for more general regions.

So for example, suppose if you had the following region

that's defined by the following formulas.

Let's draw this.

So x is from 0 to 1 and for each value of x y is

confined between this value and this value.

So to sketch this region what we need to do is we need to

sketch the graph's of these two functions. y equals square root

of x and y equals 2 minus x.

So the first one is going to look like this because I only

look at it on this interval.

And 2 minus x will look like this.

This is 2, this is 1.

When we say for each value of x y is confined between square

root of x and 2 minus x, dramatically, this simply

means that it lives on this little vertical interval.

And so our region is just built from these little

vertical intervals.

It is just this domain, this this.

This shaded region.

So that's more complicated than regions we have looked at

so far, which were simply rectangles.

A rectangle like this.

So how do we approach this?

How do we calculate the integral when the regions

are given by such formulas?

So the point is that to compute that we just slightly

generalize our formula.

We still do it as an iterated integral but we first integrate

over y but we integrate with the bounds of integration

explicitly depending on x.

Namely, we'll go from square root of x to 2 minus x

and then we'll put our function, f of xy dy.

You see now before the bounds of integration

were say c and d.

They were fixed.

But now the bounds actually depend on x because that's

the way the region works.

For each value of x we have a certain segment or interval in

y and we are integrating over this interval, but the interval

itself, the bounds of this interval actually depend

on x in this way.

So there's no problem because we're integrating over y, so

it is OK if the limits of integration depend on x.

You certainly wouldn't want to put something

depending on y in here.

But putting the limits, which are functions of x only is OK.

The result of this calculations is something which depend on x

and it depends on x for two reasons.

First of all, the function f dependent on x.

So even in the old calculation when the limits were constant

the result was a function of x.

But now there's a second reason why it depends on x because

the limits also depend on x.

After you compute this you get a function of x and then you

integrate this function over the limits, over the

region given for x.

And that region already is independent of y

or anything else.

These are just constants, 0 y.

So that's the formula.

It slightly generalizes the old formula in that we now allow

the limits to depend explicitly on one of the variables.

So let me calculate this integral in a special case.

Let's say f of xy is 2xy.

So let's do the inner integral from square

root of x to 2 minus x .

So you have 2xy dy.

Take the anti-derivative.

Same rule as before, take the anti-derivative

of this function.

Anti-derivative of this function is x times y squared.

Because x is scalar.

And now you have to take it between 2 minus x

and square root of x.

So what do we get?

We get x times 2 minus x squared minus x times

squar root of x squared.

What do we get?

We get 4x minus 4x squared plus x cubed minus x squared.

So we got this.

So we got x cubed minus 5 x squared plus 4x.

So you see the result is just a function of x.

I mean, this calculation is not much more complicated than

the previous calculation.

The only difference is that in the previous calculation

the limites were 0 and 1.

OK, so you substitute 0 and 1 and you get a function of x.

Now the limits are square root of x, 2 minus x.

But again, you just substitute and you get a function of x.

You were going to get a function of x anyway.

You might as well allow limits to depend on x also.

Yes?

[INAUDIBLE]

Very good question.

I'll explain in a second.

Let me just finish this example and I'll explain it.

So what's the end result?

We just substitute this into the outer integral so we

get 1x cubed minus 5x squared plus x cubed.

So this is-- sorry, dx, so that's 1/4 x to the fourth

minus 5/3 x cubed plus 1/4 x to the fourth from 1 to 0, which

is 1/4 minus 5/3 plus 1/4

[INAUDIBLE]

x to the fourth.

Sorry, 1/5.

[INAUDIBLE]

Oh, yes.

All right.

So all of you and just me, huh?

OK.

You were right.

So 4x, right.

That's going to be 2x squared.

So plus 2.

Is that OK?

Then I'll let you calculate this.

Now this naturally begs the question, which you asked.

Which is, is it possible that we would have at some point

encounter integrals in which for both inner and outer

integral there would be some dependence of the

limits on x and y?

So let me answer this.

The point is that this will never be necessary, for

the following reason.

Let's look at the most general domain and the most

general domain could look something like this.

So the point is that I can always break it into what the

book calls regions of tyoe 1.

By cutting it by vertical lines in a clever way I break it here

into 5 pieces each of the 5 pieces can be represented

as a region of this type.

So all of them can be thought of in this way.

Well in this case that would be like it touches here, but this

would be-- for example, so this would be some function y equals

f 2 of x and this would be y equals f 1 of x.

So here you would have y equals f2 and here you will

have y equals f1 of x.

So when you have this region, what is a description of

this region? description is the x goes from a to b.

See no dependence on anything.

But for each x the values of y are bounded between

f 1 of x and f 2 of x.

For example, in this case f 1 of x was square root of

x and f 2 of x 2 minus x.

And any region can be broken into such and so therefore,

then the integral would be equal to the sum of integrals.

It goes without saying of course, that if you take an

integral over this entire region, double integral over

this entire region, this would be the sum of the

integrals over the pieces.

When you decompose it into a disjoint region like this of no

overlapping subregions then the integral can always be found as

the sum of the integrals of the parts.

Integral of the whole thing is a sum of integrals

of its parts.

And then each of those guys, you can represent in this way.

Then of course, the point is that sometimes it is

advantageous to represent it not by cutting by vertical

lines but by cutting by horizontal lines.

And this actually gives you a sort of a second way to

evaluate your integral.

And sometimes it can happen that one way the integral is

very difficult to compute, but the other way it's much easier.

So let me give you an example of this.

Here's an example.

So suppose you have the region like this.

So you have xy where y is between 0 and 1.

And x is between-- no sorry, x is between 0 and 1 and y is

between 0 and x squared.

And you're asked to compute the integral of the function square

root of x cubed plus 1 dA.

So let's draw this region. x between 0 and 1 and y

between 0 and x squared.

It's a parabola, like this.

So this is a region.

This is 1, this is 1.

And this is --

So since it's written in this way, we can write it down as an

iterate integral in the same way as we did in the

previous example.

So that means we would first be integrating x over x, right?

I mean, not the first, but the outer integral

would be respect to x.

But the inner integral would be with respect to y.

So that would be from 0 to x squared.

Square root of x cubed plus 1 dy.

Let's compute the inner integral.

So this inner integral is --

OK, so this function look very complicated.

But remember we're now integrating over y, so

this is a constant.

So constant function now because x is frozen.

The anti-derivative is actually this constant, so to speak

because it's independent of y times y.

And then you do it from 0 to x squared, so you get square root

of x cubed plus 1 times x squared.

And now you have to integrate the result, which is very easy

because you could introduce a new variable z, which is x

cubed and then dz is 3x squared dx.

So that this because 1/3 of dz and this becomes

1/3 of z plus 1, dz.

Which is very easy.

I'm just trying to save time because I only

have two minutes left.

So this is easy, but don't do that on your midterm.

I have an excuse because I don't have enough time to fill

it, and I want to explain something to you.

So here's a tricky question, which you'll find

on the homework.

The tricky question is the following.

Let's think of the same region, but from a

different point of view.

Let's cut it by horizontal lines.

If we cut by horizontal line then the same region would be

xy where now y is between 0 and 1 and x is between what? x is

between the square root of so this y, that's right.

Between square root of y, right?

And 1.

If I do that then the same integral will be

written like this.

So now the outer integral would be respect to y.

It's always the case.

That variable for which the limits are independent of

any variables, which are constant, like 0 and 1.

This is the variable, which is variable of outer integration.

The inner integration will be from square root of y to 1.

And the function will be x cubed plus 1-- same function,

but now we have to integrate this with respect to x and

you see this is much harder.

This is hard.

Because it is not clear what the anti-derivative is of this.

See, now you can appreciate how much easier it is to calculate

the anti-derivative of this function with respect to y

because y doesn't know about x.

So this is a constant.

So you're doing the anti-derivative of a

constant function.

That's why you get this very simple function and then you

luck out that you get x squared so it becomes much easier.

But here you get a function of x and it's not clear what

the anti-derivative is.

So you have to be aware of this.

That there are two different ways to compute and one way

could be much easier than the other.