# Indefinite integral $\int \frac{1-x}{\sqrt{1+x-2x^2}}\,dx$

For my engineering math course I got a couple of exercises about indefinite integrals. I ran trought all of them but stumbled upon the following problem.

$$\int \frac{1-x}{\sqrt{1+x-2x^2}}\,dx$$

We can write $1+x-2x^2$ as $(1-x)(2x+1)$

So I got:

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

We can also replace $1-x$ in the denominator with $\sqrt{(1-x)^2}$

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

If we simplify this fraction we get:

$$\int \frac{\sqrt{1-x}}{\sqrt{2x+1}}\,dx$$

Next we apply the following substitutions

$$u = -x$$ so : $-du = dx$

We can rewrite the integral as following:

$$-\int \frac{\sqrt{1+u}}{\sqrt{1-2u}}\,du$$

Then we apply another substitution: $\sqrt{1+u} = t$ so $\frac{1}{2\sqrt{1+u}} = dt$

We rewrite: $\sqrt{1+u}$ to $\frac{1}{2}t^2 \,dt$

We can also replace $\sqrt{1-2u}$ as following:

$$\sqrt{-2t^2+3}=\sqrt{-2(1+u)+3}=\sqrt{1-2u}$$

With al these substitutions the integral has now the following form:

$$-\frac{1}{2}\int \frac{t^2}{\sqrt{-2t^2+3}}\,dt$$

Next we try to ''clean'' up the numerator:

$$-\frac{1}{2} \int \frac{t^2}{\sqrt{\frac{1}{2}(6-t^2)}} \, dt$$

$$-\frac{\sqrt{2}}{2} \int \frac{t^2}{\sqrt{6-t^2}} \, dt$$

And that's where I got stuck. I can clearly see that an arcsin is showing up in the integral but don't know how to get rid of the $t^2$.

• Have you tried to integrating by parts? Commented Nov 27, 2015 at 19:56
• @Dr.MV : My answer gives an elementary way to do this problem without integrating by parts. ${}\qquad{}$ Commented Nov 27, 2015 at 20:34
• A point often missed by students in lower-division math courses is that there is a standard technique in algebra for reducing a problem involving a quadratic polynomial with a first-degree term to a problam involving a quadratic polynomial with no first-degree term. See my answer for an explanation. ${}\qquad{}$ Commented Nov 27, 2015 at 20:38
• @michaelhardy Yes. I gave you a +1. I was focused on the OP's last ezpression, and associated question, which begs for IBP. Commented Nov 27, 2015 at 20:47
• Actually, you have arccotan showing up in the integral. (The integrand is adjacent/opposite in the obvious triangle.) Not that this is much use in finishing the integral. Commented Nov 28, 2015 at 0:24

Integrate by parts as follows

\begin{align} \int \frac{1-x}{\sqrt{1+x-2x^2}}\,dx = & \int \frac{\sqrt{1+x-2x^2}}{2(2x+1)}\ d(2x+1)\\ \overset{ibp}=&\ \frac12 \sqrt{1+x-2x^2}+\frac1{\sqrt2}\int \frac1{\sqrt{1-(\frac{4x-1}3)^2}}\ dx\\ =&\ \frac12 \sqrt{1+x-2x^2}+\frac3{4\sqrt2}\ \sin^{-1}\frac{4x-1}3+C \end{align}

Substitute $t = \sqrt{6} \sin(u)$, so $dt = \sqrt{6} \cos(u) du$ and the integrand becomes (up to losing the $-\frac{1}{\sqrt{2}}$ at the start) $$\sqrt{6} \int \sqrt{6} \sin^2(u) du$$

I think you can do that!

• I made this exercise initially in an latex file and apparently something went wrong during the copying. It should be $-2x^2$ instead of $-x^2$. I'm sorry... Commented Nov 27, 2015 at 20:09
• Big thank you, I think I can see now how I should finish the exercise. Commented Nov 27, 2015 at 20:17

You have: $$\int \frac{1-x}{\sqrt{1+x-2x^2}}\,dx$$ First we'll do a routine substitution: $$u = 1+x-2x^2, \qquad du = (1-4x)\,dx, \qquad \frac{-du} 4 = \left( \frac 1 4 - x \right)\, dx$$ \begin{align} \int \frac{1-x}{\sqrt{1+x-2x^2}}\,dx & = \int \frac{\frac 1 4-x}{\sqrt{1+x-2x^2}}\,dx + \int \frac{\frac 3 4}{\sqrt{1+x-2x^2}}\,dx \\[15pt] & = \frac{-1} 4 \int \frac{du}{\sqrt u} + \frac 3 4 \int \frac{dx}{\sqrt{1+x-2x^2}}. \end{align} I expect you can handle the first integral above. The second integral should make you think of completing the square: \begin{align} -2x^2 + x+1 = -2\left( x^2 - \frac 1 2 x \right)^2 + 1 & = -2\left( \overbrace{x^2 - \frac 1 2 x +\frac 1 {16}}^\text{a perfect square} \right)^2 + 1 + \frac 1 8 \\[10pt] & = -2 \left( x - \frac 1 4 \right)^2 + \frac 9 8. \end{align} Then \begin{align} \frac 9 8 -2\left( x - \frac 1 4 \right)^2 = \frac 9 8 - (2x-1)^2 & = \frac 9 8 \left( 1 - \frac 8 9 (2x-1)^2 \right) \\[10pt] & = \frac 9 8 \left( 1 - \left( \frac{2\sqrt2} 3 (2x-1) \right)^2 \right) \\[10pt] & = \frac 9 8 (1 - \sin^2\theta) \\[15pt] \frac{4\sqrt2} 3 \, dx & = d\theta \end{align} et cetera.

Make a linear change of variables $$x\mapsto x+1/4$$ so that the integrand becomes $$\frac{\frac{3}{4}-x}{\sqrt{\frac{9}{8}-2x^2}}=\frac{1}{2^{1/2}}\cdot\frac{\frac{3}{4}-x}{\sqrt{\left(\frac{3}{4}\right)^2-x^2}}$$ Now, \begin{align*} \int\frac{1-x}{\sqrt{1+x-2x^2}}dx &=\frac{3}{4\sqrt{2}}\int\frac{dx}{\sqrt{\left(\frac{3}{4}\right)^2-x^2}}-\frac{1}{\sqrt{2}}\int\frac{x}{\sqrt{\left(\frac{3}{4}\right)^2-x^2}}dx\\ &=\frac{1}{\sqrt{2}}\sin^{-1}\left(\frac{4}{3}x\right)+\frac{1}{2\sqrt{2}}\int\frac{d\left(\left(\frac{3}{4}\right)^2-x^2\right)}{\sqrt{\left(\frac{3}{4}\right)^2-x^2}}\\ &=\frac{1}{\sqrt{2}}\left(\sin^{-1}\left(\frac{4}{3}x\right)+\sqrt{\left(\frac{3}{4}\right)^2-x^2}\right)+C \end{align*}

Let $u^2=\frac{1-x}{1+2x}$. Then $x=\frac{1-u^2}{1+2u^2}$ and $\mathrm{d}x=-\frac{6u}{(1+2u^2)^2}\,\mathrm{d}u$.

Let $\sqrt2u=\tan(\theta)$, then $\sqrt2\,\mathrm{d}u=\sec^2(\theta)\,\mathrm{d}\theta$. \begin{align} \int\frac{1-x}{\sqrt{1+x-2x^2}}\,\mathrm{d}x &=\int\frac{1-x}{\sqrt{(1-x)(1+2x)}}\,\mathrm{d}x\\ &=\int\sqrt{\frac{1-x}{1+2x}}\,\mathrm{d}x\\ &=-\int\frac{6u^2}{(1+2u^2)^2}\,\mathrm{d}u\\ &=-\frac3{\sqrt2}\int\frac{\tan^2(\theta)}{\sec^4(\theta)}\sec^2(\theta)\,\mathrm{d}\theta\\ &=-\frac3{\sqrt2}\int\sin^2(\theta)\,\mathrm{d}\theta\\ &=-\frac3{2\sqrt2}\int(1-\cos(2\theta))\,\mathrm{d}\theta\\ &=-\frac3{4\sqrt2}(2\theta-\sin(2\theta))+C\\ &=-\frac3{2\sqrt2}\left(\theta-\frac{\tan(\theta)}{1+\tan^2(\theta)}\right)+C\\ &=-\frac3{2\sqrt2}\left(\arctan\left(\sqrt2u\right)-\frac{\sqrt2u}{1+2u^2}\right)+C\\ &=\frac12\sqrt{1+x-2x^2}-\frac3{2\sqrt2}\arctan\left(\sqrt{\frac{2-2x}{1+2x}}\right)+C\\ \end{align}

Hint: When you arrived at $~\displaystyle\int\sqrt{\frac{1-x}{2x+1}}~dx,~$ you should have immediately substituted

$\dfrac{1-x}{2x+1}=u^2.~$ Then the entire integrand would have been reduced to a rational function.

• I like this idea so much that I used it in my answer ;-)
– robjohn
Commented Nov 28, 2015 at 2:01

$$\int\;\frac {1-x}{\sqrt {1＋x－2x^2}}dx＝\frac {1}{4}\int\frac {-4x＋1}{\sqrt {1＋x－2x^2}}dx＋\frac {3}{4\sqrt {2}}\int\frac {1}{\sqrt {\frac {3}{4}-\left({x－\frac {1}{4}}\right)^2}}dx\\~\\＝\frac {1}{4}\sqrt {1＋x－2x^2}＋\frac {3}{4\sqrt {2}}\sin^{-1}\left({\frac {4x－1}{2\sqrt {3}}}\right)＋C$$

Start by making the substitution

$$\xi=\frac{\sqrt{1+x-2x^2}}{x-1},\quad x=\frac{\xi^2-1}{\xi^2+2},\quad\mathrm{d}x=\frac{6\xi}{(2+\xi^2)^2}~\mathrm{d}\xi$$

so that

$$\int \frac{1-x}{\sqrt{1+x-2x^2}}~\mathrm{d}x =-2\int\frac{\mathrm{d}\xi}{2+\xi^2}.$$

From this answer we know that

$$\int\frac{\mathrm{d}\psi}{(1+\psi^2)^2}=\frac{1}{2}\left(\arctan\psi+\frac{\psi}{1+\psi^2}\right)+C,$$

and so, plugging everything in and simplifying,

$$\int \frac{1-x}{\sqrt{1+x-2x^2}}~\mathrm{d}x=-\frac{3}{2\sqrt{2}}\arctan\sqrt{\frac{2-2x}{1+2x}}+\frac{1}{2}\sqrt{1+x-2x^2}+C.$$