Cubic Function Grapher & Calculator — Inflection and Extrema
Graph y = ax³ + bx² + cx + d free by entering a through d. Instantly calculate the inflection point, local maximum, and local minimum, then inspect coordinates.
What the graph of a cubic function is
A cubic function is written y = ax³ + bx² + cx + d, taking its name from the highest power of x being three. Unlike the symmetric parabola of a quadratic, its curve is not mirror-symmetric, and the sign of a settles the overall direction: positive and it climbs from lower-left to upper-right, negative and it falls from upper-left to lower-right, tracing an S-shaped curve that can carry at most one local maximum and one local minimum along the way. Setting a to zero removes the cubic term entirely and leaves something of lower degree, so this tool requires a to be non-zero.
This tool draws the curve from four coefficients and works out the inflection point, the local maximum, and the local minimum together. An inflection point — where the concavity switches — always exists, but whether a local maximum and minimum exist at all depends on the sign of a discriminant: either both are present, or neither is, and the function is simply monotone throughout. Changing the range of x on display lets you zoom in around the inflection point or see how the curve stretches out further away.
How to use the cubic graph
- Enter the four coefficients Put in a, b, c and d and the curve is drawn. Setting a to zero leaves no cubic at all, and an error says so.
- Set the range of x Give xMin and xMax to show only the stretch you want. If xMin is not below xMax there is no range, and an error follows.
- Check the inflection point The coordinates of the point where concavity switches are shown automatically, marked on the graph with an orange diamond.
- Read off whether extrema exist Depending on the sign of the discriminant, both a local maximum and minimum are shown, or the graph reports none at all. Green marks the maximum, purple the minimum.
- Find y for a particular x Type a number into the x field and the matching y is calculated, more exactly than it could be read off the curve.
Tips for getting more out of it
- The cubic coefficient a determines the overall direction of the graph. If a > 0, the curve rises from lower-left to upper-right; if a < 0, it falls from upper-left to lower-right.
- The inflection point is where the concavity of the graph changes. Its x-coordinate is x = −b ÷ (3a), and it is shown on the graph as an orange diamond.
- Local extrema are found by solving dy/dx = 3ax² + 2bx + c = 0. Local maxima appear as green dots, local minima as purple dots. If the discriminant of this quadratic is ≤ 0, there are no local extrema and the function is monotone.
- The default is y = x³ − 3x (a=1, b=0, c=−3, d=0), a classic cubic with a local maximum at (−1, 2) and a local minimum at (1, −2).
Where the cubic graph helps
Studying derivatives and sign charts
For problems that build a table of increase and decrease from the first derivative, comparing it against the actual curve deepens the sense of local maxima, minima, and monotone stretches.
Checking a factorisation against the number of roots
Redraw the curve while changing the coefficients and you can see visually how many times it meets the x-axis, useful for checking the number of roots found by factoring.
Seeing concavity flip at the inflection point
Watching the curve bend one way and then the other around the inflection point, as the coefficients change, is a good way to practise reading the sign of the second derivative.
Sketching cubic models in economics or physics
For phenomena approximated by a cubic — a changing cost, a changing volume — plugging in coefficients gives a quick sense of the overall shape.
Comparing with other degrees of curve
To compare against one degree lower, use the quadratic graph; against a straight line, the linear graph.
Terms used with cubic functions
- Cubic function
- A function of the form y = ax³ + bx² + cx + d with a not zero. It takes its name from the highest power of x being three.
- Inflection point
- The point where the concavity of the graph switches. Setting the second derivative d²y/dx² = 6ax + 2b to zero gives x = −b ÷ (3a), and a cubic function always has exactly one.
- Local maximum and minimum
- A local peak, where y is higher than at nearby points, and a local valley, where it is lower. Found as the real roots of the first derivative dy/dx = 3ax² + 2bx + c = 0.
- Discriminant (of the extrema)
- The sign of (2b)² − 4(3a)c, the discriminant of the first derivative, settles whether extrema exist at all. Positive means both a local maximum and minimum exist; zero or negative means neither does, and the curve is monotone.
- Monotone increasing and decreasing
- The state where y keeps rising as x rises (monotone increasing), or keeps falling (monotone decreasing). A cubic with no local extrema is always one or the other.
- Factoring
- Rewriting the cubic expression ax³ + bx² + cx + d as a product such as (x − p)(x − q)(x − r). The values p, q and r correspond to the x-coordinates where the curve meets the x-axis.
FAQ
Side Note — The Rivalry Behind the Cubic Formula
The general solution for cubic equations (Cardano's formula) was the subject of a bitter feud among 16th-century Italian mathematicians. Niccolò Tartaglia discovered a method for solving cubic equations and shared it with Gerolamo Cardano under a sworn promise of secrecy. In 1545, however, Cardano published the formula in his book Ars Magna, triggering a fierce dispute with Tartaglia, who accused him of plagiarism.
Remarkably, solving cubic equations helped spark the invention of complex numbers. Even when a cubic equation has only real roots, Cardano's formula may require taking the square root of a negative number during intermediate steps. Rafael Bombelli showed that by treating these "imaginary" numbers formally, the correct real solutions could be obtained — planting the seeds of complex number theory.