# Area of a recursive function

What is the area of the region bounded by $y = f_n(x)$ and the $x$-axis as $n$ gets large?

$f_0=1-|x|$
$f_n=1-|1-2f_{n-1}(x)|$

Assume the domain of $f$ to be the real numbers.

By trying various values for $n$ and $x$ I got that $f_n(x) = 2^{n}\cdot f_0(x)$

By integrating this I got that the area is given by $2^{n-1}\cdot x\cdot (2-|x|)$.

However, I was also told that the area is in fact $1$ as $n$ approaches infinity.

The formula I came up with (guessed) seems to check out if I integrate $2^{n-1}\cdot f_0(x)$ between certain values and for a certain $n$ and compare it to manually expanding that certain $f_n$ and integrating it between the same values.

My questions are:

1. Is my formula wrong?
2. How can we prove the area is 1?
-
Is the domain of f defined? Or do we take -infinity to infinity? –  Aryabhata Sep 8 '10 at 13:29
@Moron - take -inf to inf. –  IVlad Sep 8 '10 at 13:39
Your formula seems wrong: f_1(0) is 0 while your formula gives 1. –  Aryabhata Sep 8 '10 at 13:46
@Moron - true, I see it now. I just realized the formula was supposed to contain $n$ instead of $n - 1$, otherwise the integral doesn't match. Still wrong though. –  IVlad Sep 8 '10 at 13:54
@IVlad: Are you sure it is -∞ to ∞ instead of -1 to 1? –  KennyTM Sep 8 '10 at 15:13

You must be integrating between -1 and 1; otherwise, the integral diverges. Within this region, $f_n$ is a periodic sawtooth. This is obvious by following the steps geometrically for any one of the teeth: $-2f_{n-1}$ doubles the height of $f_{n-1}$ and flips the graph over the x-axis, which is then raised by $1$. The absolute value creates a new "tooth", and then subtracting all that from $1$ flips everything over. The process converts each tooth into a pair of teeth of the same height but half the width, whence the new teeth have half the original area of the teeth they have replaced. Two of them occupy the original area. Therefore, by induction, the integrals of all the $f_n$ between -1 and 1 equal the integral of $f_0$, which is 1.