1. ## Which answer is correct?

Evaluate $\int \frac{dx}{sin(x)+sin(2x)}$ Wolfram alpha gave me this answer $-\frac23log\left(\frac{3-tan^2\frac x2}{\sqrt tan\frac x2\right)}+c.$ When I solved this problem, I got this answer $\frac16log(1- cos x)+\frac12 log(1+cos x)-\frac23 log (1+2cos x)+c.$ Answer calculated by me is matching with the answer given in the study material.Can any member of this forum tell me which answer is correct? OR both are one and the same?

2. ## Re: Which answer is correct?

They will be the same. Use of laws of logs and trig formulae gets your answer to be the same as the other answer.

3. ## Re: Which answer is correct?

Originally Posted by Vinod
Evaluate $\int \frac{dx}{sin(x)+sin(2x)}$ Wolfram alpha gave me this answer $-\frac23log\left(\frac{3-tan^2\frac x2}{\sqrt tan\frac x2\right)}+c.$ When I solved this problem, I got this answer $\frac16log(1- cos x)+\frac12 log(1+cos x)-\frac23 log (1+2cos x)+c.$ Answer calculated by me is matching with the answer given in the study material.Can any member of this forum tell me which answer is correct? OR both are one and the same?
\displaystyle \begin{align*} \int{\frac{1}{\sin{x} + \sin{2x}}\,dx} &= \int{\frac{1}{\sin{x} + 2\sin{x}\cos{x}}\,dx} \\ &= \int{\frac{1}{\sin{x}(1 + 2\cos{x})}\,dx} \end{align*}

Now applying Partial Fractions...

\displaystyle \begin{align*} \frac{A}{\sin{x}} + \frac{B}{1 + 2\cos{x}} &\equiv \frac{1}{\sin{x}(1 + 2\cos{x})} \\ \frac{A(1 + 2\cos{x}) + B\sin{x}}{\sin{x}(1 + 2\cos{x})} &\equiv \frac{1}{\sin{x}(1 + 2\cos{x})} \\ A(1 + 2\cos{x}) + B\sin{x} &\equiv 1 \end{align*}

Letting \displaystyle \begin{align*} x = -\frac{\pi}{3} \end{align*} gives

\displaystyle \begin{align*} A\left[1 + 2\cos{\left(-\frac{\pi}{3}\right)}\right] + B\sin{\left(-\frac{\pi}{3}\right)} &\equiv 1 \\ -\frac{\sqrt{3}}{2}B &\equiv 1 \\ B &\equiv \frac{2}{\sqrt{3}} \end{align*}

and letting \displaystyle \begin{align*} x = 0 \end{align*} gives

\displaystyle \begin{align*} A[1 + 2\cos{(0)}] + B\sin{(0)} &\equiv 1 \\ 3A &\equiv 1 \\ A &\equiv \frac{1}{3} \end{align*}

Therefore \displaystyle \begin{align*} \frac{1}{\sin{x}(1 + 2\cos{x})} &\equiv \frac{1}{3\sin{x}} + \frac{2}{\sqrt{3}(1 + 2\cos{x})} \end{align*}

The first integral is standard and the second integral can be evaluated using the Wierstrauss Substitution