Rewriting the equation for the virial mass of a cluster I have a question that I don't know how to solve, any help is appreciated.
Here it is:
Rewrite the equation for the virial mass of a cluster so that if velocities are entered in km/sec and dimensions in Mpc, the resulting mass is in solar mass
Well the equation is: $M=\frac{5(v_r)^2R}{G}$ 
I think I have to use dimensional analysis but I really don't know how to get there
$[M]=\frac{(\frac{km}{s})^2km}{\frac{m^3}{kg*s^2}}$
with one Mpc being $3.09*10^{17}$ km
Thanks in advance :)
 A: This is a very common (and quite subtle) thing done, especially in astrophysics, that is extremely useful to master.  It can be a little tricky at first, but it isn't bad.  The idea is just to convert standard equations into units that are a little more convenient.  The key is to remember that units (like grams, years, or solar-masses) are quantities that can be canceled out in equations just like variables or other numbers.  
Let's work with a simpler example: kinetic energy.
$$E = \frac{1}{2} m v^2$$
If we want to calculate energy from the above equations, we put in values on the right, and get an answer out.  If we want our answer in erg (the standard CGS unit for energy, s.t. $1 \, \rm{erg} = 10^{-7} \, \rm{Joule}$), then we need to put our mass in grams, and our velocity in cm/s.  That's because $1 \, \rm{erg} \equiv g \, \rm{cm}^2/\rm{s}^2$.  We could build this into our equation, by rewriting it as:
$$\frac{E}{1 \, \rm{erg}} = \frac{1}{2} \left(\frac{m}{1 \, \rm{g}}\right) \left( \frac{v}{1 \, \rm{cm/s}} \right)^2$$
or equivalently (just multiplying both sides by $(1 \, \rm{erg})$ as,
$$E = 1 \, \rm{erg} \cdot \frac{1}{2} \left(\frac{m}{1 \, \rm{g}}\right) \left( \frac{v}{1 \, \rm{cm/s}} \right)^2.$$
This makes it very clear that if I plug in the mass in grams, and the velocity in cm/s, then I get out a number of ergs.
But what if we want to use different units?  For example, what if I want to use (US "short") tons for mass?  That's simple.  We know (or can google search) that, $1 \rm{ton} = 907,185 \rm{grams} \approx 9 \times 10^{5} \rm{grams}$.  That means that $1 = (9 \times 10^{5} \rm{grams}) / (1 \, \rm{ton})$.  So, we just need to multiply the initial equation by that conversion factor:
$$E = 1 \, \rm{erg} \cdot \frac{1}{2} \left(\frac{m}{1 \, \rm{g}}\right) \left(\frac{9 \times 10^{5} \rm{grams}}{1 \, \rm{ton}}\right) \left( \frac{v}{1 \, \rm{cm/s}} \right)^2.$$
The grams cancel on the top and bottom, and we're left with:
$$E = 9 \times 10^{5} \, \rm{erg} \cdot \frac{1}{2} \left(\frac{m}{1 \, \rm{ton}}\right) \left( \frac{v}{1 \, \rm{cm/s}} \right)^2.$$
But what if we also want to use miles-per-hour for the velocity?  We know that, $1 \rm{mph} \approx 45 \rm{cm/s}$, so:
$$E = 9 \times 10^{5} \, \rm{erg} \cdot \frac{1}{2} \left(\frac{m}{1 \, \rm{ton}}\right) \left( \frac{v}{1 \, \rm{cm/s}} \right)^2 \left( \frac{45 \, \rm{cm/s}}{1 \rm{mph}} \right)^2.$$
Now, the $(\rm{cm/s})^2$ cancels, and we use: $45^2 \cdot 9\times 10^5 \approx 2000 \cdot 9 \times 10^5 \approx 2 \times 10^9$...
$$E = 10^{9} \, \rm{erg} \cdot \left(\frac{m}{1 \, \rm{ton}}\right) \left( \frac{v}{1 \, \rm{mph}} \right)^2.$$
(Note that I canceled out the factor of 1/2).
This equation is much more convenient for calculating the energy of a speeding car (for example) because the units are much nearer to unity (1.0).  For example, it's easy to see that a 2 ton car, going at 10 mph, has ($2 \times 10^2 \times 10^9 = $) 200 billion ergs of kinetic energy!

Try using these methods on your particular problem.  You can edit your question to show your work.  If you're still having trouble just comment on this answer to let me know.
