# Another messy integral: $I=\int \frac{\sqrt{2-x-x^2}}{x^2}\ dx$

I found the following question in a practice book of integration:-

$Q.$ Evaluate $$I=\int \frac{\sqrt{2-x-x^2}}{x^2}\ dx$$ For this I substituted $t^2=\frac {2-x-x^2}{x^2}\implies x^2=\frac{2-x}{1+t^2}\implies 2t\ dt=\left(-\frac4{x^3}+\frac 1{x^2}\right)\ dx$. Therefore \begin{align}I&=\int\frac {\sqrt{2-x-x^2}}{x^2}\ dx\\&=\int \left(\frac tx\right)\left(\frac{2t\ dt}{-\frac4{x^3}+\frac 1{x^2}}\right)\\&=\int \frac{2t^2\ dt}{\frac{x-4}{x^2}}\\&=\int \frac{2t^2(1+t^2)\ dt}{{x-4}\over{2-x}}\\&=\int \frac{2t^2(1+t^2)(5+4t^2-\sqrt{8t^2+9})\ dt}{\sqrt{8t^2+9}-(8t^2+9)}\end{align} Now I substituted $8t^2+9=z^2 \implies t^2=\frac {z^2-9}8 \implies 2t\ dt=z/4\ dz$. So, after some simplification, you get \begin{align}I&=-\frac1{512}\int (z^2-9)(z+1)(z-1)^2\ dz\end{align} I didn't have the patience to solve this integration after all these substitutions knowing that it can be done (I think I have made a mistake somewhere but I can't find it. There has to be an $ln(...)$ term, I believe). Is there an easier way to do this integral, something that would also strike the mind quickly? I have already tried the Euler substitutions but that is also messy.

Let $$\displaystyle I = \int \frac{\sqrt{2-x-x^2}}{x^2}dx = \int\frac{\sqrt{(x+2)(1-x)}}{x^2}dx$$

Now Let $\displaystyle (x+2) = (1-x)t^2\;,$ Then $\displaystyle x = \frac{t^2-2}{t^2+1} = 1-\frac{3}{t^2+1}$

So $$\displaystyle dx = \frac{6t}{(t^2+1)^2}dt$$ and $$\displaystyle (1-x) = \frac{3}{t^2+1}$$

So Integral $$\displaystyle I = 18\int\frac{t^2}{(t^2+1)\cdot (t^2-2)^2}dt = 6\int\frac{(t^2+1)-(t^2-2)}{(t^2+1)\cdot (t^2-2)^2}dt$$

so we get $$\displaystyle I = 6\int\frac{1}{(t^2-2)^2}dt-6\int\frac{1}{(t^2+1)(t^2-2)}dt$$

• Beautiful!! How do you get these types of ideas? And which substitution is this? – Aditya Agarwal Sep 5 '15 at 15:14
• Thanks again, nice solution... – Abhishek Bakshi Sep 5 '15 at 15:18
• I am lost on the line following So Integral. Did you loose a $t^2$ or am I just stupid ? In any manner, smart again ! – Claude Leibovici Sep 5 '15 at 15:22
• To aditiya, I have just use Substution. and i dont know which substution is this(name). – juantheron Sep 5 '15 at 15:25
• I agree with $18\int \cdots$. For the next, I think that you lost a $t^2$ as a multiplier on the second part of the line. By the way, partial fraction decomposition simplifies quite a lot. Nice again ! – Claude Leibovici Sep 5 '15 at 15:56

Hint: $\sqrt{2-x-x^2}=\sqrt{\frac94-(x+\frac12)^2}$
Substitute $x+\frac12=t; dx=dt$
$$\int \frac{\sqrt{\frac94-t^2}}{(t-\frac12)^2}\ dt$$ Put $\frac32\sin\theta=t;\frac32\cos\theta d\theta=dt$ $$\int \frac{\frac32\cos\theta.\frac32\cos\theta d\theta}{(\frac32\sin\theta-\frac12)^2}$$ $$9\int \frac{\cos^2\theta d\theta}{(9\sin^2\theta+1-6\sin \theta)}$$ Now do $u=\tan\frac{\theta}2;du=\frac12\sec^2{\frac{\theta}2}d\theta$ $$\boxed{\sin\theta=\frac{2u}{1+u^2};\cos\theta=\frac{1-u^2}{1+u^2};d\theta=\frac{2du}{u^2+1}}$$ I guess you can take it from here?

• Please explain the downvote. – Aditya Agarwal Sep 5 '15 at 14:54
• the downvote is useless, set $$t=(x+\frac{1}{2})$$ in the hint above – Dr. Sonnhard Graubner Sep 5 '15 at 14:59
• Sorry, but I don't know what is the Euler Substitution. @AbhishekBakshi, if you are talking to me. – Aditya Agarwal Sep 5 '15 at 15:07
• And as far as "messy" word is concerned, then this is the best I can do. – Aditya Agarwal Sep 5 '15 at 15:12
• In, fact, you have made it more messier. Anyway the Euler substitution is a hack for integrals containing $\sqrt{(x-a)(b-x)}$. Substitute $x=a\cos^2\theta+b\sin^2\theta$ – Abhishek Bakshi Sep 5 '15 at 15:16

Let $$\displaystyle I = \int \frac{\sqrt{2-x-x^2}}{x^2}dx = \int \sqrt{2-x-x^2}\cdot \frac{1}{x^2}dx\;,$$ Now Using Integration by parts

$$\displaystyle I = -\frac{\sqrt{2-x-x^2}}{x}-\int\frac{1+2x}{2\sqrt{2-x-x^2}}\cdot \frac{1}{x}dx$$

So $$\displaystyle I = -\frac{\sqrt{2-x-x^2}}{x}-\underbrace{\int\frac{1}{\sqrt{2-x-x^2}}dx}_{J}-\underbrace{\int\frac{1}{x\sqrt{2-x-x^2}}dx}_{K}$$

So for Calculation of $$\displaystyle J = \int\frac{1}{\sqrt{2-x-x^2}}dx = \int\frac{1}{\sqrt{\left(\frac{3}{2}\right)^2-\left(\frac{2x+1}{2}\right)^2}}dx$$

Now Let $\displaystyle \left(\frac{2x+1}{2}\right)=\frac{3}{2}\sin \phi\;,$ Then $\displaystyle dx = \frac{3}{2}\cos \phi d\phi$

So we get $$\displaystyle J = \int 1d\phi = \phi+\mathcal{C_{1}} = \sin^{-1}\left(\frac{2x+1}{3}\right)+\mathcal{C}$$

Similarly for calculation of $$\displaystyle K = \int \frac{1}{x\sqrt{2-x-x^2}}dx$$

Put $\displaystyle x=\frac{1}{u}$ and $\displaystyle dx = -\frac{1}{u^2}dt$

So we get $$\displaystyle K = -\int\frac{1}{\sqrt{2u^2-u-1}}du = -\frac{1}{\sqrt{2}}\int\frac{1}{\sqrt{\left(u-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}}dx$$

So we get $$\displaystyle J = -\frac{\sqrt{2}}{3}\ln\left|\left(u-\frac{1}{4}\right)+\sqrt{\left(u-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}\right|+\mathcal{C_{2}}$$

So we get $$\displaystyle J = -\frac{\sqrt{2}}{3}\ln\left|\left(\frac{1}{x}-\frac{1}{4}\right)+\sqrt{\left(\frac{1}{x}-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}\right|+\mathcal{C_{2}}$$

So $$\displaystyle I = -\frac{\sqrt{2-x-x^2}}{x}-\sin^{-1}\left(\frac{2x+1}{3}\right)+\frac{\sqrt{2}}{3}\ln\left|\left(\frac{1}{x}-\frac{1}{4}\right)+\sqrt{\left(\frac{1}{x}-\frac{1}{4}\right)^2-\left(\frac{3}{4}\right)^2}\right|+\mathcal{C}$$

• Very nice! A small note: the last term can also be expressed as $$\frac{\text{artanh}\,\bigl((4-x)/(2\sqrt{2}\sqrt{2-x-x^2})\bigr)}{2\sqrt{2}}.$$ – mickep Sep 7 '15 at 18:20

use so so-called Euler substitution and set $$\sqrt{2-x-x^2}=xt+\sqrt{2}$$