dNdx muon

Clear[muq,mup,mul];
Clear[muap,mubp,mucp,mudp,mua3p];
Clear[mua1p,mub1p,mua2p,mub2p];
Clear[mua1q,mub1q,mua2q,mub2q];
Clear[mua1l,mub1l,mua2l,mub2l];

mup[M_]:=mua1p*(M^mub1p)*(UnitStep[M-25]*UnitStep[99.9999-M])+(51.90051899341779+(10^5)*(10^((-0.864829)*((Log[M/(9.93778^2)])^(0.04024^2))+0.227712*Log[M])-(1.00098^2)))*UnitStep[M-100]*UnitStep[999.9999-M]+mua2p*(M^mub2p)*UnitStep[M-1000]*UnitStep[50000-M];



muap=-0.864829;
mubp=1.00098;
mucp=-0.04024;
mudp=9.93778;
mua3p=0.227712;


mua1p=175.726;
mub1p=1.24664;

mua2p=4520.11;
mub2p=0.653414;


muq[M_]:=mua1q*(M^mub1q)+mua2q*(M^mub2q);

mua1q=0.00229539;
mub1q=-0.911138;
mua2q=0.00290582;
mub2q=0.0347783;


mul[M_]:=mua1l*(M^mub1l)*UnitStep[M-25]+mua2l*(M^mub2l)*UnitStep[50000-M];

mua1l=0.626118;
mub1l=-0.0300374;
mua2l=16.3699;
mub2l=-1.34148;


Clear[logmu,mutotal,x];
logmu[M_,x_]=muq[M]*(Log[mup[M]*(1.0-(x^(mul[M])))])*(x^0.5)*(x^2-2*x+2);


mutotal[M_,x_]:=logmu[M,x];

Plot[mutotal[5000,x],{x,0.0001,1.0},PlotRange->All]