Partial and Total Derivatives

What partial and total derivatives are and how to calculate them

What is a partial derivative?

A partial derivative of a function is the derivative of a multivariable function for a particular variable. For instance, if you have:

f(x,y)=Ï€x3+xy2+my4f(x, y) = \pi x^3 + xy^2 + my^4

For a single variable, it is easy to calculate them, but there are two variables x and y. In this case, there isn't a single derivative. Instead, you have two derivatives for each variable.

How to calculate partial derivatives?

To calculate the derivative for each, you take one variable at a time and consider other variables as constants (meaning not taking a differentiation). If we apply the procedure to the above function, the partial derivatives become:

δfδx=3πx2+y2δfδy=2xy+4my3\frac{\delta f}{\delta x} = 3 \pi x^2 + y^2 \\ \frac{\delta f}{\delta y} = 2xy + 4my^3

They are called "partial" derivatives because they are derivatives only for a particular variable.

What is a total derivative?

If partial derivatives are scattered puzzle pieces, the total derivative is combining all the partial derivatives and adding them together. To do this, you employ chain rules for each variable. For instance,

f(x,y,z)=sin(x)eyz2x=t−1y=t2z=1tf(x, y, z) = sin(x)e^{yz^2} \\ x = t - 1 \\ y = t^2 \\ z = \frac{1}{t}

If we apply the chain rule:

1. Partial derivative against x:

δfδx=cos(x)eyz2dxdt=1\frac{\delta f}{\delta x} = cos(x) e^{yz^2} \\ \frac{dx}{dt} = 1

2. Partial derivative against y:

sin(x) doesn't have y in it so we just need to consider the exponential term.

It is be re-written as

f(g)=egf(g) = e^{g}

g(y)=yz2g(y) = yz^2

Then δfδy=dfdgdgdy\Large \frac{\delta f}{\delta y} = \frac{df}{dg}\frac{dg}{dy}

Apply the chain rule, we get:

δfδy=z2sin(x)eyz2dydt=2t\frac{\delta f}{\delta y} = z^2sin(x)e^{yz^2} \\ \frac{dy}{dt} = 2t

3. Partial derivative against z:

δfδz=2yz⋅sin(x)eyz2dzdt=−t−2\frac{\delta f}{\delta z} = 2yz \cdot sin(x)e^{yz^2} \\ \frac{dz}{dt} = -t^{-2}

How to calculate the total derivative

Now calculating the total derivative against all three variables is just a matter of adding them together:

df(x,y,z)dt=cos(x)eyz2+z2sin(x)eyz2⋅2t+2yz⋅sin(x)eyz2⋅−t−2\frac{df(x, y, z)}{dt} = cos(x)e^yz^2 + z^2sin(x) e^{yz^2} \cdot 2t + 2yz \cdot sin(x)e^{yz^2} \cdot -t^{-2}

If we substitute all variables in terms of t, we get:

df(x,y,z)dt=cos(t−1)e+2t−1sin(t−1)e−2t−1sin(t−1)e=cos(t−1)e\frac{df(x, y, z)}{dt} = cos(t - 1)e + 2t^{-1} sin(t-1)e - 2t^{-1}sin(t-1)e \\ = cos(t-1)e

Voila!

FYI, here is how you can calculate partial derivatives online

Last updated