Tangent Plane Calculator

Compute the tangent plane equation for any function f(x,y) using symbolic partial derivatives. Interactive 3D visualization for multivariable calculus.

Tangent plane formula: For z = f(x, y), at (x₀, y₀):

z = f(x₀,y₀) + fx(x₀,y₀)(x - x₀) + fy(x₀,y₀)(y - y₀)

Use x and y. Supported: ^ * + - / sin cos tan exp log sqrt
x² + y²
sin(x)cos(y)
x·y
e⁻ˣ²⁻ʸ²
x² - y²
√(x²+y²)
x³ - 3xy²
Computing symbolic derivatives & rendering 3D plot...

Understanding Tangent Planes

In multivariable calculus, the tangent plane to a surface z = f(x, y) at a given point provides the best linear approximation to the surface near that point. It is the natural generalization of the tangent line in single-variable calculus.

Formal Definition (Differentiability):

A function f(x, y) is differentiable at (x₀, y₀) if there exists a linear function L(x, y) = A(x - x₀) + B(y - y₀) + C such that

lim(x,y)→(x₀,y₀) |f(x,y) - L(x,y)| / √[(x-x₀)² + (y-y₀)²] = 0.

When this holds, the coefficients are forced to be A = fx(x₀,y₀), B = fy(x₀,y₀), and C = f(x₀,y₀). The linear function L(x,y) is exactly the tangent plane equation.

Geometric Interpretation of Partial Derivatives

  • fx(x₀,y₀) represents the slope of the curve obtained by intersecting the surface with the vertical plane y = y₀ (rate of change in the x-direction).
  • fy(x₀,y₀) represents the slope of the curve obtained by intersecting the surface with the vertical plane x = x₀ (rate of change in the y-direction).

Linear Approximation and Error

For points (x, y) near (x₀, y₀), we have the linear approximation:

f(x, y) ≈ f(x₀, y₀) + fx(x₀,y₀)·(x - x₀) + fy(x₀,y₀)·(y - y₀).

The error is of higher order than the distance from (x₀, y₀). If f is continuously differentiable (C¹), then

f(x, y) = f(x₀, y₀) + fx(x₀,y₀) Δx + fy(x₀,y₀) Δy + ε₁ Δx + ε₂ Δy,

where ε₁, ε₂ → 0 as (Δx, Δy) → (0,0). This is the foundation of local linearity.

Normal Vector and Gradient

The tangent plane can also be expressed using the gradient. Rewrite as:

fx(x₀,y₀) (x - x₀) + fy(x₀,y₀) (y - y₀) - (z - f(x₀,y₀)) = 0.

A normal vector to the plane is n = (fx, fy, -1). The gradient ∇f = (fx, fy) points in the direction of steepest ascent; for the surface z = f(x,y), (fx, fy, -1) is normal to the tangent plane.

Differentiability vs. Existence of Partial Derivatives

Existence of partial derivatives at a point does not guarantee differentiability. A classic counterexample:

f(x, y) = { xy/(x²+y²) for (x,y) ≠ (0,0), 0 at (0,0) }.

Both partial derivatives exist at (0,0), but the function is not continuous there, hence not differentiable. Our calculator checks differentiability by attempting to evaluate the partial derivatives symbolically; if the result is undefined or infinite, an error is shown.

Applications of Tangent Planes

  • Local Linearization: Approximating complicated functions near a point.
  • Error Propagation: Δf ≈ |fx|Δx + |fy|Δy for uncertainties.
  • Optimization: At a local extremum, tangent plane is horizontal (fx = fy = 0).
  • Surface Normals in 3D Graphics: Used for shading and lighting.

Calculator features (verified):

  • Symbolic partial differentiation using nerdamer.js — works for polynomials, trig, exponentials, logarithms, and combinations.
  • Exact rational output, with numeric evaluation displayed to 4 decimals.
  • Interactive 3D surface + tangent plane visualization using Plotly.
  • Robust error handling for non-differentiable points or undefined expressions.
  • Real-time calculation with debounced input.

Frequently Asked Questions

If the partial derivatives do not exist or are not continuous, the tangent plane may not exist. The calculator will display an error. Typical cases: absolute value, sharp edges, or discontinuities.

The gradient ∇f = (f_x, f_y) is orthogonal to level curves. For the surface z = f(x,y), the vector (f_x, f_y, -1) is normal to the tangent plane.

This calculator is designed for explicit functions z = f(x,y). For implicit surfaces, use the gradient of F and the formula ∇F·(x-x0,y-y0,z-z0)=0.