π’ 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), the partial derivative with respect to x at (a,b) is: fxβ(a,b)=βxβfβ=limhβ0βhf(a+h,b)βf(a,b)β
Similarly, the partial derivative with respect to y is: fyβ(a,b)=βyβfβ=limhβ0βhf(a,b+h)βf(a,b)β
How to Compute
To find βxβfβ, treat y as a constant and differentiate with respect to x using standard rules.
Example: If f(x,y)=x2y+sin(x), then:
- βxβfβ=2xy+cos(x)
- βyβfβ=x2
π‘ 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), where x=g(t) and y=h(t), then: dtdzβ=βxβzβdtdxβ+βyβzβdtdyβ
Case 2: Several Independent Variables
If z=f(x,y), where x=g(u,v) and y=h(u,v), then: βuβzβ=βxβzββuβxβ+βyβzββuβyβ βvβzβ=βxβzββvβxβ+βyβzββvβyβ
π΄ 3. Higher-Order Partial Derivatives
We can take partial derivatives multiple times.
- fxxβ=βx2β2fβ
- fyyβ=βy2β2fβ
- Mixed Partials: fxyβ=βyββ(βxβfβ) and fyxβ=βxββ(βyβfβ).
Clairautβs Theorem
If f and its partial derivatives fxyβ and fyxβ are continuous, then: fxyβ=fyxβ 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) at point (a,b,z0β) is: zβz0β=fxβ(a,b)(xβa)+fyβ(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.