  For relativistic heavy ion collisions, the Bjorken formula is very useful for
estimating the initial energy density once an initial time $\tau_0$ is
specified. However, it cannot be trusted at low energies, e.g. well below
$\sqrt{s_{_{\rm NN}}} \approx 50$ GeV for central Au+Au collisions, when
$\tau_0$ is smaller than the finite time it takes for the two nuclei to cross
each other. Here I extend the Bjorken formula by including the finite time
duration of the initial energy production. Analytical solutions for the formed
energy density in the central spacetime-rapidity region are derived for several
time profiles. Compared to the Bjorken formula at low energies, the maximum
energy density reached is much lower, increases much faster with the collision
energy, and is much less sensitive to the uncertainty of the formation time,
while the energy density time evolution is much longer. Comparisons with
results from a multi-phase transport confirm the key features of these
solutions. The effect of the finite longitudinal width of the initial energy
production, which is neglected in the analytical results, is investigated with
the transport model and shown to be small. This work thus provides a general
model for the initial energy production of relativistic heavy ion collisions
that is also valid at low energies.
