Integral Calculator

Logo

Calculate integrals online
— with steps and graphing!

Also check the Derivative Calculator

Logo

!
Calculadora de Integrales en español
Integralrechner auf Deutsch
Калькулятор Интегралов на Русском

The Integral Calculator lets you calculate integrals and antiderivatives of functions online — for free!

Our calculator allows you to check your solutions to calculus exercises. It helps you practice by showing you the full working (step by step integration). All common integration techniques and even special functions are supported.

The Integral Calculator supports definite and indefinite integrals (antiderivatives) as well as integrating functions with many variables. You can also check your answers! Interactive graphs/plots help visualize and better understand the functions.

For more about how to use the Integral Calculator, go to "Help". Also see "Examples".

And now: Happy integrating!

Enter the function you want to integrate into the Integral Calculator. Skip the f(x)= part and the differential dx ! The Integral Calculator will show you a graphical version of your input while you type. Make sure that it shows exactly what you want. Use parentheses, if necessary, e.g. a/(b+c) . Write decimal fractions with a period instead of a comma, e.g. 3.141 .

In "Examples" you will find some of the functions that are most frequently entered into the Integral Calculator.

When you're done entering your function, click "Go!", and the Integral Calculator will show the result below.

In "Options", you can set the variable of integration and the integration bounds. If you don't specify the bounds, only the antiderivative will be computed.

Click an example to enter it into the Integral Calculator (the current input will be deleted).

Configure the Integral Calculator:

Variable of integration:
Upper bound (to): + ∞ + π
Lower bound (from): –∞ –π
Integrate numerically only?
Simplify expressions?
Simplify all roots?
(√ x² becomes x, not |x|)
Use complex domain ℂ?
Keep decimals?

The practice problem generator allows you to generate as many random exercises as you want.

You find some configuration options and a proposed problem below. You can accept it (then it's input into the calculator) or generate a new one.

Definite integrals Integration by parts
Substitution Completing the square
Polynomials and powers Exponential functions
Trigon./hyperb. functions Rational functions
Inv. trigon./hyperb. functions Logarithms
Special functions Tricky integrals

Calculate the Integral of … Enter your own Answer:

This will be calculated:

Loading … please wait!
This will take a few seconds.

Use parentheses, if necessary. Also see "Examples". Change integration variable and order in "Options".

Support

David Scherfgen

Donate

Please support me if you like this page.

Result

Above, enter the function to integrate. Variable of integration, integration bounds and more can be changed in "Options". Click "Go!" to start the integral/antiderivative calculation. The result will be shown further below.

How the Integral Calculator Works

For those with a technical background, the following section explains how the Integral Calculator works.

First, a parser analyzes the mathematical function. It transforms it into a form that is better understandable by a computer, namely a tree (see figure below). In doing this, the Integral Calculator has to respect the order of operations. A specialty in mathematical expressions is that the multiplication sign can be left out sometimes, for example we write 5x instead of 5*x . The Integral Calculator has to detect these cases and insert the multiplication sign.

The parser is implemented in JavaScript, based on the Shunting-yard algorithm, and can run directly in the browser. This allows for quick feedback while typing by transforming the tree into LaTeX code. MathJax takes care of displaying it in the browser.

When the "Go!" button is clicked, the Integral Calculator sends the mathematical function and the settings (variable of integration and integration bounds) to the server, where it is analyzed again. This time, the function gets transformed into a form that can be understood by the computer algebra system Maxima.

How the Integral Calculator works

Maxima takes care of actually computing the integral of the mathematical function. Maxima's output is transformed to LaTeX again and is then presented to the user. In many cases, the antiderivative is computed using the Risch algorithm, which is hard to understand for humans. That's why showing the steps of calculation is very challenging for integrals.

In order to show the steps, the calculator applies the same integration techniques that a human would apply. The program that does this has been developed over several years and is written in Maxima's own programming language. It consists of more than 17 000 lines of code. When the integrand matches a known form, it applies fixed rules to solve the integral (e.g. partial fraction decomposition for rational functions, trigonometric substitution for integrands involving the square roots of a quadratic polynomial or integration by parts for products of certain functions). Otherwise, it tries different substitutions and transformations until either the integral is solved, time runs out or there is nothing left to try. The calculator lacks the mathematical intuition that is very useful for finding an antiderivative, but on the other hand it can try a large number of possibilities within a short amount of time. The step by step antiderivatives are often much shorter and more elegant than those found by Maxima.

The "Check answer" feature has to solve the difficult task of determining whether two mathematical expressions are equivalent. Their difference is computed and simplified as far as possible using Maxima. For example, this involves writing trigonometric/hyperbolic functions in their exponential forms. If it can be shown that the difference simplifies to zero, the task is solved. Otherwise, a probabilistic algorithm is applied that evaluates and compares both functions at randomly chosen places. In the case of antiderivatives, the entire procedure is repeated with each function's derivative, since antiderivatives are allowed to differ by a constant.

The interactive function graphs are computed in the browser and displayed within a canvas element (HTML5). For each function to be graphed, the calculator creates a JavaScript function, which is then evaluated in small steps in order to draw the graph. While graphing, singularities (e.g. poles) are detected and treated specially. The gesture control is implemented using Hammer.js.

If you have any questions or ideas for improvements to the Integral Calculator, don't hesitate to write me an e-mail.

© David Scherfgen 2024 — all rights reserved.