# Antiderivatives

## Antiderivative of tanx

The antiderivative of tanx is perhaps the most famous trig integral that everyone has trouble with. This is because it requires you to use u substitution.

## What is the antiderivative of tanx

Let us take a look at the function we want to integrate.

You may be asking yourself, how am I suppose to use u substitution? First, notice that tanx can be changed to sinx over cosx. In other words,

Now we are able to use u substitution.

Let u=cosx. Then we can say that du=-sinx. Note that multiplying both sides by a negative signgives -du=sinx. Thus, substituting will give us the following:

Now we can factor the negative sign out of the integral, which will give us:

Now this leads to the question, how do I take the antiderivative of 1/u? Well it is exact same thing as taking the antiderivative of 1/x. The integral of 1/x is just the natural log of |x|. In other words,

Always never forget to add the constant c because you are taking the antiderivative! Lastly, don’t forget that originally the integral was in terms of x. So we need to change our antiderivative in terms of x. Recall that u=cosx, so substituting back will give:

which is the integral of tanx.

Since we are on the topic of trig integrals, why don’t we take a look at the integrals of some trig functions? Since tanx is a combination of sinx and cosx, why don’t just find the antiderivative of them separately?Let us go ahead and find the antiderivative of sin and the antiderivative of cosx.

## What is the antiderivative of sin

A lot of people just memorize that the antiderivative of sinx is simply –cosx. But how exactly does one derive that? There are a couple ways to illustrate this, but I will show you 2 methods.

Method 1:Backtrack by using derivatives

Instead of finding the antiderivative explicitly, our goal would be to find a function whose derivative is sinx. If the function’s derivative is sinx, then it must be true that the antiderivative of sinx will give back that function. Okay, that sounds perfect. What function should we try? Let

Notice that the derivative of this would be:

See that we are really close, but instead of sinx we have –sinx. How can we get rid of the negative? How about taking the function that we have and add an extra negative sign? This might lead to having the derivative to have two negatives, and it will become a positive. If we do that then let

Now the derivative of this would be:

This is perfect! We have that the derivative is sinx, therefore our function is the antiderivative of sinx. Hence, the anti-derivative of sinx is

Again, don’t forget to add the constant c.

Now that is a great way to finding antiderivatives, but some integrals may require a lot of guessing. What is a better way to find the antiderivative of sin? This leads us to the next method:

Method 2: Use Moivre’s Theorem

This method can be pretty confusing if you do not know how to use complex numbers. So skip this method if you do not know Moivre’s Theorem. Notice that according to Moivre’s Theorem, we have that

Simplifying the right side leads to:

Thus dividing both sides by 2 will lead to:

We will use this later. Now, instead of adding both equations, let us subtract these two equations.

Subtracting these two equations will give us:

Simplifying the right side will give us:

Isolating sinx by dividing by 2i will lead us to have:

What are we going to with this? Well instead of taking the antiderivative of sin, we will take the antiderivative of what we see in the right hand side of the equation. This is because they are exactly equal. Therefore their antiderivatives should lead to the exact same answer. Hence, let’s evaluate

First, let us make this easier by factoring 1/2i out of the integral:

Now evaluating the integral will give us:

Simplifying gives:

Notice that factoring 1/i out of each term and multiplying it with 1/2i gives:

Since i^2=-1, then

Notice from our equation earlier that:

Hence substituting with this will lead us to have our final answer:

which is the antiderivative of sin. These are the two methods in finding the antiderivative of sin. Now let us move on to finding the antiderivative of cosx.

## What is the antiderivative of cosx

Again, people memorize that the antiderivative of cosx is sinx. However, let’s show that it is true by using the two methods we have mentioned earlier.

Method 1:Backtrack by using derivatives.

Let’s find a function whose derivative is cosx. Why don’t we say that:

This is a great suggestion since we know that the derivatives of sin and cos are related. Now taking the derivative of this will give me:

Notice that the derivative already gives cosx. This is great because we don’t need to make any adjustments to the function. Hence, we know that the antiderivative of cosx is:

Once again, do not forget to add the constant C.

Now if you do not want to guess and test, then we can use method 2.

Method 2: Use Moivre’s Theorem

From earlier we know that:

Again, instead of integrating cosx, we are instead going to find the antiderivative of the right hand side of the equation (since they are exactly equal). Thus, let us evaluate

Factoring 1/2 out of the integral will give us:

Distributing 1/2 to each term gives:

Now we can rewrite this equation to

Coincidentally, we knew from earlier that:

Hence substituting this will give us

which is the antiderivative of cosx. If you want to look at more antiderivatives of trig functions, then I suggest you look at the second section of this article “Antiderivative of trig functions”

Now if you’re wondering if it is possible to take the antiderivative of inverse trigonometric functions, then the answer is yes. Since we’ve found the antiderivative of tanx, sinx, and cosx, why don’t we find the antiderivative of their inverses? Let’s take a look at arctan.

### Antiderivatives

In this section, we will examine closely the difference between a derivative and an anti-derivative. Always remember that the anti-derivative has a constant of integration. Once we understand the concept of anti-derivatives, we will look at the anti-derivative of polynomials and anti-derivative of rational functions. We will then take a look at harder functions such as irrational functions and trigonometric functions. Once we have a general understanding of the concept, we will actually find the constant of integration using initial conditions. Lastly, we will apply anti-derivatives to real life applications such as position, velocity, and acceleration.