Mastering Partial Derivatives Step by Step
What Partial Derivatives Actually Are
Partial derivatives are what happens when you have a function with multiple variables but you only want to know how that function changes when you mess with one variable at a time.
Think of it like this: you have a function f(x, y) that describes something in 3D space. A regular derivative tells you the slope in one direction. A partial derivative tells you the slope if you move only along the x-axis, ignoring y entirely. Or vice versa.
The notation looks like this:
- ∂f/∂x means "partial derivative of f with respect to x"
- ∂f/∂y means "partial derivative of f with respect to y"
That weird ∂ symbol is just a rounded "d." It's the universal shorthand for "I'm only caring about one variable here."
Why This Matters
Partial derivatives show up everywhere in physics, economics, machine learning, and engineering. If you're optimizing something with multiple inputs, you're probably doing partial derivatives whether you realize it or not.
Gradient descent in neural networks? That's partial derivatives. Finding equilibrium in economics? Partial derivatives. Heat transfer equations? Partial derivatives.
You can't escape them.
The Core Rule: Treat Everything Else as a Constant
Here's the entire trick to computing partial derivatives:
When taking ∂f/∂x, treat every other variable like it doesn't exist.
That's it. That's the whole game.
If you have f(x, y) = x² + 3xy + y³ and you're finding ∂f/∂x:
- The x² becomes 2x
- The 3xy becomes 3y (because x is what you're differentiating with respect to)
- The y³ becomes 0 (it's treated as a constant)
Your answer: ∂f/∂x = 2x + 3y
Same function, different variable. Finding ∂f/∂y:
- The x² becomes 0
- The 3xy becomes 3x
- The y³ becomes 3y²
Your answer: ∂f/∂y = 3x + 3y²
Higher Order Partial Derivatives
You can take partial derivatives of partial derivatives. Things get weird here.
Mixed Partial Derivatives
∂²f/∂x∂y means take ∂f/∂y first, then take the partial derivative of that result with respect to x.
Under normal conditions, ∂²f/∂x∂y = ∂²f/∂y∂x. The order doesn't matter. This is called Clairaut's theorem, but only when the function is "nice" enough (continuous and smooth, basically).
Sometimes the order does matter in pathological functions, but if you're a student, your functions will almost always be nice enough for the order to not matter.
Reading the Notation
∂²f/∂x² means you differentiate twice with respect to x.
∂²f/∂x∂y means differentiate once with respect to y, then once with respect to x.
Keep the order straight in your head: the denominator reads right to left. ∂²f/∂x∂y = differentiate with respect to y, then x.
The Chain Rule for Partial Derivatives
When your variables depend on other variables, you need the chain rule. It looks worse than it is.
If z = f(x, y) and x = g(t), y = h(t), then:
dz/dt = (∂f/∂x)(dx/dt) + (∂f/∂y)(dy/dt)
Example: z = x²y, where x = t³ and y = t²
- ∂f/∂x = 2xy
- ∂f/∂y = x²
- dx/dt = 3t²
- dy/dt = 2t
dz/dt = (2xy)(3t²) + (x²)(2t)
Substitute x and y:
dz/dt = (2(t³)(t²))(3t²) + ((t³)²)(2t)
dz/dt = 6t⁷ + 2t⁷ = 8t⁷
You can verify this by substituting first, then differentiating normally. You'll get the same answer.
Implicit Differentiation with Partial Derivatives
When you have something like f(x, y) = 0 that defines y implicitly as a function of x, you can find dy/dx using partial derivatives:
dy/dx = -(∂f/∂x) / (∂f/∂y)
Example: x² + y² = 1 defines a circle. Let f(x, y) = x² + y² - 1 = 0
- ∂f/∂x = 2x
- ∂f/∂y = 2y
- dy/dx = -(2x)/(2y) = -x/y
That's the slope of the tangent line at any point on the circle.
Common Mistakes That Will Mess You Up
- Forgetting to treat other variables as constants. This is the #1 error. Every time.
- Mixing up the notation. ∂f/∂x is not the same as df/dx. The ∂ means partial.
- Dropping variables in the chain rule. When using the chain rule, don't forget to multiply by the derivative of the inner function.
- Sign errors. Especially in implicit differentiation. Double-check your negatives.
- Forgetting that the order matters in mixed partials only when the function isn't well-behaved. Most textbook problems will have well-behaved functions.
Practical Examples: Getting Your Hands Dirty
Example 1: Basic Partial Derivative
Find ∂f/∂x and ∂f/∂y for f(x, y) = 4x³y² - 2xy⁴ + 7y
∂f/∂x:
- 4x³y² → 12x²y²
- -2xy⁴ → -2y⁴
- 7y → 0
Answer: 12x²y² - 2y⁴
∂f/∂y:
- 4x³y² → 8x³y
- -2xy⁴ → -8xy³
- 7y → 7
Answer: 8x³y - 8xy³ + 7
Example 2: Finding a Tangent Plane
This is where partial derivatives actually get used for something real.
For a surface z = f(x, y), the tangent plane at point (a, b, f(a,b)) is:
z - f(a,b) = fₓ(a,b)(x-a) + fᵧ(a,b)(y-b)
Find the tangent plane to z = x² + 2y² at (1, 1, 3)
- fₓ = 2x → fₓ(1,1) = 2
- fᵧ = 4y → fᵧ(1,1) = 4
z - 3 = 2(x-1) + 4(y-1)
z - 3 = 2x - 2 + 4y - 4
z = 2x + 4y - 3
That's your tangent plane. It touches the surface at exactly one point and approximates the surface locally.
Tools for Checking Your Work
| Tool | Best For | Cost |
|---|---|---|
| Wolfram Alpha | Symbolic computation, step-by-step | Free basic, $6.99/mo pro |
| Symbolab | Homework checking with steps | Free basic, $9.99/mo pro |
| Desmos | Visualizing 3D surfaces and partial derivatives | Free |
| Geogebra 3D | Interactive visualization of tangent planes | Free |
Use these to verify your work, not to avoid learning. There's a difference between checking your answer and copy-pasting without understanding.
When You'll Actually Use This
Partial derivatives aren't just busy work. Here's where they show up in the real world:
- Machine learning: Gradient descent uses partial derivatives of the loss function with respect to each weight. Every neural network trains using this.
- Physics: Maxwell's equations, thermodynamics, and quantum mechanics are all built on partial differential equations.
- Economics: Utility functions, production functions, and optimization problems use partial derivatives constantly.
- Engineering: Heat equations, fluid dynamics, and structural analysis all require partial derivatives.
The math isn't abstract. It's the foundation for understanding how systems change when multiple things are changing at once.
Quick Reference
- ∂/∂x means "treat everything else as constant"
- ∂²f/∂x∂y = ∂²f/∂y∂x for nice functions
- Chain rule: dz/dt = (∂f/∂x)(dx/dt) + (∂f/∂y)(dy/dt)
- Implicit differentiation: dy/dx = -(∂f/∂x)/(∂f/∂y)
- Tangent plane: z - f(a,b) = fₓ(a,b)(x-a) + fᵧ(a,b)(y-b)
That's everything you need. Practice with 20-30 problems and partial derivatives become automatic. There's no shortcut to getting good at this except doing the problems.