Partial derivative examples

Example 1

Let f(x,y) = y3x2. Calculate f x(x,y).

Solution: To calculate f x(x,y), we simply view y as being a fixed number and calculate the ordinary derivative with respect to x. The first time you do this, it might be easiest to set y = b, where b is a constant, to remind you that you should treat y as though it were number rather than a variable. Then, the partial derivative f x(x,y) is the same as the ordinary derivative of the function g(x) = b3x2. Using the rules for ordinary differentiation, we know that

dg dx(x) = 2b3x.

Now, we remember that b = y and substitute y back in to conclude that

f x(x,y) = 2y3x.

Example 2

For the same f, calculate f y(x,y).

Solution: This time, we’ll just calculate the derivative with respect to y directly without replacing x with a constant. We just have to remember to treat x like a constant and use the rules for ordinary differentiation. We don’t touch the x2 and only differentiate the y3 factor to calculate that

f y(x,y) = 3x2y2.

Example 3

For the same f, calculate f x(1, 2).

Solution: From example 1, we know that f x(x,y) = 2y3x. To evaluate this partial derivative at the point (x,y) = (1, 2), we just substitute the respective values for x and y:

f x(1, 2) = 2(23)(1) = 16.

Example 4

For

f(x1,x2,x3,x4) = 3 cos(x1x4) sin(x25) ex2 + (1 + x22)(x1x2x4) + 5x1x3x4

calculate f x3(a,b,c,d).

Solution: Although this initially looks hard, it’s really any easy problem. The ugly term does not depend on x3, so in calculating partial derivative with respect to x3, we treat it as a constant. The derivative of a constant is zero, so that term drops out. The derivative is just the derivative of the last term with respect to x3, which is

f x3(x1,x2,x3,x4) = 5x1x4

Substituting in the values (x1,x2,x3,x4) = (a,b,c,d), we obtain the final answer

f x3(a,b,c,d) = 5ad.