# How to integrate this integral?

## Homework Statement

Perform the following integration:

$$\int_{0}^{\sqrt{2}h}\frac{x}{\sqrt{h^2+x^2-\sqrt{2}hx}}dx$$

## Homework Equations

The solution (via wolframalpha.com) is:

$$[\sqrt{h^2+x^2-\sqrt{2}hx}+\frac{h}{\sqrt{2}}ln(2(\sqrt{h^2+x^2-\sqrt{2}hx}+x)-\sqrt{2}h)$$

Evaluated from 0 to sqrt(2)h

Here is the link: http://www.wolframalpha.com/input/?i=x/[(h^2+x^2-(2^(1/2))*x*h)^(1/2)]

## The Attempt at a Solution

I immediately looked at a substitution and an integration by parts. They left me worse off than before. Then, I went to wolframalpha in order to see how to do it. They could not show any steps. I am not sure how to integrate this by hand. Any advice?

If this is an integral that you simply look up in a table, could someone point me to the methods used (no matter how complex) that will solve this?

Thanks for reading.

## Answers and Replies

Related Calculus and Beyond Homework Help News on Phys.org
HallsofIvy
Science Advisor
Homework Helper
First complete the square in the denominator:
$$x^2- \sqrt{2}hx+ h^2= x^2- 2\sqrt{2}hx+ \frac{h^2}{2}- \frac{h^2}{2}+ h^2$$
$$(x- \frac{\sqrt{2}}{2}h)^2+ \frac{h^2}{2}$$

Make the substitution
$$u= x- \frac{\sqrt{2}}{2}h$$

SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member

## Homework Statement

Perform the following integration:

$$\int_{0}^{\sqrt{2}h}\frac{x}{\sqrt{h^2+x^2-\sqrt{2}hx}}dx$$

## Homework Equations

The solution (via wolframalpha.com) is:

$$[\sqrt{h^2+x^2-\sqrt{2}hx}+\frac{h}{\sqrt{2}}ln(2(\sqrt{h^2+x^2-\sqrt{2}hx}+x)-\sqrt{2}h)$$

Evaluated from 0 to sqrt(2)h

Here is the link: http://www.wolframalpha.com/input/?i=x/[(h^2+x^2-(2^(1/2))*x*h)^(1/2)]

## The Attempt at a Solution

I immediately looked at a substitution and an integration by parts. They left me worse off than before. Then, I went to wolframalpha in order to see how to do it. They could not show any steps. I am not sure how to integrate this by hand. Any advice?

If this is an integral that you simply look up in a table, could someone point me to the methods used (no matter how complex) that will solve this?

Thanks for reading.
Try completing the square under the radical. Then do a substitution.

$$\sqrt{h^2+x^2-\sqrt{2}hx}}\ =\ \sqrt{x^2-2\frac{h}{\sqrt{2}}x+\frac{h^2}{2}-\frac{h^2}{2}+h^2}\,}$$

$$=\sqrt{\left(x-\frac{h}{\sqrt{2}}\right)^2+\frac{h^2}{2}\,}$$

Thank you, HallsofIvy and SammyS.

Following HallsofIvy's suggestion for the value of u, I did the following:

$$\int_{0}^{\sqrt{2}h}\frac{x}{\sqrt{h^2+x^2-\sqrt{2}hx}}dx\rightarrow{\int\frac{u+\frac{\sqrt{2}}{2}h}{\sqrt{(u^{2}+\frac{h^{2}}{2})}}du\rightarrow{\int\frac{u+\frac{\sqrt{2}}{2}h}{\sqrt{(u-\frac{\sqrt{2}}{2}h)(u+\frac{\sqrt{2}}{2}h)}}du$$

Then:

$${\int\frac{u+\frac{\sqrt{2}}{2}h}{\sqrt{(u-\frac{\sqrt{2}}{2}h)(u+\frac{\sqrt{2}}{2}h)}}du={\int\sqrt{\frac{u+\frac{\sqrt{2}}{2}h}{u-\frac{\sqrt{2}}{2}h}}du$$

Here is where things began to get circular. I tried integration by parts two times in succession, this lead me back to the original integral (the last one listed above). It seems I either over-complicated the situation, or missed a key step.

Last edited:
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
Thank you, HallsofIvy and SammyS.

Following HallsofIvy's suggestion for the value of u, I did the following:

$$\int_{0}^{\sqrt{2}h}\frac{x}{\sqrt{h^2+x^2-\sqrt{2}hx}}dx\rightarrow{\int\frac{u+\frac{\sqrt{2}}{2}h}{\sqrt{(u^{2}+\frac{h^{2}}{2})}}du\rightarrow{\int\frac{u+\frac{\sqrt{2}}{2}h}{\sqrt{(u-\frac{\sqrt{2}}{2}h)(u+\frac{\sqrt{2}}{2}h)}}du$$
$$u^{2}+\frac{h^{2}}{2}\neq\left(u-\frac{\sqrt{2}}{2}h\right)\left(u+\frac{\sqrt{2}}{2}h\right)$$

$$\left(a+b\right)\left(a-b\right)=a^2-b^2\neq a^2+b^2$$

Break the integrand up:

$$\int\frac{u+\frac{\sqrt{2}}{2}h}{\sqrt{u^{2}+\frac{h^{2}}{2}}}\ du=\int\frac{u}{\sqrt{u^{2}+\frac{h^{2}}{2}}}\ du\ +\ \left(\frac{\sqrt{2}}{2}h\right)\int\frac{1}{\sqrt{u^{2}+\left(\frac{h}{\sqrt{2}}\right)^2}}\ du$$

The first can be done by the substitution $$t= u^2+\frac{h^2}{2}\,,$$ or even better, $$t= \sqrt{u^2+\frac{h^2}{2}}\,.$$

The second by the substitution $$u= \frac{h\,\tan(v)}{\sqrt{2}}\,.$$

Last edited:
Thanks SammyS! After a bit I was able to work out the answer as:

$$\sqrt{x^2-\sqrt{2}hx+h^2}+\frac{\sqrt{2}h}{2}[ln((\frac{\sqrt{2}h}{2})(\sqrt{x^2-\sqrt{2}hx+h^2}+x-\frac{\sqrt{2}h}{2}))]$$

Which after evaluating from 0 to sqrt(2)h gives me:

$$\frac{\sqrt{2}h}{2}[ln(1+\sqrt{2})-ln(\sqrt(2)-1)]$$

Which is the same result as listed in the initial problem. Thanks again! It was good to sharpen my integration skills.