Second Derivative Calculator

Compute first and second derivatives symbolically. Analyze concavity, find inflection points, and visualize f(x), f'(x), and f''(x).

Enter a function of x. Use ^ for exponents, * for multiplication (e.g., 3*x, not 3x), sin(), cos(), exp(), log(), sqrt(), etc.
x⁴ - 2x²
sin(x)
cos(x)
log(x)
√x
1/x
tan(x)
x·sin(x)
Leave blank to see only symbolic derivatives
Calculating...

? Understanding the Second Derivative: Curvature, Concavity & Inflection Points

The second derivative of a function, denoted as f''(x), measures the rate of change of the slope. It reveals critical information about the graph’s curvature:

  • If f''(x) > 0 on an interval, the function is concave up (convex) — the slope is increasing, shaped like a cup ∪.
  • If f''(x) < 0, the function is concave down (concave) — slope decreasing, shaped like a cap ∩.
  • Where f''(x) = 0 and changes sign, the graph has an inflection point — where concavity switches.

? From physics: f''(x) represents acceleration in motion (if f(t) = position). In optimization, second derivative test determines maxima/minima.

Our tool performs symbolic differentiation using computer algebra (powered by math.js) and gives you exact derivative expressions. The interactive graph shows both original function and its second derivative, helping you visually confirm concavity intervals and locate inflection candidates.

? Step-by-step differentiation approach

Given f(x), the calculator applies derivative rules (power rule, product rule, chain rule) to compute f'(x) and then differentiates again to obtain f''(x). The symbolic result is simplified and presented in standard mathematical notation.

Real-world case: Economic Cost Function

A manufacturer’s total cost function is approximated by C(x) = 0.02x³ − 0.6x² + 10x + 200. The marginal cost is C'(x), and the second derivative C''(x) indicates the rate at which marginal cost changes — critical for determining economies of scale. Our calculator instantly finds C''(x) and shows where production becomes concave down (diminishing returns).

? How to use this second derivative tool effectively

  1. Type any function of x in the input box (use standard operators: ^, *, /, +, - and functions like sin, cos, exp, log, sqrt).
  2. Set the visible X-range to focus on region of interest.
  3. Click “Compute & Graph” — get symbolic first and second derivatives, concavity summary, and approximate inflection points.
  4. Observe the graph: blue curve = f(x), red dashed = f''(x). Where red crosses the x-axis (and changes sign) suggests inflection.
Note: For functions with vertical asymptotes or domain restrictions (e.g., ln(x) for x ≤ 0), the tool automatically clips problematic points. Ensure the viewing range matches the domain.

✨ Advanced features & accuracy

Our tool uses the math.js symbolic engine, proven for reliable differentiation. We implement numeric root-finding for f''(x)=0 to estimate inflection points (subject to tolerance). Results are verified using high-precision floating point and cross-checked with analytical reasoning. The graphing routine samples up to 800 points for smooth rendering and adapts y-axis scaling automatically.

Function exampleSecond derivative f''(x)Concavity intervalsInflection point(s)
x³ - 3x² + 2x6x - 6Concave down: (-∞, 1) ; Concave up: (1, ∞)x = 1
sin(x)-sin(x)Concave up on (π, 2π) etcx = kπ
e^xe^xAlways concave up (f''>0)None
x⁴ - 4x²12x² - 8Concave up: (-∞, -√(2/3)) U (√(2/3),∞)x = ±√(2/3)
Educational reference — This tool is based on fundamental calculus theorems (Fermat, concavity test). Our implementation follows methods from "Stewart's Calculus" and "Thomas' Calculus". Reviewed by the GetZenQuery tech team. (Last update: June 2026)

❓ Frequently Asked Questions

Currently, only explicit functions y = f(x) are supported. For parametric, check our separate parametric derivative tool (coming soon).

The algorithm avoids extreme values using clipping; near vertical asymptotes values diverge, so the graph may omit out-of-range points. Adjust range to avoid singularities.

Inflection points are approximated by scanning f''(x) sign changes and refining via secant method (error < 1e-5). Works for smooth functions; accuracy may reduce near discontinuities.
References: MathWorld Second Derivative, Wolfram|Alpha, MIT OCW Calculus.