Solution (source code)

= Solution

Write $m(r)$ for enclosed mass. The <stellar hydrostatic equation> is $dP/dr=-Gm\rho/r^2$. If <radiation pressure> dominates, compare it directly with the <radiative diffusion> result for $dP_r/dr$:
$$
\frac{\kappa\rho L}{4\pi r^2c}\simeq\frac{Gm\rho}{r^2},\qquad
\boxed{L\simeq\frac{4\pi Gc}{\kappa_{\rm th}}M\propto M.}
$$
This is the limiting <Eddington luminosity> scaling, assuming fixed composition and electron-scattering <opacity>.

If gas pressure dominates, use <stellar homology>: characteristic density $\rho\sim M/R_*^3$ and pressure $P\sim GM^2/R_*^4$. The <ideal gas law> then gives
$$
T\sim\frac{\mu m_H}{k_B}\frac{GM}{R_*}.
$$
Estimating $|dT/dr|\sim T/R_*$ in <radiative diffusion> gives
$$
L\sim\frac{ac}{\kappa}\frac{R_*T^4}{\rho}
\propto\frac{\mu^4M^3}{\kappa}.
$$
Thus at fixed $\mu$ and constant electron-scattering <opacity>, $\boxed{L\propto M^3}$. These are <stellar homology> estimates for radiative <stars>, not exact relations valid for arbitrary composition and internal transport.