This is a classical way to calculate Lyapunov exponent
\[Lambda][r_] := Module[{f, l},
f[x_] := μ x (1 - x);
l[x_] := Log[Abs[μ (1 - 2 x)]];
Mean[l[NestList[f, 0.1, 1*^2]]]];
Plot[λ[μ], {μ, 0, 4}, PlotStyle -> Thickness[.0001],
AxesLabel -> {"μ", "λ(μ)"}]
No problem it works nicely. There are two problems
1) I have earlier in my code defined $f[x\_, \mu\_]$ and I would like not to redefine $f$. 2) In the code one pass the derivative by hand --- μ (1 - 2 x) ---. I have tried to add a function $g$ in the module which calculate the derivative but this doesn't work.
How could I do ? I think 1) is perhaps impossible with a module but 2) ?

r? it's never used... – BlacKow Oct 14 '16 at 20:02