Hi, im only new here. I need a hand trying to rewrite a quartic polynomial so as to non dimensionalise it in order to input it in to a matlab routine. In its original form it reads

f(r)=k - 2M/r + Z^2/r^2 + r^2/L^2, where it has a zero at r=r+, f(r+)=0

=> f(r)= 1/r^2 {kr^2 - 2Mr + Z^2 + r^4/L^2}

= 1/r^2 [(r-r+) {Ar^3 + Br^2 +Cr + D}]

I've been informed that changing variables to u=r+/r will simplify this and the result should be as follows

f(u) = u^2*(1-u)[1 + u + u^2 + u^2*L^2(k-Z^2*u)]

As you can see the factor of "M" is now gone. This is what is baffling me most. Naturally im not looking for anyone to do this for me, but any advice would be greatfully appreciated. Ive tried factoring the term in squiggley brackets and have got nothing like the answer... perhaps im being stupid about this.. it should be fairly basic. Any help would be appreciated.

It should be noted that "r" is the only variable here.