What exactly is a partial derivative?

159 views

[ad_1]

What exactly is a partial derivative? I have a basic idea of a derivative i.e, I know that dy/dx is rate of change of y with respect to x and that it represents the slope of a curve

Thanks!

In: Mathematics
[ad_2]

The partial derivative is the same, but instead of a curve, you have a 3D surface. Now, to calculate a derivative, you need a trace or slice through the surface reducing it to a line.

If you have a function f(x,y), then the partial with respect to x at (a,b) is the slope of the line where x=a. Similarly, the partial with respect to y at (a,b) is the slope of the line where y=b.

It’s still a slope. But when you multiple variables then you have a surface instead of just a curve. You can hold all but one variable constant then take the derivative to find the slope in only one direction.

When explaining things I like to use a practical example. The ideal gas law is written as PV=nRT and we will rewrite it as P=nRT/V so we now have a function where Pressure (P) is expressed as an equation related to three variables the number of moles of a gas (n) the temperature of a gas (T) and the volume of the container (V). Now if n and V are constant than the equation is just expressed as a function P(T) and the derivative P'(T) can be expressed as dP/dT but if there is more than one variable we cannot take a single derivative.

Remember that the derivative is nothing more, and nothing less, than the rate at which the equation is changing. For a multi-variable equation that equation must be broken down into components expressed as a vector. These components are the partial derivatives. Consider again our example P=(nRT)/v since it is a function P(n,T,V) it would be expressed as three partial functions added together. So P'(n,T,V)=pP/pn+pP/pT+pP/pV (actually signified by a lowercase delta but I don’t have that on my phone’s keyboard). Which is found by essentially pretending the other variables are constant.

So pP/pn is (RT/V)pn, pP/pT is (nR/V)pT, and pP/pV is (-nRT/V^2)pV.

ELI5 example: Nickels are worth 5 cents and quarters are worth 25 cents. So if you have n nickels and q quarters, you have a total value of 5*n + 25*q cents, or v(n,q) = 5n + 25q.

The partial derivative of v (with respect to one of the parameters) tells you how much it increases for an increase in that one parameter. There’s a different partial derivative for each parameter. Here we have 2 (number of nickels and number of quarters), so there are two partial derivatives:

If you add one more nickel, the value goes up 5 cents, so the partial derivative of v(n,q) with respect to n is 5 (or dv/dn = 5). Similarly, adding one quarter gives 25 more cents, so dv/dq = 25.

For functions with multiple independent variables f(x,y), f(x,y,z), etc. when you take a derivative you need to specify which variable you’re differentiating the function by, so basically which independent variable you’re using to measure the function’s rate of change.

So for a function f(x,y) you have partial derivatives df/dx and df/dy. For function f(x,y,z) partial derivatives df/dx, df/dy, df/dz and so on.

You can imagine for a function f(x,y) say the function is entirely flat when moving along the x-axis, no change in f(x,y) whatsoever, in which case df/dx = 0 saying there’s no change in f(x,y) with respect to x. Conversely say there’s a great amount of exponential change in the function as you move along the y-axis so you’re partial derivative there could be df/dy = e^y . This is just to highlight that partial derivatives for different variables can be drastically different depending on the function.

The derivative is the slope of a line touching a 2-d curve.

The Partial derivative is the slope of a line touching a 3-d curve.

Derivatives are for measuring how fast functions change. When a function has more dimensions, you need to specify the direction to find the rate of change in that direction.

Imagine a horses saddle, and you’re sitting in the very middle. If you move forward or backward, the surface is getting higher, but when you go to the side, the surface is getting lower. The saddle has 2 dimensions (left/right, forward/backward = x,y), so the partial derivatives describe the slope in each direction: the height of the surface (Z) is a function of how far left/right you are and how far forward or backward you are: Z(x,y), so the slope going left or right is ∂Z/∂x, and the slope going forward or backwards is ∂Z/∂y.

So in a regular derivative, you just have one variable. For example, Y=2X. X is the only variable in this equation, so the only way Y can change is if X changes. So the only possible rate of change that you can calculate is dy/dx.

In a partial derivative, it’s exactly the same thing as a regular derivative except now your equation is a function of more than 1 variable. For example, Y=XZ. There are two variables, X and Z. So, Y can change by two ways! If you change X, Y will change. If you change Z, Y will also change. The partial derivative wants to examine how Y changes as only ONE variable changes, and holding the others constant. Basically, we want to see how Y reacts if we ONLY change X OR Z.

So you can calculate two partial derivatives. dy/dx and dy/dz. In dy/dx, it’s saying “how does Y change when X changes, and Z is held constant”. In dy/dz, it’s saying “how does Y change when Z changes, and X is held constant”.