# Integral of $\int \frac{\cos x+\sin 2x}{\sin x}$

I am trying to find the integral of $$\int \frac{\cos x+\sin 2x}{\sin x}$$

$$\int \frac{\cos x}{\sin x} + \int \frac{\sin 2x}{\sin x}$$

$$\int \tan x + \int \frac{\sin 2x}{\sin x}$$

I think I am suppose to have the integral of tanx memorized so I will put that to the side for now.

$$\int \frac{\sin 2x}{\sin x}$$

I do not know what to do with this since I can't make a u subsitution or anything else so I will just randomly use the double angle identity I have memorized.

$$\int \frac{2\sin x\cos x}{\sin x}$$

$$\int 2\cos x$$

$$2 \int \cos x$$

$$2\sin x + \int \tan x$$

$$2\sin x + \ln|\sec x| + c$$

This is of course wrong.

-
$\cos x\over \sin x$ is $\cot x$, not $\tan x$. – David Mitra Jun 3 '12 at 17:04
I think you are missing a few $dx$'s – user50229 Jan 3 '13 at 3:36

Remember that $$\dfrac{\cos(x)}{\sin(x)} = \cot(x)$$ and not $\tan(x)$. An easier way to do $\int \dfrac{\cos(x)}{\sin(x)} dx$ is to do as follows. Hence, $$I = \int \dfrac{\cos(x)}{\sin(x)} dx.$$ Set $\sin(x) = t$, then we get $\cos(x) dx = dt$. Hence, $$I = \int\dfrac{dt}{t} = \log(t) + C = \log(\lvert \sin(x) \rvert) + C$$ Hence, your answer is $$2 \sin(x) + \log(\lvert \sin(x) \rvert) + C$$

-

Hint

Recall the chain rule $$g(f(x))'=g'(f(x))\cdot f'(x)$$ and note that $$\frac{\cos x }{\sin x} =\frac{f'(x) }{f(x)} =\frac{f'(x) }{f(x)}=\frac{1 }{f(x)}\cdot f'(x)$$

-

\begin{align} \int \frac{\cos x}{\sin x}\mathrm dx +2 \int \frac{\sin x\cos x}{\sin x}\mathrm dx &= \int \cot x\,\mathrm dx+2\int \cos x\,\mathrm dx\\ &= \ln|\sin x|+2\sin x+c \end{align}

-
Hello, welcome to Math.SE. Thank you for your answer! I've edited it to use MathJax. For some basic information about writing maths at this site see e.g. here, here, here and here. – Lord_Farin Oct 17 '13 at 17:47