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¶
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.
integrate(x ** 2 + x ** -2, 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 $$integrate(x ** 4 - (1/2) * x ** 3 + (1/4) * x - 2, 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 $$integrate((1 - x) * (2 + x ** 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} $$integrate(sin(x) + sinh(x), x)
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.
-2 + e ** -1
integrate(2 * x - e ** x, (x, -1, 0))
References¶
Weisstein, Eric W. "Indefinite Integral." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/IndefiniteIntegral.html