Need help evaluating $\int {\frac {dx}{a+b\cos x}}$

142 Views Asked by At

Question

How to evaluate the integral : $$\int {\frac {1}{(a+b\cos x)^2}}\ dx$$

My attemp : $$A=\frac {\sin(x)}{a+b\cos(x)}\\ \implies\;\frac {dA}{dx}=\frac {a\cos(x)+b}{(a+b\cos(x))^2}\implies\;\frac {dA}{dx}=\frac {a}{b}\left({\frac {bcos(x)+\frac {b^2}{a}}{(a+b\cos(x))^2}}\right)\\~\\\implies\;\frac {dA}{dx}=\frac {a}{b}\left({\frac {1}{a+b\cos(x)}+\frac {b^2-a^2}{a}\left({\frac {1}{(a+b\cos(x))^2}}\right)}\right)\\~\\\implies\;\frac {b^2-a^2}{a}\left({\frac {1}{(a+b\cos(x))^2}}\right)=\frac {b}{a}\frac {dA}{dx}-\frac {1}{a+bcos(x)}$$ So $$\int{\frac {1}{(a+b\cos x)^2}}\ dx=\frac {bA}{b^2-a^2}-\frac {a}{b^2-a^2}\int\frac {1}{a+b\cos x}dx$$

I need help finding this integral $$\int\frac {1}{a+b\cos x}\ dx$$

3

There are 3 best solutions below

1
On BEST ANSWER

There are three distinctive cases shown below \begin{align} &\int\frac 1{a+b\cos x}\ dx\\ =& \int\frac {\csc x}{a\csc x+b\cot x}\ dx = \int\frac {a\csc^2x+b \csc x\cot x}{(a\csc x+b\cot x)^2}\ dx\\ =& \int\frac {-d(a\cot x+b \csc x)}{(a\cot x+b\csc x)^2+a^2-b^2}\\=&\ \begin{cases} -\frac1{\sqrt{a^2-b^2}}\tan^{-1}\frac{a\cot x+b \csc x}{\sqrt{a^2-b^2}}&a^2>b^2\\ \frac1 {a\cot x+b \csc x}& a^2=b^2\\ \frac1{\sqrt{b^2-a^2}}\coth^{-1}\frac{a\cot x+b \csc x}{\sqrt{b^2-a^2}}&a^2<b^2\\ \end{cases} \end{align}

0
On

A standard method for evaluating this kind of integral (more generally, rational functions in $\sin x, \cos x$) is applying the tangent half-angle substitution, $$x = 2 \arctan t, \qquad dx = \frac{2 \,dt}{1 + t^2},$$ which rationalizes the integral: $$2 \int \frac{dt}{(a - b) t^2 + (a + b)} .$$ N.b. When making the above substitution, we've implicitly restricted to $x \in (-\pi, \pi)$, which we'll henceforth assume. Since the integrand in $x$ is periodic, knowing an antiderivative on this interval is enough to determine an antiderivative everywhere, even if a global antiderivative is tricky to write down.

How we proceed depends on the sign of the discriminant $\Delta := (0)^2 - 4(a - b)(a + b) = 4(b^2 - a^2)$.

If $\Delta > 0$, then the integral is \begin{align} \frac{2}{a + b} \int \frac{dt}{1 + \left(\sqrt\frac{a - b}{a + b} t\right)^2} &= \frac{2}{\sqrt{a^2 - b^2}} \arctan \left(\sqrt\frac{a - b}{a + b} t\right) + C\\ &= \boxed{\frac{2}{\sqrt{a^2 - b^2}} \arctan \left(\sqrt\frac{a - b}{a + b} \tan \frac{x}{2} \right) + C} . \end{align} If $\Delta = 0$, then $b \in \{\pm a\}$. If $b = a$, then the integral is $$\frac{1}{a} \int dt = \frac{1}{a} t + C = \boxed{\frac{1}{a} \tan \frac{x}{2} + C}.$$ If $b = -a$, then the integral is $$\frac{1}{a} \int \frac{dt}{t^2} = -\frac{1}{a t} + C = \boxed{-\frac{1}{a} \cot \frac{x}{2} + C }.$$ Finally, if $\Delta < 0$, then the integrand has discontinuities wherever $t^2 = \frac{b + a}{b - a}$, and the integral is \begin{align} \frac{2}{b + a} \int \frac{dt}{1 - \left(\sqrt\frac{b - a}{b + a} t\right)^2} &= \left\{ \begin{array}{ll} \frac{2}{\sqrt{b^2 - a^2}} \operatorname{artanh} \left(\sqrt\frac{b - a}{b + a} t\right) + C, & t^2 < \frac{b + a}{b - a} \\ \frac{2}{\sqrt{b^2 - a^2}} \operatorname{arcoth} \left(\sqrt\frac{b - a}{b + a} t\right) + C, & t^2 > \frac{b + a}{b - a} \end{array} \right. \\ &= \boxed{ \left\{ \begin{array}{ll} \frac{2}{\sqrt{b^2 - a^2}} \operatorname{artanh} \left(\sqrt\frac{b - a}{b + a} \tan \frac{x}{2}\right) + C, & |x| < 2 \arctan\sqrt{\frac{b + a}{b - a}} \\ \frac{2}{\sqrt{b^2 - a^2}} \operatorname{arcoth} \left(\sqrt\frac{b - a}{b + a} \tan \frac{x}{2}\right) + C, & |x| > 2 \arctan\sqrt{\frac{b + a}{b - a}} \end{array} \right.} \\ \end{align}

0
On

Complex version

Using Euler’s formula, we have $$ I =\int \frac{1}{a+b \cdot \frac{e^{i x}+e^{-i x}}{2}} d x=2 \int \frac{be^{i x}}{b^2 e^{2 i x}+2 a be^{i x}+b} d x $$ Letting $t=be^{ix}+a$ transform the integral into $$ \begin{aligned} & I=\frac{2}{i} \int \frac{d t}{t^2+b^2-a^2} \\ & = \begin{cases}-\frac{2}{i \sqrt{a^2-b^2}} \tanh ^{-1}\left(\frac{t}{\sqrt{a^2-b^2}}\right)+C & \text { if } a^2>b^2 \\ -\frac{2}{i t}+C & \text { if } a^2=b^2 \\ \frac{2}{i \sqrt{b^2-a^2}} \tan ^{-1}\left(\frac{t}{\sqrt{b^2-a^2}}\right)+C &\text { if } a^2<b^2\end{cases} \\ & \end{aligned} $$