I've got a microeconomics question that involves rearranging an equation with summation, where the only constant are $1$ and $r$.
Firstly this is the equation stating that across individuals $i=1$ to $n$ demand for period 1 consumption $(x_1)$ should equal the supply of period 1 money $(e_1)$.
So this states the total demand for money across all individuals is equal to the supply of money in period 1 when the interest rate is optimum, my question is how would you rearrange this equation when the demand function for individual $i$ is substituted in to this equation so when:
So substituting this derived demand function can be plugged into equation $$ gives this:
Ignoring the economic details how do you just make $(1+r)$ the subject of this equation?