Antiderivatives, which are also referred to as indefinite integrals or primitive functions, is essentially the opposite of a derivative (hence the name). More formally, an antiderivative $F$ is a function whose derivative is equivalent to the original function $f$, or stated more concisely: $F^\prime(x) = f(x)$.

The Fundamental Theorem of Calculus defines the relationship between differential and integral calculus. We will see later that an antiderivative can be thought of as a restatement of an indefinite integral. Therefore, the discussion of antiderivatives provides a nice segue from the differential to integral calculus.

## Finding Antiderivatives¶

The process of finding an antiderivative of a function is known as antidifferentiation and is the reverse of differentiating a function.

For example, consider the function $f(x) = x^3$. The antiderivative of this function, $F(x)$, is $\frac{1}{4} x^4 + C$. As antidifferentiation is the reverse operation of differentiation, we solve for the antiderivative by finding the original function before the differentiation took place. A constant $C$, known as the constant of integration, is added to the antiderivative as the derivative of any constant is $0$. The addition of the constant does not affect the correspondence of the original antiderivative.

The general antiderivative of $f(x) = x^n$, valid when $n \geq 0$, is:

$$ F(x) = \frac{x^{n+1}}{n+1} + C $$```
from sympy import symbols, limit, diff, sin, cos, log, tan, sqrt, init_printing, plot, integrate
from mpmath import ln, e, pi
init_printing()
x = symbols('x')
y = symbols('y')
```

We can confirm the antiderivative of the function $f(x) = x^3$ is $\frac{1}{4}x^4 + C$ with SymPy using the `integrate()`

function.

```
integrate(x ** 3, x)
```

## Examples¶

### Example 1: Find the antiderivative of $f(x) = x - 3$¶

Using the general antiderivative form above:

$$ F(x) = \frac{1}{2} x^2 - 3x + C $$```
integrate(x - 3, x)
```

### Example 2: Determine the antiderivative of the function $f(x) = \frac{1}{2} + \frac{3}{4} x^2 - \frac{4}{5} x^3$¶

Going left to right and performing the reverse of the differentiation operation:

$$ F(x) = \frac{1}{2} x + \frac{1}{4} x^4 - \frac{1}{5} x^4 + C $$```
integrate(x / 2 + (3 / 4) * x ** 2 - (4 / 5) * x ** 3, x)
```

### Example 3: Find the antiderivative of the function $f(x) = (x + 1)(2x - 1)$¶

Expanding the function then performing antidifferentiation:

$$ f(x) = 2x^2 - x - 1 $$$$ F(x) = \frac{2}{3} x^3 + \frac{1}{2} x^2 - x + C $$```
integrate((x + 1) * (2 * x - 1), x)
```

### Example 4: Find the antiderivative of the function $f(x) = \frac{10}{x^9}$¶

Rewriting the function as $f(x) = \frac{10}{1} x^9$ and antidifferentiating:

$$ F(x) = -\frac{10}{8} x^{-8} = -\frac{5}{4} x^{-8} $$```
integrate(10 / x ** 9, x)
```

### Example 5: Find the antiderivative of $g(\theta) = \cos{\theta} - 5\sin{\theta}$¶

Antidifferentiate each piece of the function:

$$ G(\theta) = \sin{\theta} + 5\cos{\theta} $$```
integrate(cos(x) - 5 * sin(x))
```

## References¶

Antiderivative. (2017, December 29). In Wikipedia, The Free Encyclopedia. From https://en.wikipedia.org/w/index.php?title=Antiderivative&oldid=817529505

Weisstein, Eric W. "Constant of Integration." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/ConstantofIntegration.html

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