Step 1: Write the relation for volume expansion.
The coefficient of volume expansion is given by
\[
\beta=\frac{\Delta V}{V\,\Delta T}
\]
Hence,
\[
\frac{\Delta V}{V}=\beta \Delta T
\]
Given,
\[
\beta=5\times 10^{-4}\,^\circ\text{C}^{-1}
\]
and
\[
\Delta T=40^\circ\text{C}
\]
Therefore,
\[
\frac{\Delta V}{V}
=(5\times 10^{-4})(40)
\]
\[
\frac{\Delta V}{V}
=2\times 10^{-2}
\]
\[
\frac{\Delta V}{V}
=0.02
\]
Step 2: Relate density and volume.
Density is given by
\[
\rho=\frac{m}{V}
\]
Since mass remains constant,
\[
\rho \propto \frac{1}{V}
\]
Therefore, for small changes,
\[
\frac{\Delta \rho}{\rho}
=
-\frac{\Delta V}{V}
\]
Substituting the value obtained above,
\[
\frac{\Delta \rho}{\rho}
=
-0.02
\]
The negative sign indicates that density decreases as temperature increases.
Step 3: Find the fractional change in density.
The magnitude of the fractional change in density is
\[
\left|\frac{\Delta \rho}{\rho}\right|
=0.02
\]
Step 4: Final conclusion.
Therefore, the fractional change in density is nearly
\[
\boxed{0.02}
\]