acalculator

How do you solve a calculus problem?

Type a function and choose what to find: its derivative, an antiderivative, or a definite integral between two limits. Every answer is checked with numbers first.

Your numbers

Use + - * / ^, sqrt, ln, sin, pi, e and one letter.
Find
Antiderivative
4 atan(x) + C

An antiderivative of 4/(1 + x^2) is 4 atan(x) + C.

Antiderivative: 4 atan(x) + C. An antiderivative of 4/(1 + x^2) is 4 atan(x) + C.

How to calculate

Derivatives, integrals and definite integrals of a function, each checked numerically.

Example with the default inputs (Function f(x) 4/(1 + x^2), Find Integral): An antiderivative of 4/(1 + x^2) is 4 atan(x) + C.

Method: A computer algebra system finds each answer; it shows only after a numeric check.

  • One variable letter (x if none); radians; ln is the natural logarithm.
  • An answer that fails its check is not shown.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Function f(x) 4/(1 + x^2), Find Integral gives Antiderivative 4 atan(x) + C.Source: OpenStax Calculus Vol. 1, 4.10, Ex. 4.52(c). https://openstax.org/books/calculus-volume-1/pages/4-10-antiderivatives
  2. Function f(x) t^2 - 4, Find Definite integral, Lower limit a -2, Upper limit b 2 gives Definite integral -10.666667, Exact value -32/3.
  3. Function f(x) 5x^2/(4x + 3), Find Derivative gives Derivative 10x (2x + 3)/(4x + 3)^2.

How it works

A computer algebra system (nerdamer, open source) does the algebra after you start typing, in the background. Each result is shown only after its numeric check; one that fails shows "No verified answer" instead.

  • Derivative. f′ must match a five-point central difference of f (step 0.0001 × max(1, |x|)) at 20 points, to 1 part in a million. A polynomial derivative is then expanded, and a rational one written as one simplified fraction when the algebra finds one; each rewrite must equal the first form at 20 points, or the first form stays.
  • Integral. An antiderivative F, shown with + C: F′, measured the same numeric way, must equal f at 20 points. Where the algebra gives ln(u), the page shows ln|u| when that also passes, because it has the same derivative and is defined on both sides of u = 0. When the algebra finds nothing, standard methods are tried: trigonometric identities, partial fractions, substitutions (u = eˣ, √x, ln x, sin x, cos x, tan(x/2)), integration by parts, and a table of standard forms.
  • Definite integral. F(b) − F(a) by the fundamental theorem of calculus, exactly and as a decimal to 10 significant figures. The value must agree with adaptive Gauss-Kronrod numeric integration of f to 1 part in 10 million of the integral of |f|. f may be infinite at a or b (the limit of F there is used, or the page says the integral diverges) and may have a removable gap inside (such as sin(x)/x at 0). A point inside [a, b] where f is infinite but the integral converges (ln|x| at 0: the integral of ln|x| from −1 to 1 is −2) gives its value; a pole where the integral diverges (1/x² on [−1, 1]) or a part where f is not real gives a message and no value. When F has a jump inside [a, b] although f has none, the jump is taken out and the value is shown with no exact form.

For limits, use the limit calculator; for Taylor polynomials, the Taylor series calculator.

What you can type

  • One variable. Use one lowercase letter: x, t, y, and so on. Two different letters give no answer. The letter e is Euler’s number, and pi (or π) is π.
  • 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).
  • 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 means sin(x); sin x^2 means sin(x²).
  • Limits of integration a and b: numbers or constants such as 0, −1, pi/2, e.

How answers are written

  • Answers use the syntax you type: ^ for powers, sqrt(u), |u| for absolute value, π for pi, ln for the natural logarithm, a/b for a fraction. Terms go by power of the variable, highest first; factors lowest degree first.
  • Special functions may appear in an antiderivative: erf, Si, Ci, Ei, Shi and Chi (the error function and the sine, cosine, exponential, hyperbolic sine and hyperbolic cosine integrals); Ci and Chi are written with |x|.
  • A definite integral’s Exact value is F(b) − F(a) as the algebra writes it, which may be left unsimplified (2 9^(3/2)/3 − 14/3 is 40/3); the Definite integral is the decimal to 10 significant figures.
  • An answer holding a number the algebra rounded (a fraction whose denominator, after removing factors 2 and 5, is over 1,000,000, or whose numerator times that denominator is over 10¹², or a decimal with more than 12 significant digits) is not shown; for a definite integral the decimal value is then shown without an exact form.

Assumptions

  • Angles are in radians; ln and log are the natural logarithm; only real values count.
  • C is any real constant.
  • An answer that fails its check, finds no formula, or takes over 3 seconds is not shown ("No verified answer").

Worked examples by hand

∫ 4/(1 + x²) dx (OpenStax Calculus Volume 1, section 4.10, Example 4.52c). The derivative of tan⁻¹(x) is 1/(1 + x²), so the answer is 4 atan(x) + C.

∫ from −2 to 2 of (t² − 4) dt (OpenStax Calculus Volume 1, section 5.3, Example 5.20). An antiderivative is t³/3 − 4t. So the integral is (8/3 − 8) − (−8/3 + 8) = 16/3 − 16 = −32/3 ≈ −10.66666667. It is negative because t² − 4 is below the axis on (−2, 2).

d/dx of 5x²/(4x + 3) (OpenStax Calculus Volume 1, section 3.3, Example 3.25). By the quotient rule, (10x(4x + 3) − 5x² × 4)/(4x + 3)² = (20x² + 30x)/(4x + 3)² = 10x(2x + 3)/(4x + 3)².

Other questions people ask

What can this calculus calculator do?

Three things for a function of one variable: the derivative (the rate of change), an antiderivative (the indefinite integral, + C), and a definite integral from a to b (a signed area, exactly and as a decimal). For limits use the limit calculator, and for a Taylor polynomial the Taylor series calculator.

How are derivatives and integrals related?

They undo each other. By the fundamental theorem of calculus, if F′ = f then the definite integral of f from a to b is F(b) − F(a). That is also how the page checks an antiderivative: it differentiates it back numerically and compares with f.

Why is there a + C?

The derivative of a constant is 0, so if F is an antiderivative of f, so is F + C for every constant C. 4 atan(x) + C covers every antiderivative of 4/(1 + x²). A definite integral is one number, because C cancels in F(b) − F(a).

How is each answer checked?

A derivative is compared with a numeric difference quotient of f at 20 points; an antiderivative is differentiated numerically at 20 points and compared with f; and a definite integral is compared with numeric integration of f. An answer that fails is never shown.

Can I use t instead of x?

Yes. Use any one lowercase letter as the variable, such as t² − 4, and the derivative or integral is taken with respect to it. Two different letters give no answer. The letter e is Euler’s number.

What does "No verified answer" mean?

The algebra found no formula, its answer failed the numeric check, or the work took over 3 seconds. Some functions, such as eˣ/x, have no antiderivative in elementary functions; the page may then give one with a special function such as Ei(x), or no answer.