Partial derivatives

We know that the derivative at a point of a function of a single variable gives us the slope of the tangent line to that function at that point. This means we know the rate of change (increase or decrease) of the function at that point.

imagen

Let's suppose we have a function f which depends on more than one variable, for example f(x,y)=x2+2xyy.

The graph of a function of two variables is a surface in a three dimensional space, and if we allow them to change we get an infinite amount of ways for them to change.

imagen

However, the partial derivatives also indicate the slope of a concrete tangent line to the surface. But before, we learn how to calculate partial derivatives. Later on you will see the purpose of this methodology.

To calculate a partial derivative of a function of several variables we have to derive with respect to one of those variables, as always, and hold the remaining variables fixed (as fixed values).

In our example f(x,y)=x2+2xyy, if we want to take the partial derivative with respect to x, we hold the variable y fixed, "a number", and we then derive a function of one variable, f(x). Let's see:

Example

x2 only depends of x, therefore its derivative is 2x.

The variable y in the function 2xy is held fixed, a number. Let's take 3 for example. If we do the following: 2x3=6x, the derivative is 6. Now we write 2xy as 2yx and consider 2y to be 6. Thus the derivative of 2xy=2yx is 2y.

And therefore y does not contain the variable x. This means the derivative of a fixed value is 0, and disappears.

Now we only need to know the correct notation to write this mathematically. To take the partial derivative of a function f with respect to the variable x we can establish the following notations:

δfδx δxf fx

Example

Thus, our partial derivative with respect to x of f(x,y)=x2+2xyy is written as

δfδx=2x+2y0=2x+2y δxf=2x+2y fx=2x+2y

Surely you wonder if we can also calculate the partial derivative with respect to y, don't you? Well, of course we can!

Let's calculate δfδy, and imagine x to be held fixed.

Example

x2 doesn't contain the variable y, which means it is as if we'd have only one fixed value and its derivative is 0.

2xy contains the variable x, but it is as if it were held fixed, a number. Therefore, the derivative of 2xy is 2x.

And finally, since we are deriving with respect to y, the derivative of y is 1.

Thus, δfδy=δyf=fy=2x1

Geometric interpretation of the partial derivative

But what does the calculation of a partial derivative mean geometrically? Let's look at the following example:

imagen

In this graph we have a surface z=f(x,y) of which we are calculating the partial derivative with respect to the variable x at a point x0,y0,z0. We have seen that calculating a partial derivative with respect to x means holding the variable y fixed. Maintaining the fixed value y=y0 results in a plane passing through point y0. Let's draw the plane parallel to the x axis. This plane intersects our surface. At the intersection curve we consider the tangent line at the point x0,y0,z0. The partial derivative gives us the slope of this line.

Example

If we want the value of the slope of the tangent line to the surface at the point 3,1 in the direction of the axis x in our sample function f(x,y)=x2+2xyy, we get the following

δfδx=2x+2y δf(3,1)δx=(2)·3+2·1=6+2=4

To graphically represent the partial derivative with respect to y for a function z=f(x,y), we follow this example:

imagen

Now the fixed value is x=x0 and the plane is parallel to the axis y.

Example

If we want to know the slope in the direction y at the point (0,1) of our sample function, we get

δfδy=2x1 δf(0,1)δy=1

We see that the inclination of the surface at this point and in the mentioned direction is descending.

In short, when we calculate partial derivatives δfδx and δfδy at the point x0,y0,z0 the value we get is the slope of the surface in the direction of the x or y axis, respectively.

Formal definition of a partial derivative

As well as derivatives of functions of one variable, partial derivatives define limits.

If U is an open subset of Rn and a function f: UR, we define the partial derivative of f at the point pU, p=p1,...,pn, regarding the variable xi as

δf(p)δxi=limh0f(p1,...,pi1,pi+h,pi+1,...,pn)f(p1,...,pn)h

Examples of calculating partial derivatives

It's important to keep two things in mind to successfully calculate partial derivatives: the rules of functions of one variable and knowing to determine which variables are held fixed in each case. You will see that it is only a matter of practice.

Example

Given the function f(x,y)=x3+y2 calculate fx(1,1).

Rewrite f(x,y)=(x3+y2) frac12 as we did before to derive square roots with only one variable. Now we hold y fixed and derive by using the usual rules

fx=12(x3+y2)123x2=3x22x3+y2

To find the slope at the point (1,1) we replace

fx(1,1)=322

Example

Given the function f(x,y)=2xyyx2+y calculate the partial derivative with respect to x and y.

δfδx=2y(x2+y)(2xyy)2x(x2+y)2=2yx2+2y24x2y+2xy(x2+y)2=2x2y+2xy+2y2(x2+y)2=2(x2y+xy+y2)(x2+y)2

δfδy=(2x1)(x2+y)(2xyy)(x2+y)2=2x3+2xyx2y2xy+y(x2+y)2=2x3x2(x2+y)2

Example

Given the function f(x,y,z)=x2y32xyz3 calculate the slope of the tangent line at the point (1,1,1) in the direction of the axis x, y and z.

δfδx=2xy32yz3 δf(1,1,1)δx=21(1)32(1)13=0

δfδy=3x2y22xz3 δf(1,1,1)δy=32=1

δfδz=6xyz2 δf(1,1,1)δz=6

Example

Given the function f(x,y,z)=2zy+sin(x) calculate the partial derivatives with respect to x, y and z.

δfδx=2zcos(x)(y+sin(x))2

δfδy=2z(y+sin(x))2

δfδz=2(y+sin(x))2z0(y+sin(x))2=2(y+sin(x))(y+sin(x))2=2y+sin(x)

More applications of partial derivatives

At this point you might be thinking in other information partial derivatives could provide. And sure enough, we can also interpret that partial derivatives measure the rate of change of the variable we derive with respect to the variable held fixed. Like this we can measure how y changes when we hold x fixed and vice versa. Here's an example.

Example

Imagine a rectangular solar panel that absorbs different amounts of sunlight depending on the area and therefore each cell produces a different amount of energy. With the following relation we can deduce the energy generated at the point x,y of the solar panel E(x,y)=310xy+y

imagen

The units of x and y are centimeters and the power output E is measured in Watts. How does the power output E change in the center of the panel, (65,120), when x is held fixed at 65 cm?

To find out we calculate Ey(65,120). Ey=310x+1Ey(65,120)=20,5

So we see that at the point x=65, y=120 the power output increases as we move in the direction of axis y since the partial derivative in this direction is positive. Besides, we also know that the generated energy increases with a rate of 20,5 W.