# W. W. Hansen's Trick to Evaluating Integrals

• marcusl
In summary, the author E. T. Jaynes relates that Prof. Hansen at Stanford evaluated integrals by treating constants like pi in an integrand as a variable. Sounds fantastic, but I am not sure how this is done.
marcusl
Gold Member
In "Probability Theory: The Logic of Science", the author E. T. Jaynes relates that Prof. Hansen at Stanford evaluated integrals by treating constants like pi in an integrand as a variable. Sounds fantastic! Does anyone know how this is done?

I am going out on a limb here, and this is probably wrong. But the one thing that comes to my mind is the fact that
$$\int_{0}^{a} f(x) \mathrm{d}x = \int_{0}^{a} f(a-x) \mathrm{d}x$$
For an concerete example, let us evaluate
$$\int_{0}^{\pi/2} \frac{\sin x}{\cos x + \sin x} \mathrm{d}x$$
I am sure you can fill in the rest, using the hint above =)
If this is not the trick, I am very interested in it as well!

I'm guessing the trick amounts to replacing a constant in the integrand (or integration limits) with a variable, which allows you to then differentiate (integrate) with respect to that variable to make the integral easier to do. At the end of the calculation you integrate (differentiate) to get the original result you wanted. The classic example is evaluating Gaussian integrals. Consider

$$\int_{-\infty}^\infty dx~x^2 \exp\left(-x^2\right)$$

You could try substitution to evaluate this, but if you know the result $\int_{-\infty}^\infty dx~\exp\left(-ax^2\right) = \sqrt{\pi/a}$ you can easily solve the integral as follows: first, insert a variable 'a' into the exponential, then note

$$\int_{-\infty}^\infty dx~x^2 \exp\left(-a x^2\right) = -\frac{\partial }{\partial a}\left(\int_{-\infty}^\infty dx~\exp\left(-a x^2\right)\right) = -\frac{\partial }{\partial a}\left(\frac{\pi}{a}\right)^{1/2} = \frac{1}{2}\frac{\sqrt{\pi}}{a^{3/2}}$$

Setting a = 1 gives the result of the original integral.

Neb, I don't see how what you wrote is at all useful...

Mute, now that's another story! This is very clever.

thx

## 1. How does W. W. Hansen's trick work?

W. W. Hansen's trick, also known as the Hansen-Horn method, is a technique for evaluating integrals that involve logarithmic, exponential, and trigonometric functions. It involves rewriting the integrand in terms of a new variable, making a substitution, and using a table of known integrals to solve the resulting integral.

## 2. Is W. W. Hansen's trick applicable to all types of integrals?

No, W. W. Hansen's trick is most useful for integrals involving logarithmic, exponential, and trigonometric functions. It may not be applicable to other types of integrals, such as those involving polynomial functions.

## 3. How accurate is W. W. Hansen's trick?

W. W. Hansen's trick is a reliable method for evaluating integrals, but like any mathematical technique, it is prone to errors if not applied correctly. It is important to carefully follow the steps and make accurate substitutions in order to get an accurate result.

## 4. Can W. W. Hansen's trick be used for indefinite integrals?

Yes, W. W. Hansen's trick can be used for both definite and indefinite integrals. For indefinite integrals, the resulting integral can be solved using integration by parts or other techniques.

## 5. Are there any limitations to using W. W. Hansen's trick?

One limitation of W. W. Hansen's trick is that it can only be used for integrals with a single variable. Additionally, it may not work for certain complicated integrals or for integrals with irrational or transcendental functions. In these cases, other integration techniques may be more suitable.

Replies
4
Views
919
Replies
9
Views
4K
Replies
2
Views
2K
Replies
15
Views
2K
Replies
3
Views
3K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
5
Views
1K
Replies
2
Views
4K
Replies
4
Views
3K