# How to force Mathematica to plot the log function correctly for the given argument?

Consider functions

logargument[p_, q_, mp_] =
(-mp^2 - p q + Sqrt[mp^2 + p^2] Sqrt[mp^2 + q^2])/(-mp^2 + p q +
Sqrt[mp^2 + p^2] Sqrt[mp^2 + q^2]);

Qp[mS_, p_, mp_] =
1/(2*mp^2)*
Sqrt[2*p^2*mS^4 - 2*p*mS^4*Sqrt[p^2 + mp^2] - 4*mp^2*p^2*mS^2 +
4*mp^2*p*Sqrt[p^2 + mp^2]*mS^2 + 4*p^2*mp^4 + mp^2*mS^4 -
4*mS^2*mp^4];

I have a problem when trying to plot the function Log[logargument[p,Qp[mS,p,mp],mp]] for small mS. Namely, the plot

Plot[{Log[logargument[10, Qp[mS, 10, 1], 1]]}, {mS, 10^-4, 10^-3}]

doesn't show the behavior correctly, since for such small mS the function returns Indeterminate. This is due to asymptotic behavior of the logargument function for large p and very small mS (and for mp in between), which is $$\tag 1 \frac{m_{S}^{4}m_{p}^{2}}{64p^{6}}$$ This can be shown by using the code

qpapprox[p_, mS_] =
Assuming[p > 0 && mp > 0,
Normal@Series[Normal@Series[Qp[mS, p, mp], {mp, 0, 4}], {mS, 0, 4}]];
logargumentapprox[p_, mS_, mp_] =FullSimplify[
Assuming[mS^2 - 4 p^2 < 0 && p > 0,
Normal@Series[
Normal@Series[
logargument[p, qpapprox[p, mS], mp], {mp, 0, 2}], {mS, 0, 4}]]]

My questions are the following. How to force Mathematica to plot the logarithm of logargument function correctly? The problem is that this logarithm enters another very complicated function of arguments p,mp,mS which I need to plot for arbitrary mS including large ones, for which the problem disappears, and I thus can't simply replace the function logargument by its approximation $(1)$.

• Try LogPlot[{logargument[10, Qp[mS, 10, 1], 1]}, {mS, 10^-4, 10^-3}, WorkingPrecision -> 20]. Related: 3152 Feb 22, 2018 at 19:21