Flux calculation: Velocity gradient REVISED
The equation using Hubble velocity along the line of sight to do the integral:
τu0=πe2λ0mecf12∫nHI√πbexp[−(u−u0b)2]1Hdv, where dv=Hdr is the differential in Hubble velocity along the LOS
For the second form of the equation, using the gas velocity Hr+upec to do the integral, then
dr=|dudr|−1du=|1H+∇upec|duWhere
du=|Hdr+Δupec|is the differential of the gas velocity along the LOS. Note that an absolute value around du is needed to avoid negative values.
τu0=πe2λ0mecf12∫nHI√πbexp[−(u−u0b)2]|1H+∇upec|duNumerically the gradient and the difference are evaluated:
∇upec=ui+1pec−ui−1pec2dr Δupec=ui+1pec−ui−1pec2The comparison of the Flux from the two calculations is below.
The fractional differences in the Flux are ≲!!!
Actually, the term
\frac{H dr + \Delta u_\mathrm{pec}}{ H + \nabla u_\mathrm{pec}} = \frac{H dr + \Delta u_\mathrm{pec}}{ H + \frac{\Delta u_\mathrm{pec}}{dr}} = dr \frac{H + \frac{\Delta u_\mathrm{pec}}{r}}{ H + \frac{\Delta u_\mathrm{pec}} {dr}} = drWhich of course should hold from the Jacobian of the transformation. Then this becomes the original form of the equation just changing dr = H^{-1} dv
The issue that I had before was that I was missing the term \Delta u_\mathrm{pec} in du.