# How do you find the integral of ((1+sinx)/cosx)dx?

Jun 6, 2018

$\ln | \tan x + \sec x | - \ln | \cos x | + C$

#### Explanation:

We can start by rewriting our integral as

$\int \left(\frac{1}{\cos} x\right) + \textcolor{b l u e}{\left(\sin \frac{x}{\cos} x\right)} \mathrm{dx}$

What I have in blue is equal to $\tan x$, so now we have the following integral:

$\int \left(\frac{1}{\cos} x + \tan x\right) \mathrm{dx}$

The integral of the sum is equal to the sum of the integrals, so we can rewrite the above expression as

$\textcolor{s p r \in g g r e e n}{\int \left(\frac{1}{\cos} x\right) \mathrm{dx}} + \textcolor{\mathmr{and} \chi d}{\int \left(\tan x\right) \mathrm{dx}}$

Integrating $\frac{1}{\cos} x$

$\frac{1}{\cos} x$ is equivalent to $\sec x$. Now, we have the integral

$\textcolor{s p r \in g g r e e n}{\int \left(\sec x\right) \mathrm{dx}}$, which evaluates to

$\textcolor{s p r \in g g r e e n}{\ln | \tan x + \sec x | + C}$

Remember, this is one part of our integral.

Integrating $\tan x$

We can rewrite $\tan x$ as $\sin \frac{x}{\cos} x$. Doing this, we get

$\textcolor{\mathmr{and} \chi d}{\int \left(\sin \frac{x}{\cos} x\right) \mathrm{dx}}$

Whenever we see a function and its derivative, it's a good idea to use u-substitution. Let's define

$\textcolor{\mathmr{and} \chi d}{u = \cos x}$

From this, we know that

$\textcolor{\mathmr{and} \chi d}{\mathrm{du} = - \sin x}$

Since we have $\sin x$, not $- \sin x$, we can put a negative in front of the integral. Plugging in, we get

$\textcolor{\mathmr{and} \chi d}{- \int \left(\frac{1}{u} \mathrm{du}\right)}$

which evaluates to

$\textcolor{\mathmr{and} \chi d}{- \ln | u |}$

Now, we need to back-substitute (plug $u$ back in). We get

$\textcolor{\mathmr{and} \chi d}{- \ln | \cos x | + C}$

Thus, the integral of $\left(\frac{1 + \sin x}{\cos} x\right) \mathrm{dx}$ is

bar (ul( |color(white)(2/2)(ln|tanx+secx|-ln|cosx|+C)color(white)(2/2) |

Hope this helps!