2

In $ \int\frac{1}{\sin x + \sqrt{3} \cos x}\ dx $, If I multiply and divide by $1/2$ I get $$ \int\frac{1/2}{\frac{1}{2} \sin x + \frac{\sqrt{3}}{2} \cos x}\ dx ,$$ then I can write $ 1/2=\sin (\frac{\pi}{6}) $ and $ \sqrt{3}/2=\cos (\frac{\pi}{6}) $ and apply $\cos(a-b)=\cos a \cos b + \sin a \sin b$, I'll get $ \int\frac{1}{\cos(\frac{\pi}{6} - x)}\ dx $, I get $ \int \sec(\frac{\pi}{6} - x)\ dx $, now we know $ \int \sec(x)\ dx = \log|\tan(\frac{\pi}{4}+\frac{x}{2})| + c $ , so I finally get $$ \int\frac{1}{\sin x + \sqrt{3} \cos x}\ dx = \frac{1}{2}\log|\tan(\frac{\pi}{4}+\frac{\pi}{6}-\frac{x}{2})| + c $$

However if at this step $ \int\frac{1/2}{\frac{1}{2} \sin x + \frac{\sqrt{3}}{2} \cos x}\ dx $ I take $ 1/2=\cos (\frac{\pi}{3}) $ and $ \sqrt{3}/2=\sin (\frac{\pi}{3})$, then what I get is $ \int\frac{1}{\sin(\frac{\pi}{3} + x)}\ dx $, which is equal to $ \int \csc(\frac{\pi}{3} + x)\ dx $, now we know $ \int \csc(x)\ dx = \log|\tan(\frac{x}{2})| + c $

so I finally get $$ \int\frac{1}{\sin x + \sqrt{3} \cos x}\ dx = \frac{1}{2}\log|\tan(\frac{\pi}{6}+\frac{x}{2})| + c $$

why answer is different, I have rechecked and could not find any mistake

Manu Sm
  • 169

2 Answers2

2

You should not get different answers (up to a constant of integration.) In fact, this is simply a matter of a calculation error.

$$\int \sec x\, \mathrm dx = \log\left|\tan\left(\frac\pi 4 + \frac x2 \right) \right| + C$$ gives $$\frac12 \int \sec \left(x - \frac\pi 6 \right)\mathrm dx = \frac12 \log\left|\tan\left(\frac\pi 6 + \frac x2 \right) \right| + C$$ as $\frac\pi 4 + \frac x 2 - \frac {\pi}{12} = \frac x 2 + \frac \pi 6$. On the other hand, $$\int \operatorname{cosec} x\, \mathrm dx = \log\left|\tan\left(\frac x2 \right) \right| + C$$ gives $$\frac12 \int \operatorname{cosec}\left(x + \frac\pi 3 \right) \, \mathrm dx = \frac12 \log\left|\tan\left(\frac\pi 6 + \frac x2 \right) \right| + C$$ as $\frac12 \left( x + \frac\pi 3\right) = \frac x2 + \frac \pi 6$.

1

Both of your methods have a mistake in them. In your first method, you should have

$$\frac{\sin\left(\frac{\pi}{6}\right)}{\sin\left(\frac{\pi}{6}\right)\sin\left(x\right)+\cos\left(\frac{\pi}{6}\right)\cos\left(x\right)} = \frac{\sin\left(\frac{\pi}{6}\right)}{\cos\left(\frac{\pi}{6}-x\right)}.$$

Similarly, your second method should have

$$\frac{\cos\left(\frac{\pi}{3}\right)}{\cos\left(\frac{\pi}{3}\right)\sin\left(x\right)+\sin\left(\frac{\pi}{3}\right)\cos\left(x\right)} = \frac{\cos\left(\frac{\pi}{3}\right)}{\sin\left(\frac{\pi}{3}+x\right)}.$$

I'm guessing you forgot about the numerator, right? I think you can figure out the rest from there. Integrating both of them should result in the same answer, probably differing by a constant (I didn't try it out).

Accelerator
  • 4,923
  • I have already considered that by taking the 1/2 in numirator, if you see I multiplied and divided by 1/2 which is equal to sin(pi/6) and cos(pi/3), since it is a constant I took out of integral and that is why got 1/2 with log in final answer. that should be it, right? – Manu Sm Sep 10 '22 at 06:01
  • Oh, I thought you were saying $\int\frac{\sin\left(\frac{\pi}{6}\right)}{\sin\left(\frac{\pi}{6}\right)\sin\left(x\right)+\cos\left(\frac{\pi}{6}\right)\cos\left(x\right)}dx = \int\frac{1}{\cos\left(\frac{\pi}{6}-x\right)}dx$. Well then your final answer should be $-\frac{1}{2}\ln\left(\left|\tan\left(\frac{\pi}{3}-\frac{x}{2}\right)\right|\right) + C$. I'm not sure where you got the $\frac{\pi}{4} + \frac{\pi}{3}$ from. @ManuSm – Accelerator Sep 10 '22 at 06:11