Outlier Blog Partial Derivative HighRes

Calculus

What is Partial Derivative? Definition, Rules and Examples

01.20.2022 • 4 min read

Rachel McLean

Subject Matter Expert

This article is an overview of partial derivatives. Learn the definition of partial derivatives, how to do partial differentiation, and practice with some examples.

Share

In This Article

  1. What Is Partial Derivative?

  2. How to Do Partial Derivatives

  3. Partial Derivatives Examples

What is Partial Derivative?

We use partial differentiation to differentiate a function of two or more variables. For example,

f(x,y)=xy+x2yf(x, y) = xy + x^2y

is a function of two variables.

If we want to find the partial derivative of a two-variable function with respect to xx, we treat yy as a constant and use the notation fx\frac{\partial{f}}{\partial{x}}. If we want to find the partial derivative of a two-variable function with respect to yy, we treat xx as a constant and use the notation fy\frac{\partial{f}}{\partial{y}}.

You can think of \partial as the partial derivative symbol, sometimes called “del.” When you see this symbol, it shows that we’re taking a partial derivative.

This notation should look familiar — it’s just like the derivative of a function in Leibniz’s notation, expressed dydx\frac{dy}{dx}. In this case, \partial replaces the letter “d” with a stylized curly dd.

In calculus, derivatives measure the rate of change of a function with respect to a change in its input variable xx. Since the input of a multivariable function is more than one variable, we call fx\frac{\partial{f}}{\partial{x}} and fy\frac{\partial{f}}{\partial{y}} partial derivatives because they only reveal the rate of change of ff when one variable changes, instead of both.

The partial derivative allows us to understand the behavior of a multivariable function when ​​we let just one of its variables change, while the rest stay constant.

How to Do Partial Derivatives

How do partial derivatives work? To find a partial derivative, we find the derivative of a function of two or more variables by treating one of the variables as a constant.

To find fx\frac{\partial{f}}{\partial{x}}:

  1. Treat yy as a constant.

  2. Differentiate the function normally.

To find fy\frac{\partial{f}}{\partial{y}}:

  1. Treat xx as a constant.

  2. Differentiate the function normally.

After we designate one variable as a constant, we can use the derivative rules that are already familiar to us to differentiate the function.

Partial Derivative Rules

Derivative rules help us differentiate more complicated functions by breaking them into pieces. Here are some of the most common derivative rules to know:

Constant Rule

ddxc=0\frac{d}{dx}c = 0

Power Rule

ddxxn=nxn1\frac{d}{dx}x^n = nx^{n-1}

Chain Rule

ddxf(g(x))=f(g(x))g(x)\frac{d}{dx}f(g(x)) = f’(g(x))g’(x)

Product Rule

ddxf(x)g(x)=f(x)g(x)+f(x)g(x)\frac{d}{dx}f(x) \cdot g(x) = f’(x) \cdot g(x) + f(x)\cdot g’(x)

Quotient Rule

ddxf(x)g(x)=g(x)f(x)f(x)g(x)(g(x))2\frac{d}{dx}\frac{f(x)}{g(x)} = \frac{g(x)f’(x)-f(x)g’(x)}{(g(x))^2}

Sum/Difference Rule

ddx(f(x)±g(x))=f(x)±g(x)\frac{d}{dx}(f(x) \pm g(x)) = f’(x) \pm g’(x)

Trigonometry Rules

ddx(sin(x))=cos(x)\frac{d}{dx}(\sin{(x)}) = \cos{(x)}

ddx(cos(x))=sin(x)\frac{d}{dx}(\cos{(x)}) = -\sin{(x)}

ddx(tan(x))=sec2(x)\frac{d}{dx}(\tan{(x)}) = \sec ^2 (x)

Logarithmic and Exponential Rules

ddx(lnx)=1x\frac{d}{dx} (\ln{x}) = \frac{1}{x}

ddx(ex)=ex\frac{d}{dx}(e^x) = e^x

You can view more about these rules in an explanation by one of our instructors Dr. Tim Chartier.

For example, let’s take another look at the function f(x,y)=xy+x2yf(x, y) = xy + x^2y. Suppose we want to find fx\frac{\partial{f}}{\partial{x}}, the partial derivative with respect to xx. The first thing to do is treat yy as a constant.

What does it mean to treat yy as a constant? A constant is a fixed, unchanging value. Examples of constants are 1, 3.5, 17, and 100,000. To treat yy as a constant, we imagine that yy is any of these infinite constant values.

We can do this because of the constant rule, which states that the derivative of any constant is 0.

To make it easier to imagine yy as a constant, we can replace yy with cc or kk, which are two variables that are commonly used to represent constant values. Using this trick and replacing yy with kk, we have

f(x,y)=kx+kx2f(x, y) = kx + kx^2

Now, we can find the partial derivative fx\frac{\partial{f}}{\partial{x}} using the derivative rules. Remember to change kk back to yy when you have your final answer.

(xy+x2y)x=k+2kx\frac{\partial{(xy + x^2y)}}{\partial{x}} = k + 2kx
(xy+x2y)x=y+2yx\frac{\partial{(xy + x^2y)}}{\partial{x}} = y + 2yx

We can do the same to find fy\frac{\partial{f}}{\partial{y}}, the partial derivative with respect to yy. The first thing to do is treat xx as a constant. Remember that the square of any constant is simply another constant.

f(x,y)=ky+k2yf(x, y) = ky + k^2y

Now, we can find the partial derivative fy\frac{\partial{f}}{\partial{y}} using the derivative rules. Remember to change kk back to xx when you have your final answer.

(xy+x2y)y=k+k2\frac{\partial{(xy + x^2y)}}{\partial{y}} = k + k^2
(xy+x2y)y=x+x2\frac{\partial{(xy + x^2y)}}{\partial{y}} = x + x^2

Partial Derivatives Examples

Let’s take a look at some more partial derivative examples.

Example 1

Find the partial derivatives of f(r,h)=πr2hf(r, h) = \pi r^2h.

Solution:

This function represents the volume of a cylinder. When we find the partial derivative (πr2h)r\frac{\partial{(\pi r^2h)}}{\partial{r}}, we find the rate of change of the cylinder’s volume as only the radius changes.

When we find the partial derivative (πr2h)h\frac{\partial{(\pi r^2h)}}{\partial{h}}, we find the rate of change of the cylinder’s volume as only the height changes. So,

(πr2h)r=2πrh\frac{\partial{(\pi r^2h)}}{\partial{r}} = 2\pi rh
(πr2h)h=πr2\frac{\partial{(\pi r^2h)}}{\partial{h}} = \pi r^2
Outlier Graph PartialDerivative

Example 2

Find the partial derivatives of f(x,y,z)=xy3zx+zf(x, y, z) = xy^3 - zx + z.

Solution:

How do partial derivatives work in more than two variables? Just the same! For a function with three variables, we change only one variable and treat the other two as constants. So,

(x3yzx+z)x=y3z\frac{\partial{(x^3y - zx + z)}}{\partial{x}} = y^3 - z
(x3yzx+z)y=3xy2\frac{\partial{(x^3y - zx + z)}}{\partial{y}} = 3xy^2
(x3yzx+z)z=1x\frac{\partial{(x^3y - zx + z)}}{\partial{z}} = 1 - x

Example 3

Find the partial derivatives of f(x,y)=x2sin(y)y2cos(x)f(x, y) = x^2\sin{(y)} - y^2\cos{(x)}.

Solution:

We can use the trigonometry derivative rules for this problem. Remember that sin(y)\sin{(y)} acts as a constant when we calculate (f(x,y))x\frac{\partial{(f(x, y))}}{\partial{x}}, and cos(x)\cos{(x)} acts as a constant when we calculate (f(x,y))y\frac{\partial{(f(x, y))}}{\partial{y}}. So,

(x2sin(y)y2cos(x))x=2xsin(y)+y2sin(x)\frac{\partial{(x^2\sin{(y)} - y^2\cos{(x)})}}{\partial{x}} = 2x\sin{(y)} + y^2\sin{(x)}
(x2sin(y)y2cos(x))y=x2cos(y)2ycos(x)\frac{\partial{(x^2\sin{(y)} - y^2\cos{(x)})}}{\partial{y}} = x^2\cos{(y)} - 2y\cos{(x)}

Explore Outlier's Award-Winning For-Credit Courses

Outlier (from the co-founder of MasterClass) has brought together some of the world's best instructors, game designers, and filmmakers to create the future of online college.

Check out these related courses:

Calculus I

Calculus I

Explore course

Intro to Statistics

Intro to Statistics

Explore course

Intro to Microeconomics

Intro to Microeconomics

Explore course