0:01

In the first module, we started by trying to develop

a strong visual intuition relating

derivatives to the gradient of a function at each point.

We then followed this up by describing

four handy rules to help speed up the process of finding derivatives.

However, all of the examples we looked at were for systems involving a single variable.

So now we are going to have to see what happens when we apply

the same idea to systems with many variables,

known as multivariate systems.

But before we do that, we need to talk about what a variable is in the first place.

Previously, we've shown examples of problems where one of

the variables is a function of the other

i.e. y equals f of x,

but where it wouldn't necessarily make sense to say that x equals g of y.

For example, a vehicle speed is clearly a function of time,

as in each time the vehicle can only have one speed.

However, we can not say that the time was a function of the vehicle speed as there

might be multiple times at which the vehicle was traveling any given speed.

This is why we typically refer to the speed as a dependent variable,

as it depends on time.

And so time can be thought of as an independent variable in this particular context.

Typically, when you first learn calculus,

you take functions containing variables and

constants and then differentiate the dependent variables,

such as speed, with respect to independent variables, like time.

However, what gets labelled as a constant or a variable can be subtler than you

might think and will require you to understand

the context of the problem being described.

Let's continue using the example of a car to see how this might come up.

Consider the following highly simplified expression.

Relating the force F generated by a car's engine to its mass m,

acceleration a, aerodynamic drive d,

and velocity v. If you're driving a car then you can change

your speed and acceleration by pressing the accelerator pedal to adjust the force,

but the mass and the drag are fixed features of the car's design.

This means that we would call the force

an independent variable as you control it directly but

your speed and acceleration depend on

the variables as there are consequences of your applied force.

Your mass and drag coefficients are clearly constants in this context.

However, if you are a car designer looking to design each engine size in a new fleet,

perhaps your market research has given you a specific acceleration-speed target.

So in this context now,

your force is still

the independent variable but now speed and acceleration are constants,

whereas the mass and drag have become

variables which you can adjust by redesigning your car.

We refer to these slightly confusing variable design constants as parameters.

We often think of varying them as exploring a family of

similar functions rather than describing them as variables in their own right.

But these are largely engineering

distinctions and not the kind of thing that would worry a mathematician.

As you will see later in this course,

when fitting functions to some data.

It's the parameters of our fitting function which we are varying to find the best fit,

which means that we'll have to differentiate with respect to these parameters.

There is still some logic at work here but

my advice to you is just don't worry about it too much.

The key takeaway here is,

you can in principle differentiate any term with respect to any other.

So don't get caught off guard when things you

thought were constants suddenly start to vary.

Let's now look at a different example.

Imagine that you wanted to manufacture a metal can.

So you need to understand the relationship between the various key design parameters.

We can start by writing a reasonable approximation for

the can's empty mass m by breaking the area down into pieces.

So the circles on top and bottom are pi r squared

each and when we unroll the body we get a rectangle where the width

must be the same as the circumference of the circle i.e. 2 pi r and we'll just call

the height h. So taking these areas and multiplying them by a thickness t,

we get the total volume of metal in the can.

Finally, multiplying this by the metal's density rho, we get its mass.

So, we can say that the mass m is going to equal the area these two little circles,

pi r squared, times two of course,

plus the are of the rectangle in the middle,

so that's the circumference, 2 pi r,

multiplied by the height h,

and both of these are going to be multiplied by the thickness t,

and the density rho.

So, t rho and t rho.

I've written it in this long form here to make life a bit easier later on.

At this point, what should we label as a constant or a variable?

Well, with the exception of pi,

which is definitely a constant for this universe,

it's not entirely clear.

We could in principle change any of the radius,

the height, the wall thickness, even the material's density.

So let's find the derivative of the can's mass with respect to each of them.

To calculate these, all we do is,

when differentiating with respect to a certain variable

simply consider all of the others to behave as constants.

So, starting with an easy one,

let's try h. So d m by d h is going to equal this thing, 2 pi r t rho.

As the first term did not contain

the variable h and we're treating all the other terms as constants,

then just like last week a constant simply differentiates to zero.

So we ignored it. Whereas for the second term it does contain

h and so it's just multiplied by some constants.

So differentiating this just leaves those constants.

We can see from this expression,

the partial derivative with respect to h no longer even contains h,

which is what we'd expect as the mass will

vary linearly with the height when all else is kept constant.

Notice that instead of using the normal d that

we saw often doing derivatives in last module,

we must use the curly partial symbol which

signifies that you've differentiated a function of more than one variable.

Let's now find the partial derivative with

respect to the other variables starting with r.

So partial m by partial r is going to equal,

so there's an r squared term here which differentiates to 2r.

So we going to have 4 pi r t rho and this term just contains an r,

so the r disappears, 2 pi h t rho.

Next we're going to do the variable t,

and we can say dm by dt is going to equal, well,

it's just a t in here so it's not very exciting, 2 pi r squared rho plus 2 pi r h rho.

And finally, all we've got left is rho.

So we can say d m by d rho it's just going to

equal 2 pi r squared t plus 2 pi r h t.

And really, although this is quite a straightforward example

that's basically it for partial differentiation.

It's no more complicated than the univariate calculus we met last module.

The only difference being that you have to be careful to keep

track of what you are considering to be held constant when you take each derivative.

I hope this short introduction to multivariate calculus has helped

you see that this concept is nothing to be intimidated by.

Partial differentiation is essentially just taking a multi dimensional problem

and pretending that it's

just a standard 1D problem when we consider each variable separately.

I look forward to showing you the pretty amazing things that we

can use this concept for later in the module. See you then.