$$ I\equiv \int \frac{dx}{\cos^3 x+2\sin(2x)-5\cos x}. $$ This integral does have a closed form. I am not sure where to start. We can factorize the denominator as $$ \cos^3 x+2\sin(2x)-5\cos x=(\cos^2 x+4\sin x-5)\cos x, $$ but I am not sure where to go from there. Thank you
- 19,345
- 9,878
-
3We have very different definitions of fun it seems :) – Spine Feast Apr 09 '14 at 23:47
-
2@DepeHb All indefinite integrals are fun, all definite integrals are dangerous :) – Jeff Faraci Apr 10 '14 at 00:20
-
2So you are definite or indefinite? – evil999man Apr 12 '14 at 14:01
-
@Awesome Haha, I am Definite Integral, although this post seems to show my cheating side as I am posting an indefinite integral ;) – Jeff Faraci Apr 12 '14 at 22:53
-
I think that indefinite integrals are too intuitive to be fun. Although it can be for the teacher who just differentiated an arbitrary function in his head. – evil999man Apr 13 '14 at 04:23
2 Answers
We want to find $$\int \frac{\cos x}{(\cos^2 x+4\sin x-5)(\cos^2 x)}\,dx,$$ or equivalently $$\int \frac{\cos x}{(-\sin^2 x+4\sin x-4)(1-\sin^2 x)}\,dx.$$ The substitution $u=\sin x$ turns this into $$\int\frac{-1}{(2-u)^2 (1-u^2)}\,du,$$ which yields (after a while) to partial fractions.
- 507,029
-
1
-
2You are welcome. Any rational function of $\sin t$ and $\cos t$ has a closed form antiderivative. – André Nicolas Apr 10 '14 at 00:27
-
+1, in particular cases, such as this, an adequate particular substitution makes the computation faster than the Weierstrass substitution. – Américo Tavares Apr 12 '14 at 13:50
The present integrand is a rational function (i.e. a ratio of two polynomials) of $\cos x$ and $\sin x$, which is considered a common question. So I take it partially from the answer by Arturo Magidin to the question Evaluating $\int P(\sin x, \cos x) \text{d}x$ by Aryabhata, which is an entry of the List of Generalizations of Common Questions.
Weierstrass Substitution
A method that always works is Weierstrass substitution, which will turn such an integral into an integral of rational functions, which in turn can always be solved, at least in principle, by the method of partial fractions. This works even for rational functions of sine and cosine, as well as functions that involve the other trigonometric functions.
Weierstrass substitution replaces sines and cosines (and by extension, tangents, cotangents, secants, and cosecants) by rational functions of a new variable. The identities begin by the trigonometric substitution $t = \tan\frac{x}{2}$, with $-\pi\lt x\lt \pi$, which yields $$\begin{align*} \sin x &= \frac{2t}{1+t^2}\\ \cos x &= \frac{1-t^2}{1+t^2}\\ dx &= \frac{2\,dt}{1+t^2}. \end{align*}$$
Now we have
$$I =\int \frac{dx}{\cos ^{3}x+4\sin x\cos x-5\cos x}.$$
Using the substitution above we obtain:
\begin{eqnarray*} I &=&\int \frac{2}{\left( \frac{1-t^{2}}{1+t^{2}}\right) \left( \left( \frac{ 1-t^{2}}{1+t^{2}}\right) ^{2}+4\frac{2t}{1+t^{2}}-5\right) \left( 1+t^{2}\right) }\,dt \\[2ex] &=&\frac{1}{2}\int \frac{\left( 1+t^{2}\right) ^{2}}{\left( -1+t^{2}\right) \left( t^{2}-t+1\right) ^{2}}dt, \end{eqnarray*}
which can be integrated by the method of partial fractions:
\begin{eqnarray*} I&=&\frac{1}{2}\int \left( \frac{2}{-1+t}-\frac{2}{9\left( 1+t\right) }-\frac{ 1}{9}\frac{-5+16t}{t^{2}-t+1}-\frac{1}{3}\frac{-2+t}{\left( t^{2}-t+1\right) ^{2}}\right) dt \\[2ex] &=&\ln (\left\vert -1+t\right\vert -\frac{1}{9}\ln \left( \left\vert 9+9t\right\vert \right) -\frac{4}{9}\ln \left( \left\vert t^{2}-t+1\right\vert \right) +\frac{1}{6}\frac{t}{t^{2}-t+1}+C \\[2ex] &=&\ln \left( \left\vert -1+\tan \frac{x}{2}\right\vert \right) -\frac{1}{9} \ln \left( \left\vert 9+9\tan \frac{x}{2}\right\vert \right) -\frac{4}{9}\ln \left( \left\vert \tan ^{2}\frac{x}{2}-\tan \frac{x}{2}+1\right\vert \right) +\frac{1}{6}\frac{\tan \frac{x}{2}}{\tan ^{2}\frac{x}{2}-\tan \frac{x}{2}+1} +C. \end{eqnarray*}
PS. I've checked that the derivative of this last integral is
$$ \frac{1}{4}\frac{3\tan ^{2}\frac{x}{2}+\tan ^{6}\frac{x}{2}+3\tan ^{4}\frac{x}{2}+1}{\left( -1+\tan \frac{x}{2}\right) \left( 1+\tan \frac{x}{2}\right) \left( \tan ^{2}\frac{ x}{2}-\tan \frac{x}{2}+1\right) ^{2}}, $$
which is equal to
$$\frac{1}{\cos ^{3}x+4\sin x\cos x-5\cos x}.$$
- 38,602