Multifractals from IFS

Simplified formulas

In the special case that the scaling factors r1, r2, ..., rN all are equal, the formulas for α and f(α) can be simplified.
 
First note that in this case the expression for τ(q),
p1qr1τ(q) + p2qr2τ(q) + ... + pNqrNτ(q) = 1
reduces to
p1qrτ(q) + p2qrτ(q) + ... + pNqrτ(q) = 1
This can be solved explicitly for rτ(q)
rτ(q) = 1/(p1q + p2q + ... + pNq)
and so τ(q) is given by
τ(q) = -Log(p1q + p2q + ... + pNq) / Log(r)
 
Next, the expression for α simplifies to
α(q) = (rτ(q) (p1qLog(p1) + ... + pNqLog(pN))) / (rτ(q) Log(r) (p1q + ... + pNq))
hence to
α(q) = (p1qLog(p1) + ... + pNqLog(pN)) / (Log(r) (p1q + ... + pNq))
 
Finally, combining these f(α(q)) can be computed explicitly from the familiar formula
f(α(q)) = q*α(q) + τ(q)
The f(α) curve can be approximated by letting q range from some negative value, say q = -10, to some positive value, say q = 10, in fairly small steps. This avoids the substantial headaches involved in trying to write f and an explicit, even if only approximate, function of α.
 
For N = 4 and r = 0.5, we have
f(α(q)) = q (p1qLog(p1) + ... + p4qLog(p4)) / (Log(0.5) (p1q + ... + p4q))
- Log(p1q + ... + p4q) / Log(0.5)