# Taking recursivity out of an algebraic equation through manipulation

wizards with all your mental esoterica. I'm a lowly peasant who never took more than high-school precal. Here is my question:

I've got an equation:

margY = (imageHeight + (2*margY))*mYRatio;

margY is on both sides of this equation. I'd like to get it on one side by itself. In a sense, taking the recursivity out of the definition of margY. Is this a mathematical chimera? Sounds like a mystical achievement. But my lowly mind sniffs a vague intuition that there is some algabraic manipulation for it, just too lowly to figure it out.

-

$$\text{margY} = \text{imageHeight} \text{*} \text{mYRatio} + 2\text{margY}\text{*}\text{mYRatio},$$ so
$$\text{margY} - 2\text{margY}\text{*}\text{mYRatio}= \text{imageHeight} \text{*} \text{mYRatio} ,$$ so $$\text{margY}(1 - 2\text{*}\text{mYRatio})= \text{imageHeight} \text{*} \text{mYRatio} ,$$ and thus $$\text{margY}= \frac{\text{imageHeight} \text{*} \text{mYRatio}}{1 - 2\text{*}\text{mYRatio}} ,$$ provided that mYRatio is not $1/2$.