# Partial Derivatives

*Derivatives where we treat other variables as constants*.

Here is a function of one variable (x):

f(x) = x^{2}

And its derivative (using the Power Rule) is:

f’(x) = 2x

But what about a function of **two variables** (x and y):

f(x,y) = x^{2} + y^{3}

To find its **partial** derivative **with respect to x** we treat **y as a constant** (imagine y is a number like 7 or something):

f’_{x} = 2x + 0^{} = 2x

*Explanation: *

*the derivative of x*^{2}(with respect to x) is 2x*we***treat y as a constant**, so y^{3}is also a constant (imagine y=7, then 7^{3}=343 also a constant), and the derivative of a constant is 0

To find the partial derivative **with respect to y**, we treat **x as a constant**:

f’_{y} = 0 + 3y^{2} = 3y^{2}

*Explanation: *

*we now***treat x as a constant**, so x^{2}is also a constant, and the derivative of a constant is 0*the derivative of y*^{3}(with respect to y) is 3y^{2}

That is all there is to it. Just remember to treat **all other variables as if they are constants**.

### Holding A Variable Constant

So what does "holding a variable constant" look like?

### Example: the volume of a cylinder is V = π r^{2} h

We can write that in "multi variable" form as

f(r,h) = π r^{2} h

For the partial derivative with respect to r we hold **h constant**, and r changes:

f’_{r} = π (2r) h = 2πrh

*(The derivative of r ^{2} with respect to r is 2r, and π and h are constants)*

It says "as only the radius changes (by the tiniest amount), the volume changes by 2πrh"

It is like we add a skin with a circle's circumference (2πr) and a height of h.

For the partial derivative with respect to h we hold **r constant**:

f’_{h} = π r^{2 }(1)= πr^{2}

*(π and r ^{2} are constants, and the derivative of h with respect to h is 1)*

It says "as only the height changes (by the tiniest amount), the volume changes by πr^{2}"

It is like we add the thinnest disk on top with a circle's area of πr^{2}.

Let's see another example.

### Example: The surface area of a square prism.

The surface is: the top and bottom with areas of x^{2} each, and 4 sides of area xy:

f(x,y) = 2x^{2} + 4xy

f’_{x} = 4x + 4y

f’_{y} = 0 + 4x = 4x

### Three or More Variables

We can have 3 or more variables. Just find the partial derivative of each variable in turn while treating** all other variables as constants**.

### Example: The volume of a cube with a square prism cut out from it.

f(x,y,z) = z^{3} − x^{2}y

f’_{x} = 0 − 2xy = −2xy

f’_{y} = 0 − x^{2} = −x^{2}

f’_{z} = 3z^{2} − 0 = 3z^{2}

When there are many x's and y's it can get confusing, so a mental trick is to change the "constant" variables into letters like "c" or "k" that *look* like constants.

### Example: f(x,y) = y^{3}sin(x) + x^{2}tan(y)

It has x's and y's all over the place! So let us try the letter change trick.

With respect to x we can change "y" to "k":

f(x,y) = k^{3}sin(x) + x^{2}tan(k)

f’_{x} = k^{3}cos(x) + 2x tan(k)

But remember to turn it back again!

f’_{x} = y^{3}cos(x) + 2x tan(y)

Likewise with respect to y we turn the "x" into a "k":

f(x,y) = y^{3}sin(k) + k^{2}tan(y)

f’_{y} = 3y^{2}sin(k) + k^{2}sec^{2}(y)

f’_{y} = 3y^{2}sin(x) + x^{2}sec^{2}(y)

But only do this if you have trouble remembering, as it is a little extra work.

**Notation**: here we use **f’ _{x}** to mean "the partial derivative with respect to x", but another very common notation is to use a funny backwards d (∂) like this:

\frac{∂f}{∂x} = 2x

Which is the same as:

f’_{x} = 2x

∂ is called "del" or "dee" or "curly dee"

So \frac{∂f}{∂x} is said "del f del x"

### Example: find the partial derivatives of **f(x,y,z) = x**^{4} − 3xyz using "curly dee" notation

^{4}− 3xyz

f(x,y,z) = x^{4} − 3xyz

\frac{∂f}{∂x} = 4x^{3} − 3yz

\frac{∂f}{∂y} = −3xz

\frac{∂f}{∂z} = −3xy

You might prefer that notation, it certainly looks cool.