How the Solver Works
A transparent description of the methods behind every answer, and of what they cannot do.
Last updated:
1. Reading your input
Your text is split into numbers, names and symbols, then parsed into an expression tree using the usual order of operations. Powers come first and associate to the right, then multiplication and division from left to right, then addition and subtraction. Implicit multiplication (2x, x sin x) has the same precedence as an explicit *.
Function names are recognised inside runs of letters, so sinx becomes sin(x) and xe becomes x·e. Errors are reported with the likely cause, such as a missing bracket, two operators in a row or an unknown function. The “Reads as” preview shows the tree typeset, so you can spot a misreading before solving.
2. Exact arithmetic and simplification
Numbers are stored as exact fractions, so 0.1 + 0.2 is exactly 3/10. The simplifier flattens sums and products, combines like terms and like powers, and evaluates exact values such as
Where both a factored and an expanded form are available, the shorter one is shown.
3. Derivatives
The differentiator walks the expression tree from the outside in and applies one rule per node: sum, constant multiple, product, quotient, power, exponential, chain rule, or a table derivative for each function. Each application is recorded as a step together with its intermediate result. When both base and exponent vary, it uses logarithmic differentiation:
Check: the result is compared with a central finite-difference estimate of the previous derivative at several sample points.
4. Integrals
Indefinite integrals are attempted with these strategies, in this order:
- constant, sum and constant-multiple rules;
- a table of standard forms, including linear inner functions such as e^(3x+1) and sin(2x − 5);
- rewriting: expanding products and splitting fractions over a monomial;
- rational functions: polynomial long division, partial fractions for distinct or repeated linear factors, and completing the square for irreducible quadratics;
- u-substitution, trying each plausible inner function;
- integration by parts, choosing u by the LIATE ordering.
If every rule fails, the problem is passed to Algebrite, an open-source computer algebra system bundled with the site that runs in your browser. Its answers are labelled and come without detailed steps. Integrands known to have no elementary antiderivative, such as e^(x²) and sin(x)/x, are reported as such.
Check: every antiderivative, whatever its source, is differentiated and compared numerically with the integrand at up to 18 sample points. Any disagreement means the answer is discarded.
5. Definite and improper integrals
With an antiderivative F, the solver applies the Fundamental Theorem of Calculus. At an infinite bound, or where F is undefined at an endpoint, it uses the corresponding limit instead. Before that, it scans the interval for points where the integrand blows up. If it finds one, the theorem cannot be applied directly, and the integral is treated as improper.
Independently, the integral is computed with tanh-sinh (double exponential) quadrature (Takahasi and Mori, 1974). This method handles endpoint singularities such as 1/√x well, and maps infinite intervals onto finite ones. The exact and numerical values must agree. When there is no antiderivative, the numerical value is reported, marked ≈.
6. Limits
The function is first evaluated numerically at points approaching the target from the requested side or sides, to detect convergence, divergence to ±∞, or disagreement between left and right. Then the exact methods are tried: direct substitution (checked for continuity), cancelling a common polynomial factor found by a polynomial GCD, L'Hôpital's rule for 0/0 and ∞/∞ forms (repeated up to six times), degree comparison at infinity, rewriting 0·∞ as a quotient, and rewriting 1^∞-type forms through logarithms.
Check: an exact answer is shown only if it agrees with the numerical behaviour. Otherwise the numerical estimate is shown and labelled. Matches to simple constants such as π/2 are offered as suggestions, not proofs.
7. Taylor polynomials
Derivatives are computed symbolically and evaluated at the center by exact substitution. If any of them is undefined there, the solver says that no Taylor polynomial exists at that center.
8. Critical points
f′ is split into a numerator and a denominator. Polynomial factors are solved exactly (rational root theorem, then the quadratic formula). Zeros of the denominator are kept if f is defined there. A dense numerical scan of your search interval, refined by bisection, finds any remaining roots. Points are classified with the second derivative test, or, when f″ is zero or undefined, with the first derivative test.
Accuracy and limitations
- Exact answers are exact. Numerical values are typically accurate to about 10 significant digits.
- Computer algebra can produce answers that are equivalent to, but look different from, a textbook's.
- The solver does not support differential equations, multivariable calculus, implicit differentiation, piecewise functions or complex numbers.
- Problems that take more than about 12 seconds are stopped, so the page stays responsive.
More than a hundred automated tests, run before each release, check the solver against problems with known answers, including every worked example on this site.
References
- J. Stewart, Calculus: Early Transcendentals, Cengage. Standard reference for the rules and techniques used.
- G. Strang and E. Herman, Calculus, Volumes 1–2, OpenStax (free and openly licensed), openstax.org.
- H. Takahasi and M. Mori, “Double exponential formulas for numerical integration,” Publications of the RIMS, Kyoto University 9 (1974), 721–741.
- KaTeX, used to typeset math: katex.org.
Have a question about a specific result? See the FAQ or contact us.