# calculation and analysis – How to avoid overflow by taking derivative?

``````m0 = 0.0055;
Gs = 10.08;
gv[x_] : = x * Gs;
M[s_] : = m0 - Gs * s;
Ep[s_, p_] : = (M[s]^ 2 + p ^ 2) ^ (1/2)
moult[n_, mu_, x_] : = mu - Gv[x]* not;

fn[s_?NumericQ, n_?NumericQ, T_?NumericQ, mu_?NumericQ,
x_?NumericQ] : = - (6 / [Pi]^ 2) T NIntegrate[
p^2 (Log[1 + Exp[-((Ep[s, p] - moulting[n, mu, x]) / T)]]+
Log[1 + Exp[-((Ep[s, p] + moulting[n, mu, x]) / T)]]), {p,
0, [Infinity]}, AccuracyGoal -> 8]dfndmu[s_?NumericQ, n_?NumericQ, T_?NumericQ, mu_?NumericQ,
x_?NumericQ] : = D[fn[s, n, T, mud, x], mud]/. {mud -> mu}

dfndT[s_?NumericQ, n_?NumericQ, T_?NumericQ, mu_?NumericQ,
x_?NumericQ] : = D[fn[s, n, Td, mu, x], Td]/. {Td -> T}

dfndmu[-0.03, 0.05, 0.1, 0.1, 0.2]

dfndT[-0.03, 0.05, 0.1, 0.1, 0.2]
``````

I'm trying to take the derivative with respect to T and mu. For all values ​​of mu, I can evaluate 'dfndmu', but for small values ​​of T, I can not evaluate 'dfndT'. This shows an overflow problem. How can I heal it?