Online Integral & Antiderivative Calculator with Steps (Definite & Indefinite)

Enter any mathematical function to find its antiderivative. Whether you need a definite integral calculator to find the exact area under a curve, or an indefinite integral calculator for general solutions, our engine provides an instant, step-by-step breakdown of the entire integration process.

dx

Use ^ for power, sqrt() for √, implicit multiply: 2x

Your integral renders here as you type
Examples:

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

How to Use the Integral Calculator

Solving integrals is simple with our interactive mathematical engine. By using an online antiderivative calculator, you eliminate the guesswork from complex calculus homework:

  1. Enter your function: Use the extended math keyboard above or type your expression using standard mathematical notation (e.g., x^2 * sin(x)).
  2. Select the Type: Choose Indefinite Integral to find the general antiderivative, or toggle the settings to Definite Integral to explicitly define your upper and lower bounds.
  3. Calculate: Click "Solve." The calculator will output the exact symbolic result and provide a detailed calculation results drop-down showing the precise integration rules applied at each step.

Types of Integrals Supported

Definite Integrals

A definite integral calculates the exact numerical signed area under a curve between two specific points on the xx-axis over a given interval. Originating from the concept of a Riemann Sum, it is represented as: abf(x)dx \int_{a}^{b} f(x) \, dx You can solve a definite integral online easily. Our calculator solves this by first finding the antiderivative and then applying the Fundamental Theorem of Calculus to compute the numerical value F(b)F(a)F(b) - F(a), where aa is the lower bound and bb is the upper bound.

Indefinite Integrals (Antiderivatives)

An indefinite integral represents an entire family of curves whose derivative is the original mathematical function. Because the derivative of a constant is zero, finding the indefinite integral always results in a general solution that includes an arbitrary constant of integration, +C+ C: f(x)dx=F(x)+C \int f(x) \, dx = F(x) + C

Pro Tip: You can always verify your indefinite integral by differentiating the result using our Derivative Calculator.

Improper Integrals

Improper integrals involve calculating the area over an unbounded interval (where one or both limits of integration approach \infty or -\infty), or integrating functions across a mathematical singularity or vertical asymptote. The engine automatically handles these limits to determine if the integral converges to a finite value or diverges to infinity.

Common Integration Methods

Our engine doesn't just give you the final answer; it shows you exactly how to solve integrals using standard analytical methods and techniques.

Integration by Parts

Derived from the product rule of differentiation, integration by parts transforms the integral of a product of functions into a simpler integral. It follows the formula: udv=uvvdu \int u \, dv = uv - \int v \, du The calculator explicitly shows the pedagogical process: how to choose uu and dvdv (often applying the LIATE rule), compute the differential dudu, and integrate to find vv.

U-Substitution

Integration by substitution (or uu-substitution) is the inverse of the chain rule. It simplifies integrals by performing a change of variables to a new variable, uu, where dudu represents the derivative of the inner function.

Partial Fractions

When integrating complex rational functions (a polynomial divided by a polynomial), the calculator performs a partial fraction decomposition. It breaks the denominator into roots, linear factors, and irreducible quadratic factors, based on the polynomial degree, creating simpler fractions that are easy to integrate.

Real-World Applications of Integrals

Calculus is not just an abstract mathematical concept; integrals have major applications in the physical world. Understanding these applications is important for students of physics, engineering, and economics.

  • Kinematics: If you are given a function representing the velocity of an object over time, taking the definite integral of that function will yield the total displacement (distance traveled) of the object.
  • Physics (Work and Force): In mechanics, if a variable force is applied to an object over a certain distance, the total work done is calculated by taking the integral of the force function with respect to distance (W=F(x)dxW = \int F(x) dx).
  • Economics: Integrals are frequently used in economics to calculate Consumer Surplus and Producer Surplus, by determining the area between the supply/demand curves and the equilibrium price.

Step-by-Step Worked Examples

Practicing with worked examples is the best way to learn mathematical proofs and calculus techniques. Here are detailed breakdowns of common problems:

Example 1: Indefinite Integral Using Integration by Parts
Solve xcos(x)dx\int x \cos(x) \, dx

  1. Identify the method: Since this is a product of an algebraic function (xx) and a trigonometric function (cos(x)\cos(x)), we use integration by parts.
  2. Apply LIATE rule: Let u=xu = x (Algebraic) and dv=cos(x)dxdv = \cos(x) \, dx (Trig).
  3. Differentiate and Integrate: Then du=1dxdu = 1 \, dx and v=sin(x)v = \sin(x).
  4. Substitute into formula: Using udv=uvvdu\int u \, dv = uv - \int v \, du, we get xsin(x)sin(x)dxx \sin(x) - \int \sin(x) \, dx.
  5. Final Answer: xsin(x)+cos(x)+Cx \sin(x) + \cos(x) + C.

Example 2: U-Substitution
Solve 2xex2dx\int 2x e^{x^2} \, dx

  1. Identify the inner function: Let u=x2u = x^2.
  2. Find the derivative: Then du=2xdxdu = 2x \, dx. Notice that 2xdx2x \, dx perfectly matches the rest of our integral.
  3. Substitute: The integral simplifies entirely to eudu\int e^u \, du.
  4. Integrate: The integral of eue^u is simply eue^u.
  5. Final Answer: Substitute x2x^2 back in to get ex2+Ce^{x^2} + C.

Example 3: Evaluating a Definite Integral
Solve 023x2dx\int_{0}^{2} 3x^2 \, dx

  1. Find the Antiderivative: Applying the power rule of integration, the antiderivative of 3x23x^2 is x3x^3.
  2. Apply the Bounds: We evaluate x3x^3 from the lower bound 00 to the upper bound 22.
  3. Calculate: (2)3(0)3=80=8(2)^3 - (0)^3 = 8 - 0 = 8.

Supported Functions and Constants (Syntax Guide)

Our calculator's parser supports all standard mathematical notation. You can use the clickable UI keyboard or type these directly:

  • Trigonometric: sin(x), cos(x), tan(x), sec(x), csc(x), cot(x)
  • Inverse Trig: arcsin(x), arccos(x), arctan(x)
  • Hyperbolic: sinh(x), cosh(x), tanh(x)
  • Logarithmic & Exponential: ln(x) (natural log), log(x) (base 10), log2(x), exp(x) or e^x
  • Constants & Symbols: pi (π\pi), e, abs(x) (absolute value), sqrt(x) (square root)
What is the difference between definite and indefinite integrals?

While both involve integration, they serve completely different mathematical purposes:

  • Indefinite Integrals: Result in a general mathematical formula (the antiderivative). They represent an infinite family of curves, which is why they always require an arbitrary constant of integration (+C+ C).
    • Example: 2xdx=x2+C\int 2x \, dx = x^2 + C.
  • Definite Integrals: Result in a single numerical value. They are evaluated over a specific interval using upper and lower bounds to find the exact area under the curve.
    • Example: 022xdx=4\int_{0}^{2} 2x \, dx = 4.

(Toggle between "Definite" and "Indefinite" in our calculator above to see the difference in output!)

Does the calculator show step-by-step working?

Yes, our engine is designed for pedagogical learning. It doesn't just output the final answer; it provides a complete breakdown of the entire process:

  • Method Detection: It explicitly states which analytical technique it chose to use.
  • Rule Application: It outlines exactly when it uses uu-substitution, integration by parts, trigonometric substitutions, or partial fraction decomposition.
  • Simplification: It shows the algebraic steps taken to reach the exact symbolic answer.
Can the calculator solve improper and multiple integrals?

Yes, our solver is highly advanced and can handle standard improper integrals.

  • Infinite Bounds: It successfully computes integrals where limits approach \infty or -\infty.
  • Singularities: It evaluates integrals across vertical asymptotes or discontinuities to determine if the area converges to a finite value or diverges.

(Note: Support for evaluating double and triple multiple integrals is currently in development for a future update).

How do I enter a complex expression or function?

You have two options for entering complex functions into the mathematical engine:

  • Clickable UI: Use the interactive syntax buttons directly below the input field to quickly insert standard notation.
  • Manual Typing: Type naturally using your keyboard. Use ^ for exponents (e.g., x^3), sqrt(x) for square roots, and parentheses () to properly group terms and ensure the mathematical order of operations is strictly respected.
Why can a definite integral be negative?

Because a definite integral mathematically measures "signed area," its value is directly tied to the function's position relative to the xx-axis:

  • Positive Result: The geometric area between the curve and the xx-axis falls entirely above the xx-axis.
  • Negative Result: The geometric area falls entirely below the xx-axis.
  • Zero or Net Result: If the curve crosses the xx-axis, the integral computes the net difference between the positive regions and the negative regions.
What is the geometric meaning of an integral?

Geometrically, taking the integral of a function calculates the total accumulated area under a 2-dimensional graph. Beyond geometry, it has massive real-world implications:

  • Physics: Used to calculate total displacement from a velocity function.
  • Engineering: Used to compute total work done by a variable force, center of mass, and fluid pressure.
  • Economics: Used to determine total Consumer and Producer surplus based on supply and demand curves.
How does the calculator handle constants of integration?

Because the derivative of any constant number is zero, finding the indefinite integral of a function always results in a general solution that includes an unknown constant. The calculator automatically appends +C+ C to the end of all indefinite integral results to correctly mathematically represent this infinite family of antiderivatives.

Why does my textbook give a different answer than the calculator?

Antiderivatives can often be expressed in completely different, yet mathematically equivalent forms. This is especially true when integrating trigonometric functions (due to the vast number of trigonometric identities) or logarithmic functions. Even if the calculator's result looks algebraically different from your textbook's answer, they are likely equivalent up to a constant.

Can I compute areas between two curves?

Yes! To find the exact geometric area trapped between an upper curve f(x)f(x) and a lower curve g(x)g(x), you simply subtract the functions and integrate the new resulting expression: ab(f(x)g(x))dx\int_{a}^{b} (f(x) - g(x)) \, dx. Just input the combined expression f(x)g(x)f(x) - g(x) into the calculator along with your interval bounds.

What does it mean if an improper integral does not converge?

When calculating an improper integral (such as integrating to infinity, or integrating across a vertical asymptote), the calculator determines the limit of the area. If the calculated area approaches infinity rather than settling on a finite number, the integral is said to diverge. The calculator will clearly indicate if the integral evaluates to \infty or -\infty.