Partial Derivatives

Nerd Cafe

What Are Partial Derivatives?

A partial derivative is the derivative of a multivariable function with respect to one variable, while keeping the other variables constant.

Example:

Let

f(x,y)=x2y+3xy2f(x,y)=x^{2}y+3xy^{2}

Then:

  • Partial derivative with respect to x: treat y as constant

  • Partial derivative with respect to y: treat x as constant

Step-by-Step: How to Calculate

Let’s calculate the partial derivatives of

f(x,y)=x2y+3xy2f(x,y)=x^{2}y+3xy^{2}

Step 1: Partial Derivative with Respect to x

  • y is constant

  • Differentiate:

fx=x(x2y+3xy2)=2xy+3y2\frac{\partial f}{\partial x}=\frac{\partial }{\partial x}\left( x^{2}y+3xy^{2} \right)=2xy+3y^{2}

Step 2: Partial Derivative with Respect to y

  • x is constant

  • Differentiate:

fy=y(x2y+3xy2)=x2+6xy\frac{\partial f}{\partial y}=\frac{\partial }{\partial y}\left( x^{2}y+3xy^{2} \right)=x^{2}+6xy

Python Code with SymPy

Output

Geometric Meaning

  • For a function f(x,y), the partial derivative ∂f/∂x represents the slope of the surface in the x-direction, holding y constant.

  • Likewise, ∂f/∂y is the slope in the y-direction.

Visualize it as slicing a 3D surface either along x or along y, and measuring the slope.

Visualizing Partial Derivatives in Python

Output

Practice Problem

f(x,y,z)=x2y+y2z+z2xf(x,y,z)=x^{2}y+y^{2}z+z^{2}x

Find:

fx  ,  fy  ,  fz\frac{\partial f}{\partial x} \; , \; \frac{\partial f}{\partial y} \; , \; \frac{\partial f}{\partial z}

Solution (with Python)

Output

Keywords

partial derivatives, multivariable calculus, symbolic differentiation, sympy, python math, gradient, calculus, partial derivative examples, multivariable functions, partial derivative python, ∂f/∂x, ∂f/∂y, visualization, surface plot, 3D calculus, partial derivatives visualization, tangent plane, mixed partials, first-order derivatives, mathematical modeling, nerd cafe

Last updated