If you replace P(1+IR) with
a, you have:
Unfortunately there is no closed form solution to express a in terms of M and n. If n = 2 you can use the quadratic equation to solve for
a. But other than that case - you're limited to using numerical techniques to estimate
a. Once you have that estimate then IR=(a/P)-1