Skip to content

Partial Derivatives

πŸ”’ Partial Derivatives

Partial derivatives allow us to analyze how a function of multiple variables changes when we vary only one of those variables at a time.


🟒 1. Definition of Partial Derivative

For a function f(x,y)f(x, y), the partial derivative with respect to xx at (a,b)(a, b) is: fx(a,b)=βˆ‚fβˆ‚x=lim⁑hβ†’0f(a+h,b)βˆ’f(a,b)hf_x(a, b) = \frac{\partial f}{\partial x} = \lim_{h \to 0} \frac{f(a+h, b) - f(a, b)}{h}

Similarly, the partial derivative with respect to yy is: fy(a,b)=βˆ‚fβˆ‚y=lim⁑hβ†’0f(a,b+h)βˆ’f(a,b)hf_y(a, b) = \frac{\partial f}{\partial y} = \lim_{h \to 0} \frac{f(a, b+h) - f(a, b)}{h}

How to Compute

To find βˆ‚fβˆ‚x\frac{\partial f}{\partial x}, treat yy as a constant and differentiate with respect to xx using standard rules.

Example: If f(x,y)=x2y+sin⁑(x)f(x, y) = x^2 y + \sin(x), then:

  • βˆ‚fβˆ‚x=2xy+cos⁑(x)\frac{\partial f}{\partial x} = 2xy + \cos(x)
  • βˆ‚fβˆ‚y=x2\frac{\partial f}{\partial y} = x^2

🟑 2. The Multivariable Chain Rule

When the variables themselves depend on other variables, we use the multivariable Chain Rule.

Case 1: One Independent Variable

If z=f(x,y)z = f(x, y), where x=g(t)x = g(t) and y=h(t)y = h(t), then: dzdt=βˆ‚zβˆ‚xdxdt+βˆ‚zβˆ‚ydydt\frac{dz}{dt} = \frac{\partial z}{\partial x} \frac{dx}{dt} + \frac{\partial z}{\partial y} \frac{dy}{dt}

Case 2: Several Independent Variables

If z=f(x,y)z = f(x, y), where x=g(u,v)x = g(u, v) and y=h(u,v)y = h(u, v), then: βˆ‚zβˆ‚u=βˆ‚zβˆ‚xβˆ‚xβˆ‚u+βˆ‚zβˆ‚yβˆ‚yβˆ‚u\frac{\partial z}{\partial u} = \frac{\partial z}{\partial x} \frac{\partial x}{\partial u} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial u} βˆ‚zβˆ‚v=βˆ‚zβˆ‚xβˆ‚xβˆ‚v+βˆ‚zβˆ‚yβˆ‚yβˆ‚v\frac{\partial z}{\partial v} = \frac{\partial z}{\partial x} \frac{\partial x}{\partial v} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial v}


πŸ”΄ 3. Higher-Order Partial Derivatives

We can take partial derivatives multiple times.

  • fxx=βˆ‚2fβˆ‚x2f_{xx} = \frac{\partial^2 f}{\partial x^2}
  • fyy=βˆ‚2fβˆ‚y2f_{yy} = \frac{\partial^2 f}{\partial y^2}
  • Mixed Partials: fxy=βˆ‚βˆ‚y(βˆ‚fβˆ‚x)f_{xy} = \frac{\partial}{\partial y} (\frac{\partial f}{\partial x}) and fyx=βˆ‚βˆ‚x(βˆ‚fβˆ‚y)f_{yx} = \frac{\partial}{\partial x} (\frac{\partial f}{\partial y}).

Clairaut’s Theorem

If ff and its partial derivatives fxyf_{xy} and fyxf_{yx} are continuous, then: fxy=fyxf_{xy} = f_{yx} The order of differentiation does not matter for mixed partials of β€œsmooth” functions.


πŸ’‘ Practical Example: Optimization (Tangent Planes)

The equation of the tangent plane to the surface z=f(x,y)z = f(x, y) at point (a,b,z0)(a, b, z_0) is: zβˆ’z0=fx(a,b)(xβˆ’a)+fy(a,b)(yβˆ’b)z - z_0 = f_x(a, b)(x - a) + f_y(a, b)(y - b)

def f(x, y):
    return x**2 + y**2

def df_dx(x, y):
    return 2*x

def df_dy(x, y):
    return 2*y

# At point (1, 2)
x0, y0 = 1, 2
z0 = f(x0, y0)
slope_x = df_dx(x0, y0)
slope_y = df_dy(x0, y0)

print(f"Tangent Plane: z - {z0} = {slope_x}(x - {x0}) + {slope_y}(y - {y0})")

πŸš€ Key Takeaways

  • Partial derivatives measure change along coordinate axes.
  • The multivariable Chain Rule sums up contributions from each path.
  • Mixed partials are equal for most smooth functions.