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+my4
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:
δxδf​=3πx2+y2δyδf​=2xy+4my3
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=t1​
If we apply the chain rule:
1. Partial derivative against x:
δxδf​=cos(x)eyz2dtdx​=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)=eg
g(y)=yz2
Then δyδf​=dgdf​dydg​
Apply the chain rule, we get:
δyδf​=z2sin(x)eyz2dtdy​=2t
3. Partial derivative against z:
δzδf​=2yz⋅sin(x)eyz2dtdz​=−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: