Second Derivative Calculator
Compute the second derivative and determine concavity at a given point.
Use * for multiply, ^ for power, sin/cos/exp/log
What Is the Second Derivative Calculator?
The Second Derivative Calculator computes f′′(x₀) numerically using the central difference formula, determines concavity (concave up, concave down, or inflection), and also shows f(x₀), f′(x₀), and f′′′(x₀) in a comprehensive derivative table. An arc diagram visualizes the concavity direction. Preset functions include polynomials, trig, and exponential examples.
- ›Central difference formula: [f(x+h) − 2f(x) + f(x−h)] / h² with h = 0.0001
- ›f′′ > 0: concave up (∪ shape), curve bends upward at x₀
- ›f′′ < 0: concave down (∩ shape), curve bends downward at x₀
- ›f′′ ≈ 0: possible inflection point, f′′′ is shown to help confirm
Formula
Second Derivative Formulas
Central diff. f′′
[f(x+h)−2f(x)+f(x−h)] / h²
Concave up
f′′(x) > 0 at x₀
Concave down
f′′(x) < 0 at x₀
Inflection point
f′′(x) = 0 and changes sign
2nd Deriv. Test
Local min if f′=0, f′′>0; max if f′′<0
Step size h
h = 0.0001 for numerical accuracy
How to Use
- 1Enter the function f(x), use * for multiply, ^ for power, sin/cos/exp/log
- 2Enter the x₀ value at which to evaluate the second derivative
- 3Press Enter or click Calculate f′′(x)
- 4The concavity diagram shows ∪ (up) or ∩ (down) shape at x₀
- 5The derivative table shows f(x₀), f′(x₀), f′′(x₀), and f′′′(x₀)
- 6Use preset buttons to quickly load common functions
Example Calculation
f(x) = x³ − 6x² at x₀ = 2:
f(2) = 8 − 24 = −16
f′(x) = 3x² − 12x → f′(2) = 12 − 24 = −12 (decreasing)
f′′(x) = 6x − 12 → f′′(2) = 12 − 12 = 0 (inflection)
f′′′(x) = 6 → f′′′(2) = 6 ≠ 0 → true inflection point
Inflection at x = 2 confirmed by f′′=0 and f′′′≠0
Second Derivative Test for Local Extrema
If f′(x₀) = 0 and f′′(x₀) > 0 → local minimum. If f′′(x₀) < 0 → local maximum. If f′′(x₀) = 0 → test inconclusive (check higher derivatives or use first derivative test).
Understanding Second Derivative
Common Functions: Concavity Summary
| Function | f′′(x) | Concavity | Inflection Points |
|---|---|---|---|
| x² | 2 | Always up (∪) | None |
| x³ | 6x | Up if x>0, down if x<0 | x = 0 |
| sin(x) | −sin(x) | Depends on x | x = nπ |
| cos(x) | −cos(x) | Depends on x | x = π/2 + nπ |
| eˣ | eˣ > 0 | Always up (∪) | None |
| ln(x) | −1/x² < 0 | Always down (∩) | None |
Frequently Asked Questions
What does the second derivative tell you?
The second derivative tells you how the function curves. While f′ tells you if a function is increasing or decreasing, f′′ tells you if it is speeding up or slowing down.
- ›f′′ > 0: concave up, curve opens upward (bowl shape)
- ›f′′ < 0: concave down, curve opens downward (dome shape)
- ›f′′ = 0 with sign change: inflection point, concavity changes
- ›In physics: f′′ for position is acceleration (rate of change of velocity)
What is the Second Derivative Test?
The Second Derivative Test is the fastest way to classify critical points without analyzing the sign changes of f′ around the point.
- ›Local min: f′ = 0 and f′′ > 0 (concave up at the critical point)
- ›Local max: f′ = 0 and f′′ < 0 (concave down at the critical point)
- ›Inconclusive: f′ = 0 and f′′ = 0, use first derivative test instead
- ›Example: f(x)=x² → f′(0)=0, f′′(0)=2>0 → local (global) minimum at x=0
What is an inflection point?
Inflection points are where a curve transitions between bending upward and downward. They are important in economics (diminishing returns), physics (trajectory shape), and calculus optimization.
- ›f(x) = x³: inflection at x=0 (f′′ = 6x changes sign)
- ›f(x) = x⁴: f′′(0) = 0 but no inflection, concavity does not change
- ›Necessary condition: f′′(x₀) = 0
- ›Sufficient condition: f′′ changes sign at x₀ (or f′′′(x₀) ≠ 0)
What is the central difference formula for f′′?
The central difference formula for f′′ is derived by combining two first-order Taylor expansions forward and backward. It is second-order accurate: error scales as h².
- ›Step size h = 0.0001 balances accuracy vs. floating-point precision
- ›Too large h → truncation error (approximation is rough)
- ›Too small h → cancellation error (floating-point arithmetic loses precision)
- ›h = 10⁻⁴ is optimal for double-precision arithmetic and smooth functions
How does concavity relate to optimization?
Convex functions (f′′ ≥ 0 everywhere) have global minima at their only critical point. Concave functions (f′′ ≤ 0 everywhere) have global maxima. Both are special and well-studied in optimization.
- ›Convex function: any local minimum is the global minimum
- ›Strictly convex (f′′ > 0): unique global minimum
- ›Cost and production functions in economics are often assumed convex
- ›Machine learning loss functions are ideally convex for guaranteed gradient convergence
What functions can I enter?
Use standard mathematical notation with these operators: * for multiplication, ^ for power, / for division. Function names are lowercase.
- ›Polynomial: x^4 - 2*x^2 + 1
- ›Trig: sin(x)^2 + cos(x)^2 (should give f′′ ≈ 0, it's always 1)
- ›Exponential: exp(x) or exp(-x^2)
- ›Logarithm: log(x) for log₁₀, ln(x) for natural log
How is concavity used in real-world problems?
Second derivatives describe how rates of change are themselves changing, a concept with broad applications in quantitative fields.
- ›Economics: diminishing marginal utility (f′ > 0, f′′ < 0, concave utility function)
- ›Physics: acceleration = d²position/dt², the second derivative of position
- ›Finance: option gamma = ∂²V/∂S², second derivative of option value to stock price
- ›Machine learning: Hessian matrix = matrix of second partial derivatives for optimization