Okay this really doesn't belong in this forum but I thought I had better relay what I have found anyway.

It appears that within the example problem the part $\displaystyle e^h=\sec(x)$ assumes that the constant of integration from $\displaystyle h=\int\!p\,dx$ is ignored while evaluating (4). This comes from the derivation of (4) which I shouldn't post here because it is ODE related.

Adding in the constant of integration:

$\displaystyle h=\int\!p\,dx=\int\!\tan (x)\,dx=\ln{|\sec (x)| + c_1}$

$\displaystyle e^h=e^{\ln{|\sec (x)|}+c_1}=e^{c_1}|\sec(x)|$

$\displaystyle e^{c_1}|\sec(x)|=c_2\sec(x)\quad where\,(c_2=\pm{e^{c_1}})$

The constant $\displaystyle c_2$ is ignored while evaluating (4) and hence the absolute value vanishes