Math Function Plotter
Plot up to four Cartesian or polar functions with bounded expression parsing, adjustable sampling, and audits for invalid or clipped points.{{ summaryTitle }}
{{ summaryLine }}
The chart renderer is unavailable. The audit and sample tables remain available.
| Function | Finite | Invalid | Minimum | Maximum | Copy |
|---|---|---|---|---|---|
| {{ row.source }} | {{ formatInteger(row.finite) }} | {{ formatInteger(row.invalid) }} | {{ formatNumber(row.minimum) }} | {{ formatNumber(row.maximum) }} |
| Function | {{ variableName }} | Output | Plot x | Plot y | Window | Copy |
|---|---|---|---|---|---|---|
| {{ row.source }} | {{ formatNumber(row.input) }} | {{ formatNumber(row.output) }} | {{ formatNumber(row.x) }} | {{ formatNumber(row.y) }} | {{ row.visible ? 'Visible' : 'Outside' }} |
A function plot turns an input-output relationship into a shape. In Cartesian coordinates, each input x produces a vertical value y. In polar coordinates, an angle produces a radius, and that radius is converted to a point around the origin. The same expression can therefore describe very different geometry depending on the coordinate system.
Graphs help reveal intercepts, turning points, growth, oscillation, symmetry, and regions where a function is undefined. They are also approximations whenever software evaluates only a finite set of inputs. A narrow peak can fall between samples, a vertical asymptote can look like a connecting line, and a visible window can hide valid values without changing the function itself.
- Domain
- The input interval that is evaluated, including both endpoints.
- Visible window
- The vertical Cartesian range, or the square x-y range used to display a polar curve.
- Sample
- One evaluated input and its finite output, converted to a plotted point when possible.
- Discontinuity
- A break, jump, asymptote, or undefined location where a continuous line would be misleading.
Sampling density should match the behavior being investigated. Smooth lines and broad parabolas may need few points, while high-frequency trigonometric curves or narrow features need more. More samples improve resolution but do not perform symbolic analysis or prove that every discontinuity has been found.
A graph is strongest when the expression, domain, and point table agree. Use the plot to see shape, then check finite and invalid counts and individual sampled values before drawing a conclusion from a crossing, gap, or apparent extremum.
How to Use This Tool:
Choose the coordinate system first because it determines both the variable and the meaning of the domain.
- Select Cartesian — y = f(x) or Polar — r = f(theta). Polar angles are measured in radians.
- Enter one to four functions, one per line. Use
xin Cartesian mode orthetaortin polar mode; an equation prefix such asy =orr =is optional. - Set the domain minimum and maximum, then choose the visible minimum and maximum. Each minimum must be less than its matching maximum.
- Open Advanced to change Samples per function from 3 to 1,001. The default is 601 evenly spaced samples.
- Correct any expression or range error, then inspect Function plot, Series audit, and the sampled rows that matter to the feature you are studying.
Interpreting Results:
The plot shows only finite points that fall within the selected window. A point outside the window remains in the sampled data, while an undefined or infinite result is counted as invalid and creates no plotted coordinate.
- Use Finite and Invalid counts to distinguish a clipped curve from a function that cannot be evaluated at some inputs.
- Use the minimum and maximum sampled outputs as evidence about the chosen grid, not guaranteed global extrema between samples.
- Check the Sample ledger around a suspicious jump or crossing. A visual gap can be real, while a connecting segment can still hide an unsampled asymptote.
- Compare runs only when the expression, coordinate mode, domain, visible window, and sample count stay the same.
Technical Details:
Expressions are parsed into a bounded arithmetic tree before evaluation. Supported syntax includes decimal and scientific notation, parentheses, implicit multiplication, the constants pi and e, arithmetic operators, and a defined set of trigonometric, logarithmic, rounding, power, minimum, maximum, and distance functions. Assignment chains, unknown names, and unsupported characters are rejected.
Formula Core:
With N samples over the closed domain from a to b, adjacent inputs are evenly spaced. The final input is set exactly to b to avoid accumulated step error.
For Cartesian mode, u is x and the plotted point is (x, f(x)). For polar mode, u is the radian angle θ, r is the expression output, and the last equation converts the sample to Cartesian display coordinates.
Rule Core:
| Rule | Exact behavior | Consequence |
|---|---|---|
| Expression limit | Up to four non-empty lines, 500 characters total, and 120 characters per line. | Longer or extra expressions are rejected. |
| Numeric bounds | Domain and visible-window values must be finite decimals from −1,000,000 to 1,000,000. | Constants such as pi belong in expressions, not range fields. |
| Finite-point rule | NaN and infinite outputs do not become coordinates. | A run fails if every sampled value is non-finite. |
| Visibility rule | Cartesian points require y inside the visible range; polar points require both converted x and y inside it. | A run fails when no sampled point is visible. |
| Likely break rule | In Cartesian mode, a segment is broken when consecutive large, opposite-sign outputs jump by more than 1.5 times the visible span while both lie far from its center. | This reduces some false lines across asymptotes but cannot detect every discontinuity. |
Calculations use double-precision floating-point numbers. Trigonometric functions use radians, and some library results can differ slightly across browsers, operating systems, or processor architectures.
Accuracy Notes:
Finite sampling measures the function only at the chosen inputs. It does not solve equations, differentiate, integrate, find exact extrema, draw implicit equations, or prove continuity.
- Increase the sample count or narrow the domain when a feature may be smaller than the current spacing.
- Change the visible window when finite values exist but the curve is clipped.
- Confirm consequential roots, extrema, and asymptotes with analytic work or a dedicated numerical method.
Worked Examples:
Three-point line check
For 2*x + 1 over −1 to 1 with three samples, the spacing is 1. The points are (−1, −1), (0, 1), and (1, 3), so the audit reports three finite points and no invalid values.
Polar half-circle
For radius 1 from 0 to pi with three samples, the angles are 0, π/2, and π radians. They convert approximately to (1, 0), (0, 1), and (−1, 0), tracing the upper half of a unit circle.
References:
- Math reference, MDN Web Docs, updated 10 July 2025.
- Number reference, MDN Web Docs.