Integral of $$$\frac{1}{\cos{\left(3 x \right)} + 1}$$$

The calculator will find the integral/antiderivative of $$$\frac{1}{\cos{\left(3 x \right)} + 1}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \frac{1}{\cos{\left(3 x \right)} + 1}\, dx$$$.

Solution

Let $$$u=3 x$$$.

Then $$$du=\left(3 x\right)^{\prime }dx = 3 dx$$$ (steps can be seen »), and we have that $$$dx = \frac{du}{3}$$$.

Thus,

$${\color{red}{\int{\frac{1}{\cos{\left(3 x \right)} + 1} d x}}} = {\color{red}{\int{\frac{1}{3 \left(\cos{\left(u \right)} + 1\right)} d u}}}$$

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=\frac{1}{3}$$$ and $$$f{\left(u \right)} = \frac{1}{\cos{\left(u \right)} + 1}$$$:

$${\color{red}{\int{\frac{1}{3 \left(\cos{\left(u \right)} + 1\right)} d u}}} = {\color{red}{\left(\frac{\int{\frac{1}{\cos{\left(u \right)} + 1} d u}}{3}\right)}}$$

Rewrite the cosine using the double angle formula $$$\cos\left( u \right)=2\cos^2\left(\frac{ u }{2}\right)-1$$$ and simplify:

$$\frac{{\color{red}{\int{\frac{1}{\cos{\left(u \right)} + 1} d u}}}}{3} = \frac{{\color{red}{\int{\frac{1}{2 \cos^{2}{\left(\frac{u}{2} \right)}} d u}}}}{3}$$

Let $$$v=\frac{u}{2}$$$.

Then $$$dv=\left(\frac{u}{2}\right)^{\prime }du = \frac{du}{2}$$$ (steps can be seen »), and we have that $$$du = 2 dv$$$.

So,

$$\frac{{\color{red}{\int{\frac{1}{2 \cos^{2}{\left(\frac{u}{2} \right)}} d u}}}}{3} = \frac{{\color{red}{\int{\frac{1}{\cos^{2}{\left(v \right)}} d v}}}}{3}$$

Rewrite the integrand in terms of the secant:

$$\frac{{\color{red}{\int{\frac{1}{\cos^{2}{\left(v \right)}} d v}}}}{3} = \frac{{\color{red}{\int{\sec^{2}{\left(v \right)} d v}}}}{3}$$

The integral of $$$\sec^{2}{\left(v \right)}$$$ is $$$\int{\sec^{2}{\left(v \right)} d v} = \tan{\left(v \right)}$$$:

$$\frac{{\color{red}{\int{\sec^{2}{\left(v \right)} d v}}}}{3} = \frac{{\color{red}{\tan{\left(v \right)}}}}{3}$$

Recall that $$$v=\frac{u}{2}$$$:

$$\frac{\tan{\left({\color{red}{v}} \right)}}{3} = \frac{\tan{\left({\color{red}{\left(\frac{u}{2}\right)}} \right)}}{3}$$

Recall that $$$u=3 x$$$:

$$\frac{\tan{\left(\frac{{\color{red}{u}}}{2} \right)}}{3} = \frac{\tan{\left(\frac{{\color{red}{\left(3 x\right)}}}{2} \right)}}{3}$$

Therefore,

$$\int{\frac{1}{\cos{\left(3 x \right)} + 1} d x} = \frac{\tan{\left(\frac{3 x}{2} \right)}}{3}$$

Add the constant of integration:

$$\int{\frac{1}{\cos{\left(3 x \right)} + 1} d x} = \frac{\tan{\left(\frac{3 x}{2} \right)}}{3}+C$$

Answer

$$$\int \frac{1}{\cos{\left(3 x \right)} + 1}\, dx = \frac{\tan{\left(\frac{3 x}{2} \right)}}{3} + C$$$A