

October 6, 2026
The stellar initial mass function of Kroupa (2001) is a broken power law:
\[ \frac{dN}{dM_\star} \propto M_\star^{-\alpha}, \qquad \alpha = \begin{cases} 0.3 & M_\star < 0.08\,M_\odot \\ 1.3 & 0.08\,M_\odot \le M_\star < 0.5\,M_\odot \\ 2.3 & M_\star \ge 0.5\,M_\odot \end{cases} \tag{1}\]
Figure 1 plots Equation 1 per logarithmic mass interval.
import numpy as np
import matplotlib.pyplot as plt
m = np.logspace(-2, 2, 400)
dNdm = np.where(m < 0.08, (m / 0.08) ** -0.3,
np.where(m < 0.5, (m / 0.08) ** -1.3,
(0.5 / 0.08) ** -1.3 * (m / 0.5) ** -2.3))
dNdlogm = m * dNdm
# one plot per theme; the light one doubles as the listing thumbnail and preview image
for fg, bg in [("black", "white"), ("white", "#222")]:
with plt.rc_context({"text.color": fg, "axes.edgecolor": fg, "axes.labelcolor": fg,
"xtick.color": fg, "ytick.color": fg}):
fig, ax = plt.subplots(figsize=(5, 3.5), facecolor=bg)
ax.set_facecolor(bg)
ax.loglog(m, dNdlogm / dNdlogm.max(), color=fg)
ax.set(xlabel=r"$M_\star\,(M_\odot)$", ylabel=r"$dN/d\log M_\star$ (normalized)")
plt.show()

STARFORGE simulations (Grudić et al. 2021) form stars out of a giant molecular cloud and get an IMF of roughly this shape: