Integrate $\int \sqrt{(x+a)(x+b)} \space dx$

254 Views Asked by At

Integrate $\int \sqrt{(x+a)(x+b)} \space dx$

I've tried to use first Euler substitution:
$$\sqrt{x^2 + (a+b)x + ab} = x + t \implies x = \frac{t^2 - ab}{a + b - 2t}$$ $$dx = \frac{-2t^2 + 2(a+b)t - 2ab}{(a + b - 2t)^2}dt$$ Then: $$(x + a) = \frac{t^2 - 2at + a^2}{a + b - 2t} = \frac{(t-a)^2}{a + b - 2t}$$ $$(x + b) = \frac{t^2 - 2bt + b^2}{a + b - 2t} = \frac{(t-b)^2}{a + b - 2t}$$ $$\sqrt{(x+a)(x+b)} = \frac{(t-a)(t-b)}{a+b-2t} = \frac{t^2 - (a+b)t + ab}{a + b - 2t}$$ Then we have multiplication by $dx$: $$\int \frac{t^2 - (a+b)t + ab}{a + b - 2t} \cdot \frac{-2t^2 + 2(a+b)t - 2ab}{(a + b - 2t)^2}dt = -2 \int \frac{(t^2 -(a+b)t + ab)^2}{(a+b - 2t)^3}dt$$

Substitution $ t = \sqrt{(x+a)(x+b)} - x$ doesn't help. Second Euler substitution $\sqrt{t^2 - (a+b)t + ab} = t + l$ won't help too.

Okay, another idea.
$$(x+a)(x+b) =\left (x + \frac{a+b}{2}\right)^2 - \left(\frac{a-b}{2}\right)^2$$
Then $$u = x + \frac{a+b}{2}, dx = du ; \sqrt{u^2 - (\frac{a -b}{2})^2} = \frac{a-b}{2}\sqrt{\frac{4 u^2}{(a-b)^2} - 1}$$

If we substitute $s = \sec^{-1} \frac{2u}{a-b}$:
$$\frac{a-b}{2}\sqrt{\frac{4 u^2}{(a-b)^2} - 1} = \frac{a-b}{2}\sqrt{\sec^2 s - 1} = \frac{a-b}{2} \tan s$$ As for the $ds$: $$\sec s = \frac{2u}{a-b} \implies u = \frac{(a-b)}{2} \sec(s)$$ $$ du = \left(\frac{(a-b)}{2} \sec(s)\right)' du = \frac{(a-b)}{2} \sec u \tan u \cdot ds$$

As a result: $$\int \sqrt{(x+a)(x+b)} dx = \int \frac{(a-b)^2}{4} \tan s \tan u \sec u \cdot ds$$


Something is wrong. I have a formula for finding this integral, but still I would like to "understand" this problem. I want to find it step by step. Any ideas for solution?

5

There are 5 best solutions below

0
On BEST ANSWER

Integrate $\int \sqrt{(x+a)(x+b)} \space dx$

Throughout this answer, for ease of syntax, all references to the Constant of Integration have been omitted.

This answer assumes that $~(a - b) \neq 0.$

Per "Calculus, Vol 1" (2nd Edition, Tom Apostol, 1966):

First Substitution:
To integrate $\displaystyle \int\sqrt{A^2 + (Cx + D)^2} ~dx,~$
use the substitution $Cx + D = A\tan(t) \implies C ~dx = A\sec^2 ~t ~dt.$

Second Substitution:
To integrate $\displaystyle \int\sqrt{(Cx + D)^2 - A^2} ~dx,~$
use the substitution $Cx + D = A\sec(t), \implies C ~dx = A\sec ~t \tan ~t ~dt.$


In the present problem,

$$\text{let} ~~~C = 1, ~D = \frac{a+b}{2}, ~A = \frac{a-b}{2} \implies $$

$$(Cx + D)^2 - A^2 = x^2 + (a+b)x + \frac{a^2 + 2ab + b^2}{4} - \frac{a^2 - 2ab + b^2}{4}$$

$$= x^2 + (a+b)x + ab = (x+a)(x+b).$$

This implies that the second substitution above will solve the problem.

Details follow:


Applying the formula

$$Cx+D = A \sec ~t, ~C ~dx = A\sec ~t ~\tan ~t \implies$$

$$\int ~\sqrt{(Cx + D)^2 - A^2} ~dx $$

$$= \int ~\sqrt{A^2(\sec^2 ~t - 1)} ~~\frac{A}{C} ~\sec ~t ~\tan ~t ~dt$$

$$= \int \frac{A^2}{C} ~\sec ~t ~\tan^2 ~t ~dt$$

$$= \frac{A^2}{C} \times \int ~\sec ~t \times (\sec^2 t - 1) ~dt$$

$$ = \frac{A^2}{C} \times \int \sec^3 t - \sec t ~dt. \tag1 $$


To resolve (1) above, the first thing to do is use a substitution to compute $~\displaystyle \int sec ~t ~dt.~$ Once this is done, you can then use integration by parts to compute $~\displaystyle \int ~\sec^3 ~t dt.$

Third Substitution
Set $~\displaystyle u = \tan\left( ~\frac{t}{2} ~\right) \implies : $

  • $\displaystyle ~t = 2 \arctan ~u, ~dt = \frac{2}{1+u^2} ~du$

  • $\displaystyle ~u^2 + 1 = \sec^2\left( ~\frac{t}{2} ~\right) \implies ~\frac{1}{u^2 + 1} = \cos^2\left( ~\frac{t}{2} ~\right)$

  • $\displaystyle \cos(t) = 2\cos^2\left( ~\frac{t}{2} ~\right) - 1 = \frac{2}{u^2 + 1} - 1 = \frac{1 - u^2}{1 + u^2}.$

So,

$$\int ~\sec ~t ~dt = \int ~\frac{1}{\cos t} ~dt$$

$$= \int ~\frac{1+u^2}{1-u^2} \times \frac{2 ~du}{1 + u^2}$$

$$= \int ~\left( ~\frac{1}{1 - u} + \frac{1}{1 + u} ~\right) ~du = \ln ~\left| ~\frac{1 + u}{1 - u} ~\right|.$$

Further,

$$\frac{1 + u}{1 - u} = \frac{1 + \tan\left(\frac{t}{2}\right)}{1 - \tan\left(\frac{t}{2}\right)}$$

$$= \frac{\cos\left(\frac{t}{2}\right) + \sin\left(\frac{t}{2}\right)}{\cos\left(\frac{t}{2}\right) - \sin\left(\frac{t}{2}\right)} \times \frac{\cos\left(\frac{t}{2}\right) - \sin\left(\frac{t}{2}\right)}{\cos\left(\frac{t}{2}\right) - \sin\left(\frac{t}{2}\right)}$$

$$ = \frac{\cos^2\left(\frac{t}{2}\right) - \sin^2\left(\frac{t}{2}\right)}{1 - 2\sin\left(\frac{t}{2}\right)\cos\left(\frac{t}{2}\right)} = \frac{\cos ~t}{1 - \sin ~t}.$$

Therefore,

$$\int ~\sec t ~dt = \ln ~\left| ~\frac{\cos ~t}{1 - \sin ~t} ~\right|.$$


With $~\int \sec t ~dt~$ computed, the computation of $~\sec^3 t ~dt ~$ is completed, by integration by parts.

Set $~I = \displaystyle \int ~\sec ~t ~\sec^2 ~t ~dt.$

\begin{array}{| r | r | r | r |} \hline u & \sec ~t & v & \tan ~t \\ du & \sec ~t ~\tan ~t dt & dv & sec^2 ~t ~dt \\ \hline \end{array}

Then,

$$I = \sec ~t ~\tan ~t - \int ~sec ~t \tan^2 ~t dt$$

$$= \sec ~t ~\tan ~t - \int ~(\sec^3 ~t - \sec t) ~dt$$

$$= \sec ~t ~\tan ~t - I + \int \sec ~t ~dt \implies $$

$$2I = \left( ~\sec ~t ~\tan ~t + \ln ~\left| ~\frac{\cos ~t}{1 - \sin ~t} ~\right| ~\right) \implies $$

$$\int \sec^3 ~t ~dt = I = \frac{1}{2} \times \left( ~\sec ~t ~\tan ~t + \ln ~\left| ~\frac{\cos ~t}{1 - \sin ~t} ~\right| ~\right).$$

Therefore,

$$ \frac{A^2}{C} \times \int \sec^3 t - \sec t ~dt $$

$$ = \frac{A^2}{C} \times \frac{1}{2} \times \left( ~\sec ~t ~\tan ~t - \ln ~\left| ~\frac{\cos ~t}{1 - \sin ~t} ~\right| ~\right). \tag2 $$


$\underline{\text{Putting this all together}}$

It remains to work backward, through the substitutions, starting from (2) above, to compute

$$\int \sqrt{(x+a)(x+b)} \space dx \tag3 $$

in terms of $~a~$ and $~b.$

The substitutions are:

  • $Cx + D = A ~\sec ~t.$

  • $C = 1, ~D = \dfrac{a+b}{2}, ~A = \dfrac{a-b}{2}.$

Then

$$x + \frac{a+b}{2} = \frac{a - b}{2} ~\sec ~t \implies $$

$$\cos ~t = \frac{a - b}{2x + a + b}, ~\sin ~t = \frac{2 ~\sqrt{(x+a)(x+b)}}{2x + a + b}. \tag4 $$

Now, using the values in (4) above, the expression in (2) above can be converted into an expression in $~a~$ and $~b.$

$$\frac{A^2}{C} = \frac{(a-b)^2}{4}.$$

$$\sec ~t ~\tan ~t = \frac{2 ~\sqrt{(x+a)(x+b)} ~(2x + a + b)}{(a-b)^2}.$$

$$\ln ~\left| ~\frac{\cos ~t}{1 - \sin ~t} ~\right| = \ln ~\left| ~\frac{a-b}{(2x + a + b) - 2 ~\sqrt{(x+a)(x+b)}} ~\right|.$$

So,

$$\int \sqrt{(x+a)(x+b)} \space dx = E \times (F - G),$$

where

  • $\displaystyle E = \frac{(a-b)^2}{8}.$

  • $\displaystyle F = \frac{2 ~\sqrt{(x+a)(x+b)} ~(2x + a + b)}{(a-b)^2}.$

  • $\displaystyle G = \ln ~\left| ~\frac{a-b}{(2x + a + b) - 2 ~\sqrt{(x+a)(x+b)}} ~\right|.$


Addendum
Soap Box:

If you have been assigned this problem from a book or class without being handed the formulas for the first, second, or third substitutions at the start of my answer, then you have a legitimate complaint with your teacher.

There is no way that you should be expected to derive these results on your own.

0
On

First substitute $t=x+\frac{b+a}{2}$ and let $c=\left|\frac{b-a}{2}\right|.$

Then the integral becomes:

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

Letting $t=cu,$ this becomes:

$$c^2\int\sqrt{u^2-1}\,du$$

Letting $u=\sec \theta$ this becomes:

$$-c^2\int |\tan \theta|\tan\theta \sec\theta\,d\theta$$

We'll assume $u>0$ first. Then $$\tan^2\theta \sec\theta = \frac{\sin^2 \theta }{\cos^3 \theta}=\frac{\cos \theta\sin^2 \theta}{(1-\sin^2 \theta)^2}$$

Letting $w=\sin\theta,$ this becomes:

$$-c^2\int \frac{w^2}{(1-w^2)^2}\,dw$$

Then apply partial fractions.

$$\frac{w^2}{(1-w^2)^2}=\frac14\left(\frac{1}{(1-w)^2}-\frac{1}{1-w}-\frac{1}{1+w}+\frac 1{(1+w)^2}\right)$$

Giving $$\frac{-c^2}{4}\left(\frac1{1-w}-\frac{1}{1+w}-\log\frac{1+w}{1-w}\right)$$

Back-substituting $w=\sqrt{1-1/u^2},$ we get:

$$\frac{-c^2}{4}\left({2u\sqrt{u^2-1}}-2\log\left(u+\sqrt{u^2-1}\right)\right)$$

(You have $u-\sqrt{u^2-1}=\frac{1}{u+\sqrt{u^2-1}},$ so the two logarithms become one.)

and then $u=t/c=\frac{1}c\left(x+\frac {a+b}2\right),$ gives you an answer.

0
On

First, apply the Euler-like substitution $\sqrt{(x+a)(x+b)} =(x+\frac{a+b}2)t$ to get $$dt= \frac{(a-b)^2\ dx}{(2x+a+b)^2\sqrt{(x+a)(x+b)}} ,\>\>\> 1-t^2=\frac{(a-b)^2}{(2x+a+b)^2}$$ and $$J=\int\frac1{\sqrt{(x+a)(x+b)} }dx=\int \frac1{1-t^2}dt=\tanh^{-1}t $$ Then, utilize $J$ below to integrate \begin{align} &\int {\sqrt{(x+a)(x+b)} }\ dx\\ =&\ \frac14 \int \frac{\sqrt{(x+a)(x+b)} }{2x+a+b}\ d\left[(2x+a+b)^2\right]\\ \overset{ibp}=&\ \frac{2x+a+b}4 \sqrt{(x+a)(x+b)} -\frac{(a-b)^2}8J \\ =& \frac{2x+a+b}4 \sqrt{(x+a)(x+b)} -\frac{(a-b)^2}8\tanh^{-1}\frac{\sqrt{(x+a)(x+b)}}{x+\frac{a+b}2} \end{align} Note that, to preserve the $a$-$b$ symmetry, the solution above avoids trigonometric substitutions.

1
On

In Thomas Andrews solution, to integrate $\displaystyle \int\sqrt{u^2-1} \, du$, substitute instead $u=\cosh \theta$ to get $\displaystyle \int\sinh^2 \theta \, d\theta$, which is $\displaystyle \frac{1}{2}\int \cosh 2\theta -1 \, d\theta = \frac{1}{4}\sinh 2\theta - \frac{1}{2}\theta =\frac{1}{2}u\sqrt{u^2-1} - \frac{1}{2}\cosh^{-1} u$. I think this is easier than the $\sec$ substitution.

0
On

WLOG, we assume $a>b$ Completing squares gives \begin{aligned} I & =\int \sqrt{x^2+(a+b) x+a b} d x \\ & =\int \sqrt{\left(x-\frac{a+b}{2}\right)^2+\left(\frac{a-b}{2}\right)^2} d x \end{aligned} Letting $x-\frac{a+b}{2}=\frac{a-b}{2} \sinh \theta$ yields $$ \begin{aligned} I & =\frac{(a-b)^2}{4} \int \cosh ^2 \theta d \theta \\ & =\frac{(a-b)^2}{4} \int \frac{\cosh 2 \theta-1}{2} d \theta \\ & =\frac{(a-b)^2}{8}\left(\frac{\sinh 2 \theta}{2}-\theta\right)+C\\&= \frac{(a-b)^2}{8}(\sinh \theta \cosh \theta-\theta)+C \end{aligned} $$ Plugging back $x$, we have $$ \boxed{I=\frac{2 x-a-b}{8} \sqrt{4 x^2-4(a+b) x+2\left(a^2+b^2\right)}-\frac{(a-b)^2}{8} \sinh^{-1} \left(\frac{2 x-a-b}{a-b}\right)+C} $$