# Integrate $\sqrt{x^2 - 2x}$

$$\int{\sqrt{x^2 - 2x}}$$

I think I should be doing trig substitution, but which? I completed the square giving

$$\int{\sqrt{(x-1)^2 -1}}$$

But the closest I found is for

$$\frac{1}{\sqrt{a^2 - (x+b)^2}}$$

So I must add a $-$, but how?

-
$x-1=\sec\theta$, then use $\sec^2\theta-1=\tan^2\theta$ to simplify. – David Mitra Apr 8 '12 at 13:09
@DavidMitra, just curious if theres some other way of solving this problem? I don't remember that as an identity taught/in my formula sheet. Of course theres lots of identities not taught, but usually, questions (at least for school) are of similar difficulty – Jiew Meng Apr 8 '12 at 13:16
@DavidMitra, I mean how did you get $x-1 = \sec{\theta}$ – Jiew Meng Apr 8 '12 at 13:38
@Jiew Meng I just decided to make that substitution. Then I could use the identity $\sec^2\theta-1=\tan^2\theta$ to get rid of the square root. – David Mitra Apr 8 '12 at 14:01
Since it is a difference of squares, you should draw a right triangle, then put lengths on the edges suggested by that difference of squares. – GEdgar Apr 8 '12 at 16:20

The standard way to solve these problems is indeed with trigonometric substitutions. But it is not the only way to solve these. Another way that was used more before is called Euler substitutions

if we are to integrate $\sqrt{ax^2+bx+c}$ that has real roots $\alpha$ and $\beta$, then we can use the substitution $\sqrt{ax^2+bx+c}=x \cdot t$

Now, in your problem we have $\alpha=0$ and $\beta=2$, so we may choose to use the substitution

$$\sqrt{x^2-2x} = (x-0)\cdot t \ \Rightarrow \ x = \frac{2}{1-t^2}$$

Since this is homework and I am lazy, so from here I will only outline the details

\begin{align} I & = \int \sqrt{x^2-2x}\,\mathrm{d}x \\ & = \int \frac{8t^2}{1-3t^2+3t^4-t^6}\,\mathrm{d}t \\ & = \int -\frac{8t^2}{(t+1)^3(t-1)^3}\,\mathrm{d}t \\ & = \int - \frac{1}{2}\frac{1}{t+1} + \frac{1}{(t+1)^3} - \frac{1}{2}\frac{1}{(t+1)^2} + \frac{1}{2}\frac{1}{(t-1)^2} - \frac{1}{(t-1)^3} - \frac{1}{2}\frac{1}{(t-1)^2} \, \mathrm{d}t \\ \end{align}

and from here the rest is obvious =)

-
@KannappanSampath Not really. What Nebu is introducing is a type of Euler substitution, which is great for this kind of problems. It is then simply a matter of rolling back to the original variable not get the result. – Pedro Tamaroff Apr 8 '12 at 19:22
@KannappanSampath I see. – Pedro Tamaroff Apr 8 '12 at 19:52

In hopes of taking advantage of the identity $$\tan^2\theta=\sec^2\theta-1,$$ make the substitution: $$x-1=\sec\theta, \quad dx=\sec\theta\,\tan\theta\,d\theta.$$ Then we have $$\int \sqrt{(x-1)^2-1}\, dx = \int\sqrt{\sec^2\theta -1}\, \sec\theta\tan\theta\,d\theta =\int\tan^2\theta\sec\theta\,d\theta=\int (\sec^3\theta-\sec\theta)\,d\theta.$$

To integrate $\sec\theta$, you can use a trick: $$\tag{1} \int\sec\theta\,d\theta =\int\sec\theta \cdot {\textstyle{\sec\theta+\tan\theta\over\sec\theta+\tan\theta}}\,d\theta =\int{ {\textstyle{\sec^2\theta+\sec\theta\tan\theta\over \sec\theta+\tan\theta}}}d\theta=\ln|\sec\theta+\tan\theta|+C\ \ \ \ \ \ \$$

To integrate $\sec^3\theta$, you can start with integration by parts: \eqalign{ \color{maroon}{\int\sec^3\theta\,d\theta}=\int\underbrace{\sec \theta}_u \,\underbrace{\sec^2\theta d\theta}_{dv} &= \underbrace{\sec \theta}_u \,\underbrace{\tan\theta}_{v} - \int\underbrace{\tan \theta}_v\, \underbrace{\sec \theta\tan\theta\, d\theta}_{du}\cr &=\sec\theta\tan\theta -\int( \sec^3\theta-\sec\theta)\,d\theta\cr &=\sec\theta\tan\theta \color{maroon}{-\int \sec^3\theta\,d\theta}+\int \sec\theta\,d\theta. } Then, in the above, solve for $\color{maroon}{\int\sec^3\theta\,d\theta}$: $$\tag{2} \int\sec^3\theta\,d\theta={1\over2}\sec\theta\tan\theta+{1\over2}\int\sec\theta\,d\theta ={1\over2}\sec\theta\tan\theta+{1\over2}\ln|\sec\theta+\tan\theta|+C.$$

So, using $(1)$ and $(2)$: $$\int(\sec^3\theta-\sec\theta)\,d\theta ={1\over2}\sec\theta\tan\theta -{1\over2}\ln|\sec\theta+\tan\theta|+C.$$ Finally put everything back in terms of $x$ using $\theta=\sec^{-1}(x-1)$ (which I'll leave to you).

-
Oh, I did it wrong $\int{\sqrt{\sec^2{\theta}-1}}$ without the $\sec\theta\tan\theta d\theta$ part. But how did you get that? – Jiew Meng Apr 8 '12 at 13:31
@JiewMeng $dx=\sec\theta\tan\theta\,d\theta$. – David Mitra Apr 8 '12 at 13:38
@Jiew Meng: We want to somehow get rid of the square root. The identity $\sec^2 u -1=\tan^2 u$ is one way. Another approach is to use the hyperbolic function identity $\cosh^2 u -\sinh^2 u=1$. There are others. – André Nicolas Apr 8 '12 at 14:46

The main obstacle here is the square root. It is likely that eliminating it will allow us to proceed. So we want something squared minus 1 is the square of something. That leaves secant (or cosecant) as the best option.

As N3buchadnezzar states, it is not the only option. Consider the formulas

$(m+n)^2=m^2+2mn+n^2,(m-n)^2=m^2-2mn+n^2$

It is possible to do a substitution such that

$(m+n)^2-1=(m-n)^2$

$(m+n)^2-(m-n)^2=1$

$4mn=1$

So any substitution $x-1=\frac{f(t)}2+\frac1{2f(t)}$ will work, though back substitution may be messy and will likely require the same properties to undo. For example, let's do

$x-1=\frac12(e^t+e^{-t}),dx=\frac12(e^t-e^{-t})dt$

$\int\sqrt{(x-1)^2-1}dx=\int\frac12(e^t-e^{-t})\sqrt{\frac14(e^{2t}+e^{-2t}+2)-1}dt$=

$\int\frac12(e^t-e^{-t})\sqrt{\frac14(e^{2t}+e^{-2t}+2-4)}dt=$

$\int\frac12(e^t-e^{-t})\sqrt{\frac14(e^{2t}+e^{-2t}-2)}dt=\int(\sqrt{\frac14(e^{2t}+e^{-2t}-2)})^2dt=$

$\frac14\int e^{2t}+e^{-2t}-2dt=\frac18e^{2t}-\frac18e^{-2t}-\frac t2+C$

Now the problem of back-substitution. How do we get back a function in terms of x? Well, we have

$x-1=\frac12(e^t+e^{-t}),\sqrt{(x-1)^2-1}=\frac12(e^t-e^{-t})$

$x-1+\sqrt{x^2-2x}=e^t,t=\ln(x-1+\sqrt{x^2-2x})$

That you'll need for the $\frac t2$ term. For the rest, you'd want to use

$\frac18e^{2t}-\frac18e^{-2t}=\frac12(\frac{e^t+e^{-t}}2)(\frac{e^t-e^{-t}}2)=\frac12(x-1)\sqrt{x^2-2x}$

So, like I said, secant is the best option. :)

-

I dont know i am right or wrong but i can do this example without using trigonometric substitution in following way, \begin{align*} \int\sqrt{x^{2}-2x}dx &=\int\sqrt{x^{2}-2x+1-1}dx\ &=\int\sqrt{(x-1)^{2}-1^{2}}dx\ &=\frac{x}{2}\sqrt{(x-1)^{2}-1}-\frac{1}{2}\log |x+\sqrt{(x-1)^{2}-1}|+c. \end{align*} I used the following formula of integration, $\int\sqrt{x^{2}-a^{2}}dx=\frac{x}{2}\sqrt{x^{2}-a^{2}}-\frac{a^{2}}{2}\log |x+\sqrt{x^{2}-a^{2}}|+c.$

-