Solution (source code)

= Solution

For <dynamical dark energy>, use $dz/dt=-(1+z)H$ in the continuity equation to obtain
$$
\frac{d\log\rho_{\rm DE}}{dz}
=\frac{3[1+w(z)]}{1+z}.
$$
Therefore the <variable dark-energy equation of state> gives
$$
\rho_{\rm DE}(z)=\rho_{{\rm DE},0}(1+z)^3
\exp\left[3\int_0^z\frac{w(z')}{1+z'}\,dz'\right].
$$
Combining this with $\rho_m=\rho_{m,0}(1+z)^3$ in the <Friedmann equation> yields
$$
\boxed{H(z)=H_0\left\{
\Omega_{m,0}(1+z)^3
+\Omega_{{\rm DE},0}(1+z)^3
\exp\left[\int_0^z\frac{3w(z')}{X(z')}\,dz'\right]
\right\}^{1/2}},
$$
where
$$
\boxed{X(z)=1+z}.
$$
This is the <Hubble parameter for matter and dynamical dark energy>.