 # 36 analysis/integral.p

## Description

This article is from the Puzzles FAQ, by Chris Cole chris@questrel.questrel.com and Matthew Daly mwdaly@pobox.com with numerous contributions by others.

# 36 analysis/integral.p

If f is integrable on (0,inf) and differentiable at 0, and a > 0, and:

```      inf           f(x)
Int        ----------------  dx is defined
0             x
```

show:

```      inf     ( f(x) - f(ax) )
Int        ----------------  dx   = f(0) ln(a)
0             x
```

analysis/integral.s

First, note that if f(0) is 0, then by substituting u=ax in
the integral of f(x)/x, our integral is the difference of two
equal integrals and so is 0 (the integrals are finite because f is
0 at 0 and differentiable there. Note I make no requirement of
continuity).

Second, note that if f is the characteristic function of the
interval [0, 1]--- i.e.

```		1, 0<=x<=1
f (x) =
0 otherwise
```

then a little arithmetic reduces our integral to that of
1/x from 1/a to 1 (assuming a>1; if a <= 1 the reasoning is similar),
which is ln(a) = f(0)ln(a) as required. Call this function g.

Finally, note that the operator which takes the function f to the
value of our integral is linear, and that every function meeting the
hypotheses (incidentally, I should have said `differentiable from the right',
or else replaced the characteristic function of [0,1] above by that of
(-infinity, 1]; but it really doesn't matter) is a linear combination of
one which is 0 at 0 and g, to wit

```	f(x) = f(0)g(x) + (f(x) - g(x)f(0)).
```

Continue to: