Critical Point Calculator

Find all critical points where f'(x)=0 or undefined. Classify local minima, maxima, inflection points, and visualize the curve — enhanced with non-differentiable point detection.

Supports: + - * / ^, sin, cos, tan, exp, log, sqrt, abs, etc. Use explicit * for multiplication: 3*x not 3x.
Note: For abs(x) or piecewise, the tool detects non-differentiable critical points numerically.
? x³ - 3x (Two extrema)
? sin(x) on [0, 2π]
⛰️ x⁴ - 2x² (triple extrema)
?️ Gaussian (single max)
? x³ (inflection point)
⚠️ |x| (non-differentiable min)
Privacy first: All calculations are performed locally in your browser – no data is sent to any server.

What are Critical Points? Mathematical Foundation

In calculus, a critical point (or stationary point) of a differentiable function f is any point x₀ in its domain where the derivative f′(x₀) = 0 or where the derivative does not exist (non-differentiable). Critical points are essential for locating local extrema (minima/maxima) and inflection points, and they form the backbone of optimization problems in physics, economics, and engineering.

f'(x) = 0   ⟹   Potential extremum or saddle point

The First Derivative Test examines the sign change of f′ around the point to determine whether it's a local maximum, minimum, or neither. The Second Derivative Test uses f″(x₀): if f″(x₀) > 0, it's a local minimum; if f″(x₀) < 0, a local maximum; if f″(x₀) = 0, the test is inconclusive (could be inflection or higher-order).

✨ Why Use an Interactive Critical Point Calculator?

  • Visual intuition: See how the graph behaves at critical points — tangents are horizontal.
  • Eliminate algebraic errors: Automatic symbolic differentiation and root-finding ensure reliable results.
  • Educational depth: Perfect for self-study, lesson demonstrations, and comparing theoretical vs. numeric solutions.
  • Optimization ready: Real‑world applications: profit maximization, least‑cost design, curve fitting.

? Step-by-Step Algorithm Behind the Tool

  1. Parse & compile the function f(x) using math.js expression engine.
  2. Symbolic derivative: Compute f′(x) and f″(x) exactly via math.derivative.
  3. Root isolation: Scan the user‑defined interval [xmin, xmax] with an adaptive step to detect sign changes in f′(x).
  4. Refinement: Apply Newton–Raphson or bisection to locate each root with high precision (tolerance 1e-8).
  5. Classification: Evaluate f″(x) at each critical point; if |f″| < 1e-6, we attempt higher‑order analysis or label as inflection/saddle.
  6. Graphical rendering: Plot f(x) with the critical points highlighted, matching classification colors.
Real‑World Case Study: Maximizing Revenue

A company models its daily profit as P(x) = -2x³ + 12x² - 10x + 5 (thousands of dollars), where x is hundreds of units produced. Finding critical points of P'(x) = -6x² + 24x - 10 = 0 yields x ≈ 0.48 and x ≈ 3.52. Using the second derivative P''(x) = -12x + 24, at x=3.52, P'' is negative → local maximum. The tool instantly verifies this, helping business analysts identify optimal production level without manual algebra. The interactive graph shows the profit peak clearly.

Classification Table & Examples

Function f(x)Critical Points (x)TypeSecond Derivative Sign
x³ - 3xx = -1, x = 1Local max (-1,2) & Local min (1,-2)f″(-1) = -6 (<0), f″(1)=6 (>0)
sin(x) (0 to 2π)π/2, 3π/2Max at π/2, Min at 3π/2f″(π/2) = -sin = -1
x⁴ - 2x²x = -1, 0, 1Min (-1,-1), Max (0,0), Min (1,-1)f″(-1)=8>0, f″(0)=-4<0, f″(1)=8>0
x³ (cubic inflection)x = 0Inflection point (saddle)f″(0)=0, first derivative no sign change

Theoretical Underpinnings: Fermat's Theorem & Beyond

Fermat's theorem states that if f has a local extremum at x₀ and f is differentiable there, then f′(x₀)=0. However, the converse is not always true: f′(x₀)=0 may correspond to a saddle/inflection (e.g., f(x)=x³). That's why the second derivative test is crucial. For functions with non‑differentiable points (e.g., absolute value at 0), the calculator warns when the derivative fails to exist. The tool's underlying numeric root-finding is adapted from classical methods (Press et al., Numerical Recipes) and ensures high accuracy for smooth elementary functions.

Frequently Asked Questions (FAQ)

Yes, typical examples include f(x)=|x| at x=0 or f(x)=x^{2/3}. Our calculator identifies points where numeric derivative fails (non-differentiable) if they lie within domain and reports them as critical points.

Absolutely. Powered by math.js, it supports sin, cos, tan, exp, log, sqrt, and even user-defined compositions. Derivatives are computed symbolically for high precision.

We perform an initial sweep across the interval, detecting sign changes in f′(x). For each detected bracket, we refine using a hybrid Newton-bisection method. The algorithm can locate up to 20 distinct critical points.

The canvas automatically scales to fit function values plus a margin. If the function has very large peaks, adjust your Y‑range? Currently auto-scaling provides best visibility.

In optimization, loss functions’ critical points correspond to potential minima. Gradient descent seeks points where gradient ≈ 0. This calculator builds fundamental intuition.

Expertise & Authoritativeness: Built on rigorous symbolic differentiation (math.js). The methodology follows widely accepted calculus standards (Stewart, 8th ed., and the OpenStax Calculus). Critical point detection uses validated numerical root-finding routines. Reviewed by the GetZenQuery tech team, last updated June 2026. For instructors and professionals: accuracy is verified against Wolfram Alpha test cases.

References: Stewart, J. "Calculus: Early Transcendentals"; Weisstein, E.W. "Critical Point" from MathWorld; and the mathematical community guidelines.