I'm trying to evaluate the following integral:

$$ \int \frac{dx}{2 \sin x - \cos x + 5}.$$

This is in a set of exercises following a chapter on partial fractions, so I imagine there is a substitution we can make to get this into a rational function where we can use partial fraction decomposition. I can't seem to figure out what substitution to make in such a situation though.

  • 3
    $\begingroup$ Please see the Wikipedia article on the Weierstrass substitution. $\endgroup$ – André Nicolas Dec 7 '15 at 14:47

The standard substitution is $t=\tan\frac{x}{2}$, because $$ \sin x=\frac{2t}{1+t^2},\quad \cos x=\frac{1-t^2}{1+t^2},\quad dx=\frac{2}{1+t^2}\,dt $$ so your integral becomes $$ \int\frac{1+t^2}{4t-1+t^2+5+5t^2}\frac{2}{1+t^2}\,dt= \int\frac{1}{3t^2+2t+2}\,dt= \int\frac{3}{(3t+1)^2+5}\,dt $$ that you can compute with the further substitution $3t+1=u\sqrt{5}$.

  • $\begingroup$ Awesome, thanks. I kept trying various $\sin$ and $\cos$ substitutions. I always forget $\tan$ is out there. $\endgroup$ – Cosima Maslani Dec 7 '15 at 14:53
  • $\begingroup$ @CosimaMaslani It's not always the best in these cases, but it's surely helpful in several of them. $\endgroup$ – egreg Dec 7 '15 at 14:54

Notice, $$\int \frac{1}{2\sin x-\cos x+5}\ dx$$ $$=\int \frac{1}{2\frac{2\tan\frac{x}{2}}{1+\tan^2\frac{x}{2}}-\frac{1-\tan^2\frac{x}{2}}{1+\tan^2\frac{x}{2}}+5}\ dx$$ $$=\int \frac{1+\tan^2\frac{x}{2}}{6\left(\tan^2\frac{x}{2}+\frac{2}{3}\tan\frac{x}{2}+\frac{2}{3}\right)}\ dx$$ $$=\int \frac{\sec^2\frac{x}{2}}{6\left(\left(\tan\frac{x}{2}+\frac{1}{3}\right)^2+\frac{5}{9}\right)}\ dx$$ $$=\frac{2}{6}\int \frac{d\left(\tan\frac{x}{2}+\frac{3}{2}\right)}{\left(\tan\frac{x}{2}+\frac{1}{3}\right)^2+\left(\frac{\sqrt 5}{3}\right)^2}$$ $$=\frac{1}{3}\frac{3}{\sqrt 5}\tan^{-1}\left(\frac{\tan\frac{x}{2}+\frac{1}{3}}{\frac{\sqrt 5}{3}}\right)+C$$

$$\bbox[5px, border:2px solid #C0A000]{\color{blue}{\int \frac{1}{2\sin x-\cos x+5}\ dx=\frac{1}{\sqrt 5}\tan^{-1}\left(\frac{3\tan\frac{x}{2}+1}{\sqrt 5}\right)+C}}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.