Indefinite Integrals

As we noted in the previous sections on the Fundamental Theorem of Calculus and Antiderivatives, indefinite integrals are also called antiderivatives and are the same process. Indefinite integrals are expressed without upper and lower limits on the integrand, the notation $\int f(x)$ is used to denote the function as an antiderivative of $F$. Therefore, $\int f(x) \space dx = F^\prime(x)$.

For example, the integral $\int x^3 \space dx = \frac{1}{4}x^4 + C$, just as we saw in the same example in the context of antiderivatives. The constant of integration is added to the result as before.

Below is a table of some of the more frequently occurring indefinite integrals.

$$ \int cf(x) \space dx = c\int f(x) \space dx $$

$$ \int \bigg[f(x) + g(x)\bigg] dx = \int f(x) dx + \int g(x) dx $$

$$ \int k \space dx = kx + C $$

$$ \int x^n \space dx = \frac{x^{n+1}}{n+1} + C \qquad (n \neq -1) $$

$$ \int \frac{1}{x} \space dx = \ln{|x|} + C $$

$$ \int e^x \space dx = e^x + C \qquad \int a^x \space dx = \frac{a^x}{\ln{a}} + C $$

$$ \int \sin{x} \space dx = -\cos{x} + C \qquad \int \cos{x} \space dx = \sin{x} + C $$

$$ \int \sec^2{x} \space dx = \tan{x} + C \qquad \int \csc^2{x} \space dx = -\cot{x} + C $$

$$ \int \frac{1}{x^2 + 1} \space dx = \tan^{-1}{x} + C \qquad \int \frac{1}{\sqrt{1-x^2}} \space dx = \sin^{-1}{x} + C $$

$$ \int \sinh{x} \space dx = \cosh{x} + C \qquad \int \cosh{x} \space dx = \sinh{x} + C $$

Examples

In [9]:
from sympy import symbols, limit, diff, sin, cos, log, tan, sqrt, init_printing, plot, integrate, sinh
from mpmath import ln, e, pi

init_printing()
x = symbols('x')
y = symbols('y')

Example 1: Determine the general integral $\int x^2 + x^{-2} \space dx$

We perform antidifferentiation of each term in the integral to compute the result:

$$ \int x^2 + x^{-2} \space dx = \frac{1}{3} x^3 - \frac{1}{x} + C $$

Confirm our result using SymPy's integrate() function.

In [2]:
integrate(x ** 2 + x ** -2, x)
Out[2]:
$$\frac{x^{3}}{3} - \frac{1}{x}$$

Example 2: Find the general integral $\int x^4 - \frac{1}{2} x^3 + \frac{1}{4} x - 2 \space dx$

As in the previous example, we use antidifferentiation on each term:

$$ \int x^4 - \frac{1}{2} x^3 + \frac{1}{4} x - 2 \space dx = \frac{1}{5}x^5 - \frac{1}{8}x^4 + \frac{1}{8}x^2 - 2x $$

In [3]:
integrate(x ** 4 - (1/2) * x ** 3 + (1/4) * x - 2, x)
Out[3]:
$$0.2 x^{5} - 0.125 x^{4} + 0.125 x^{2} - 2.0 x$$

Example 3: Find the general integral $\int (1-x)(2+x^2) \space dx$

Start by expanding the terms, then find the antiderivative of each term:

$$ \int 2 + x^2 - 2x - x^3 \space dx = 2x + \frac{1}{3}x^3 - x^2 - \frac{1}{4}x^4 $$

In [5]:
integrate((1 - x) * (2 + x ** 2), x)
Out[5]:
$$- \frac{x^{4}}{4} + \frac{x^{3}}{3} - x^{2} + 2 x$$

Example 4: Determine the general integral $\int \sin{x} + \sinh{x} \space dx$

Take the antiderivative of each term:

$$ \int \sin{x} + \sinh{x} \space dx = -\cos{x} + \cosh{x} $$

In [10]:
integrate(sin(x) + sinh(x), x)
Out[10]:
$$- \cos{\left (x \right )} + \cosh{\left (x \right )}$$

Example 5: Find the general integral $\int_{-1}^0 2x - e^x \space dx$

The last example involves a definite integral, which we previously encountered in the Fundamental Theorem of Calculus section. Find the antiderivative of each term:

$$ \int_{-1}^0 2x - e^x \space dx = x^2 - e^x \Bigg\rvert_{-1}^0 $$

$$ (0)^2 - e^{(0)} - (-1)^2 - e^{(-1)} = -1 - 1 - e^{-1} = -2 + e^{-1} $$

Calculate $-2 - e^{-1}$ and verify the result with SymPy.

In [23]:
-2 + e ** -1
Out[23]:
mpf('-1.6321205588285577')
In [13]:
integrate(2 * x - e ** x, (x, -1, 0))
Out[13]:
$$-1.63212055882856$$

References

Stewart, J. (2007). Essential calculus: Early transcendentals. Belmont, CA: Thomson Higher Education.

Weisstein, Eric W. "Indefinite Integral." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IndefiniteIntegral.html