Partial Derivative Calculator
Compute partial derivatives of multivariable polynomial functions.
EXAMPLE FUNCTIONS
What Is the Partial Derivative Calculator?
This partial derivative calculator computes ∂f/∂x and ∂f/∂y of any two-variable function f(x,y) at a specified point using central difference numerical differentiation. It also returns the gradient vector, its magnitude, second-order partials, and Hessian discriminant for classifying critical points.
- ›First-order partials: ∂f/∂x and ∂f/∂y via central differences with h = 10⁻⁵.
- ›Gradient vector: ∇f = (∂f/∂x, ∂f/∂y), direction and magnitude of steepest ascent.
- ›Second-order partials: ∂²f/∂x², ∂²f/∂y², and cross-partial ∂²f/∂x∂y (Hessian).
- ›Critical point classification: D = fxx·fyy − (fxy)² for min/max/saddle detection.
- ›8 example functions: Quick-load common multivariable functions instantly.
Formula
| Quantity | Formula | Meaning |
|---|---|---|
| ∂f/∂x | [f(x+h,y) − f(x−h,y)] / 2h | Rate of change holding y constant |
| ∂f/∂y | [f(x,y+h) − f(x,y−h)] / 2h | Rate of change holding x constant |
| |∇f| | √((∂f/∂x)² + (∂f/∂y)²) | Steepest ascent magnitude |
| ∂²f/∂x² | [f(x+h,y) − 2f + f(x−h,y)] / h² | Curvature in x direction |
| D | fxx·fyy − (fxy)² | Hessian discriminant for critical points |
How to Use
- 1Type a function f(x, y) using x and y. Use * for multiplication, ^ for power.
- 2Enter the point (x₀, y₀) where you want the derivatives evaluated.
- 3Press Enter or click Calculate.
- 4Read ∂f/∂x, ∂f/∂y, the gradient vector ∇f, and second-order results.
- 5If both first partials are near zero, the critical point type is shown.
- 6Click a preset or Clear to start fresh.
Example Calculation
f(x,y) = x² + y² at (1, 1)
Why central differences?
Understanding Partial Derivative
What Is a Partial Derivative?
A partial derivative measures how f(x,y) changes as one variable changes, holding the other constant. ∂f/∂x is computed by differentiating with respect to x while treating y as a constant. Geometrically, it is the slope of the surface z = f(x,y) along a horizontal slice y = y₀.
The Gradient Vector
The gradient ∇f = (∂f/∂x, ∂f/∂y) points in the direction of steepest ascent. Its magnitude |∇f| gives the steepness. Moving opposite to the gradient (−∇f) descends most steeply, the principle behind gradient descent in machine learning optimisation.
- ›∇f = 0 at all critical points (minima, maxima, saddle points)
- ›|∇f| large → steep surface; |∇f| = 0 → flat (critical point)
- ›Contour lines are perpendicular to ∇f at every point
- ›Directional derivative in direction u: D_u f = ∇f · u (dot product)
Second Derivative Test
| Condition | Classification |
|---|---|
| D > 0 and fxx > 0 | Local minimum |
| D > 0 and fxx < 0 | Local maximum |
| D < 0 | Saddle point |
| D = 0 | Inconclusive |
Frequently Asked Questions
What syntax does this calculator support?
Use x and y as variable names. Operators: +, -, *, /, ^ (power). Functions: sin, cos, tan, asin, acos, atan, exp, ln, log, sqrt, abs, sinh, cosh, tanh. Constants: pi, e.
How accurate are the numerical derivatives?
Central differences with h = 10⁻⁵ give O(h²) truncation error ≈ 10⁻¹⁰, providing 8–10 significant figures for smooth functions. Second-order partials are similarly accurate but accumulate more rounding due to division by h². Expect ~6 correct significant figures for second partials.
What does the gradient magnitude tell me?
|∇f| is the maximum rate of change of f at that point. If you imagine f as elevation:
- ›∇f points uphill in the steepest direction
- ›−∇f is the steepest descent direction
- ›Contour lines (level sets) are perpendicular to ∇f
- ›|∇f| = 0 at peaks, valleys, and saddle points
How do I classify a critical point?
Enter the coordinates where ∂f/∂x = ∂f/∂y = 0. The calculator shows the second derivative test result when both first partials are near zero. D = fxx·fyy − (fxy)²: D > 0 and fxx > 0 → minimum; D > 0 and fxx < 0 → maximum; D < 0 → saddle point.
Why does my function return undefined?
Undefined results arise from singularities: x/y at y=0, ln(x) at x≤0, sqrt(x) at x<0, asin(x) for |x|>1. Choose an evaluation point away from the singularity. For ln(x²+y²), avoid (0,0).
What are second-order partial derivatives used for?
- ›Critical point classification via the Hessian discriminant D
- ›Laplace equation ∂²f/∂x² + ∂²f/∂y² = 0, steady-state heat, potential fields
- ›Wave equation ∂²u/∂t² = c²∂²u/∂x²
- ›Taylor expansion: f(x+h,y+k) ≈ f + fxh + fyk + ½(fxxh² + 2fxyhk + fyyk²)
What is the mixed partial ∂²f/∂x∂y?
Differentiate f with respect to y first, then x. Clairaut's theorem: for smooth f, ∂²f/∂x∂y = ∂²f/∂y∂x. Computed here using the four-point formula: (f(x+h,y+h) − f(x+h,y−h) − f(x−h,y+h) + f(x−h,y−h)) / (4h²).