Where does the concavity of f change?
Type a function of x. The page finds the intervals where f is concave up and concave down, and the inflection points where the concavity changes.
- Inflection points at x =
- 2
The inflection points of x^3 - 6x^2 + 9x + 30 are 2.
- Concave up on
- (2, ∞)
- Concave down on
- (-∞, 2)
- f″(x) =
- 6x - 12
Inflection points at x =: 2. The inflection points of x^3 - 6x^2 + 9x + 30 are 2.
How to calculate
Finds where f is concave up or down, and its inflection points.
Example with the default inputs (Function f(x) x^3 - 6x^2 + 9x + 30): The inflection points of x^3 - 6x^2 + 9x + 30 are 2.
Method: Concave up where f″ > 0, down where f″ < 0; an inflection point is where f is continuous and f″ changes sign.
- x in radians; ln is the natural logarithm.
- Points searched for in −10^6 to 10^6.
Worked examples
Each example is checked against the calculator on every build.
- Function f(x) x^3 - 6x^2 + 9x + 30 gives Inflection points at x = 2, Concave up on (2, ∞), Concave down on (-∞, 2).Source: OpenStax (Strang and Herman, 2016), Calculus Volume 1, section 4.5 Derivatives and the Shape of a Graph, Example 4.19
- Function f(x) x^4 gives Inflection points at x = none, Concave up on (-∞, ∞), Concave down on none.
How it works
f is concave up where f″(x) > 0 and concave down where f″(x) < 0. An inflection point is a point where f is continuous and f″ changes sign.
- A computer algebra system (nerdamer, open source) finds f′ and then f″ as the derivative of f′, each checked against a numeric difference quotient at 20 points (to 1 part in a million). The algebra runs in the background after you start typing.
- The zeros and breaks of g = f″ are found between −∞ and ∞, as described below. Call them the cuts. A point where f is not defined is a break of f″ too, so it is a cut. When f″ holds an |u| (|x| − x² gives 1/|x| − 2 − x²/|x|³), f″ can jump where u = 0 without changing sign, which the grid does not find, so the page gives no answer.
- Inside the domain: with h = 10⁻⁹ × max(1, |c|), a cut c is inside the domain of f when f(c) is a real number and |f(c ± h)| ≤ 10 |f(c ± 100h)| on both sides (f does not grow towards c).
- Inflection points: the cuts c inside the domain where f″(c − h) and f″(c + h) have opposite signs (neither 0). The page lists their x values, in increasing order: "2", or "none".
- Concavity: the cuts split the line into intervals (−∞, c₁), (c₁, c₂), …, (cₙ, ∞). In each, the sign of f″ is read at one point: the midpoint of a finite interval; c − max(1, |c|) for (−∞, c); c + max(1, |c|) for (c, ∞); 0 for (−∞, ∞) when there are no cuts. An interval whose point is not in the domain of f (f not a real number there) or where f″ is 0 is left out. Two neighbouring intervals with the same sign are joined when the cut between them is a zero of f″ (not a break) inside the domain (x⁴ is concave up on (-∞, ∞)). Intervals are not joined across a break of f″: x^(2/3)(x − 5) is concave up on (−1, 0) and (0, ∞), as f′ does not exist at 0, and x^(4/3) is concave up on (−∞, 0) and (0, ∞) (true on each part, though f″ > 0 on both sides of 0).
The page shows Inflection points at x =, Concave up on and Concave down on (open intervals separated by commas, with -∞ and ∞ written with a hyphen and the infinity sign, or none), and f″(x) = as the algebra writes it. Cut values are written exactly or as ≈ decimals, as below.
How the points are found
The zeros and breaks of a function g (a zero: g passes through or touches 0; a break: g jumps, goes to ±∞, or stops being a real number) are found between two ends −∞ and ∞ (for g = f″) (each end clipped to ±10⁶) in two ways at once.
By the algebra. The computer algebra system solves g(x) = 0. A solution is an exact candidate when it is a number strictly between the ends, is not a rounded number (a whole number past 2⁵³; a fraction p/q, p and q being the numbers that multiply its top and its bottom, such as 288557167/(342919925e), when q after removing its factors 2 and 5 is over 1,000,000, or is over 1 while |p| times it is over 10¹²; or a decimal with more than 12 significant digits), and g is 0 there up to rounding: |g(c)| is at most 10⁻¹² times the sum of the sizes of the terms of g at c (the parts of g joined by + and −). So x² + 10⁻²⁰ has no zero at 0, though the algebra gives one.
On a grid. g is worked out at 8,001 points x₀ to x₈₀₀₀, evenly spaced in asinh x (so they reach ±10⁶ when an end is infinite and bunch up near 0): xᵢ = sinh(u₀ + (u₁ − u₀)(i + 0.3183)/8001), with u₀ = asinh(−10⁶) and u₁ = asinh(10⁶). For each step from xᵢ to xᵢ₊₁:
- If g is a number at one end of the step and not a number at the other (as ln or √ of a negative number is not), the point where it stops being one is found by halving the step 80 times: a break. A value past the largest computer number, about 1.8 × 10³⁰⁸, still counts as a number with its sign (x e^(−x) and its derivatives for x below about −703), so an overflow is not a break. But when |g| is over 10³⁰⁰ at the end where g is a number (e^x − e^(2x) near x = 355, where e^(2x) overflows and the difference is not a number), the page cannot tell an overflow from the end of the domain and gives no answer (a value is too large).
- If g has opposite signs at the two ends, the sign change is found by halving 80 times. It is a zero if |g| there is at most 10⁻⁶ of the larger of |g(xᵢ)| and |g(xᵢ₊₁)|, and a break otherwise (g jumps or goes through ±∞). If g is past the largest computer number at either end, the page gives no answer (a value is too large).
- If g has one sign at xᵢ, xᵢ₊₁ and xᵢ₊₂ and turns at xᵢ₊₁ (a peak or a dip), the turning point r is found by halving (on the sign of g(x + h) − g(x − h), h = 10⁻⁷ × max(1, |x|)). If g(r) has the other sign, g dips through 0 and back between xᵢ and xᵢ₊₂: two zeros too close together for the grid. Unless the algebra gives at least two exact candidates strictly between xᵢ and xᵢ₊₂ (then they are the zeros), the page gives no answer (two points are too close together). If |g(r)| is at most 10⁻⁹ of the larger of |g(xᵢ)| and |g(xᵢ₊₂)|, g touches 0 there: that is a zero when an exact candidate lies within 10⁻⁶ × max(1, |candidate|) of r, and otherwise the page says a zero could not be confirmed and gives no answer. If |g(r)| is over 10⁶ times that size (or not a number), g peaks through ±∞: a break. A reason to give no answer that turns up on the way (a dip, a touch the algebra does not confirm) is given only after the whole grid, so a function with more than 30 points (sin x) gets "too many points to check".
A zero found on the grid within 10⁻⁶ × max(1, |c|) of an exact candidate c takes its exact value and text; otherwise, when it is within 10⁻⁹ × max(1, |x|) of a fraction p/q with q = 1, 2, 3, 4, 6, 8 or 12 (the first that fits) where g is 0 up to rounding (the rule above), it is shown as p/q; otherwise as ≈ and a decimal to 10 significant figures (rounded half up). A break is shown exactly as p/q when x is within 10⁻⁹ × max(1, |x|) of p/q for q = 1, 2, 3, 4, 6, 8 or 12 (the first that fits) and g is not a real number at p/q or at p/q ± 10⁻⁹ × max(1, |x|) (a pole, a jump, or an end of the domain); otherwise as ≈ and a decimal. An exact candidate that the grid did not find (two zeros inside one step) is added. A zero right next to a pole, inside the same grid step, is found only when the algebra gives it. The same point found twice counts once (a zero before a break). Two different points within 10⁻⁶ × max(1, |x|) of each other give no answer (two points are too close together), and so do two exact candidates that close: x²(x − 10⁻⁷)² has critical numbers at 0, 5 × 10⁻⁸ and 10⁻⁷, which the page does not merge into one. More than 30 points gives no answer (too many points to check).
What you can type
- A number has at most 15 digits in a row. A computer number keeps only about 16 digits, so a longer one (9007199254740993) would stand for a nearby number (9007199254740992), and the page asks for fewer digits instead. Write very large or very small numbers with a power of ten (1e-20).
- The function f uses the variable x. Numbers can have decimals (2.5) and powers of ten (1e-3).
- Operations: + − * / and ^ for powers. Brackets group. A number or bracket next to a letter multiplies: 2x, 3(x + 1), x sin(x).
- Constants: pi (or π) and e.
- Functions: sqrt, cbrt, ln (and log, the same natural logarithm), log10, exp, abs (or |x|), sin, cos, tan, sec, csc, cot, asin, acos, atan (arcsin, arccos, arctan also work), sinh, cosh, tanh and their inverses. Angles are in radians. sin x without brackets means sin(x); sin x^2 means sin(x²).
What gets no answer
- More than 30 cuts (sin(x)), or a possible zero of f″ that the algebra does not confirm.
- Two cuts too close together to tell apart (x⁴ − 10⁻¹²x², whose inflection points ±4.1 × 10⁻⁷ lie inside one grid step), a value past the largest computer number next to a cut, or an f″ that holds |u|.
- A step that fails its check, finds no formula, or takes over 3 seconds.
Worked examples by hand
f(x) = x³ − 6x² + 9x + 30 (OpenStax Calculus Volume 1, section 4.5, Example 4.19). f′(x) = 3x² − 12x + 9 and f″(x) = 6x − 12, which is 0 at x = 2. f″(0) = −12 < 0 and f″(3) = 6 > 0: f is concave down on (-∞, 2), concave up on (2, ∞), and the inflection point is at x = 2 (the point (2, 32), since f(2) = 8 − 24 + 18 + 30 = 32).
f(x) = x⁴ (the second derivative test for concavity, OpenStax Calculus Volume 1, section 4.5). f″(x) = 12x² is 0 at x = 0 and positive on both sides, so there is no inflection point and f is concave up on (-∞, ∞).
Other questions people ask
What is concavity?
f is concave up on an interval when its graph bends upward, like a cup (f′ is increasing there), and concave down when it bends downward, like a cap (f′ is decreasing). With a second derivative: concave up where f″ > 0, concave down where f″ < 0.
What is an inflection point?
A point of the graph where f is continuous and the concavity changes, from up to down or from down to up. For x³ − 6x² + 9x + 30, f″ = 6x − 12 changes sign at x = 2, so (2, 32) is an inflection point.
Is every zero of f″ an inflection point?
No. f″ must change sign. For x⁴, f″ = 12x² is 0 at x = 0 but positive on both sides, so x⁴ is concave up everywhere and has no inflection point. And an inflection point can be where f″ does not exist, as for the cube root of x at 0.
How do I find the intervals of concavity?
Find f″, then the x where f″ = 0 or f″ does not exist, and the points where f is not defined. They cut the number line into intervals; in each, the sign of f″ at any one point gives the concavity of the whole interval.
Why does 1/x have no inflection point?
1/x is concave down on (−∞, 0) and concave up on (0, ∞), but 0 is not in its domain: the graph does not pass through a point there, so there is no inflection point.
How is the answer checked?
Both derivatives from the computer algebra system are compared with numeric difference quotients at 20 points. The zeros and breaks of f″ are found both by the algebra and by a scan on a fine grid, and the sign of f″ is read on each side of each point.