dNdx s quark

Clear[sb1, sn2, sd1, sp]; 
Clear[sa1b1, sb1b1, sab1, sbb1, scb1, sdb1, sa2b1]; 
Clear[sa1n2, sb1n2, sa2n2, sb2n2]; 
Clear[sa1d1, sb1d1, sa2d1, sb2d1]; 
Clear[sa1p, sb1p, sa2p, sb2p]; 
sb1[M_] := sa1b1*M^sb1b1*UnitStep[M - 1000] + (10^(2.65*Log[M/0.945^2]^0.99^2 - 2.47*Log[M]) - (9.07/10^7)^2)*
     UnitStep[999.9999 - M]*UnitStep[M - 50]; 
sa1b1 = 4.53943; 
sb1b1 = 0.0339128; 
sab1 = 2.64536; 
sbb1 = 9.06544/10^7; 
scb1 = -0.9896; 
sdb1 = 0.945152; 
sa2b1 = -2.47248; 
sn2[M_] := sa1n2*M^sb1n2 + sa2n2*M^sb2n2; 
sa1n2 = 0.744; 
sb1n2 = -0.0353; 
sa2n2 = 3.68; 
sb2n2 = -1.01; 
sd1[M_] := sa1d1*M^sb1d1 + sa2d1*M^sb2d1; 
sa1d1 = 0.414; 
sb1d1 = -0.0588; 
sa2d1 = 0.621; 
sb2d1 = -0.674; 
sp[M_] := sa1p*M^sb1p*UnitStep[M - 100] + sa2p*M^sb2p*UnitStep[99.99999 - M]; 
sa1p = 12.8; 
sb1p = 0.732; 
sa2p = 4.01; 
sb2p = 0.981; 
Clear[logs, stotal, M, x]; 
logs[M_, x_] = 0.00024*Log[sp[M]*(1. - x)]*x^0.5*(x^2 - 2*x + 2); 
stotal[M_, x_] := 4.83*Exp[(-sb1[M])*x^2.03 - 0.335/x^sd1[M] - 6.5*x^sn2[M]] + logs[M, x];

Plot[stotal[5000,x],{x,0.0001,0.5},PlotRange->All]