TeX source:
C=27 \mathrm{w}^{2}+40 \mathrm{wh}=27 \mathrm{w}^{2}+40 \mathrm{w}\left(\frac{100}{3 \mathrm{w}^{2}}\right)=27 \mathrm{w}^{2}+\frac{4000}{3 \mathrm{w}}