def Ft_rho_y(rho,y,T):
	taun=tau_N_rho_y(rho,y,T)
	taup=tau_P_rho_y(rho,y,T)
	ek=(taun+taup)*hbarc**2/(2.0*M*rho)
	ei=(-0.25 *t0 *(-1.0+x0 *(1.0-2.0 *y)**2 + 2.0*(-1.0 + y)*y)*\
	rho-1.0/24.0*t3*(-1.0+x3*(1.0-2.0*y)**2 \
	+2.0*(-1.0 + y)*y)* rho**(1.0 +  alpha) + \
	1/8.0*rho*(a*(taun+taup) + \
	2.0*b*((1.0-y)*taun+y*taup)))
	st=(s_f(mn(rho,y),un(rho,y),T,mu_N(rho,y,T))\
	+s_f(mp(rho,y),up(rho,y),T,mu_P(rho,y,T)))/rho
	return (ek+ei-T*st)
def Pt_rho_mun_mup(rho,y,MUN,MUP,T):
	MN,UN=mn(rho,y),un(rho,y)
	MP,UP=mp(rho,y),up(rho,y)
	taun=tau_f(MN,UN,T,MUN)
	taup=tau_f(MP,UP,T,MUP)
	sn=s_f(MN,UN,T,MUN)
	sp=s_f(MP,UP,T,MUP)
	ek=(taun+taup)*hbarc**2/(2.0*M)
	ei=rho*(-0.25 *t0 *(-1.0+x0 *(1.0-2.0 *y)**2 + 2.0*(-1.0 + y)*y)*\
	 rho-1.0/24.0*t3*(-1.0+x3*(1.0-2.0*y)**2 \
     +2.0*(-1.0 + y)*y)* rho**(1.0 +  alpha) + \
     1/8.0*rho*(a*(taun+taup)) + \
     2.0*b*((1.0-y)*taun+y*taup))
	return rho*(MUN*(1.0-y)+y*MUP)+T*(sn+sp)-ek-ei
def dmpdy(rho,y):
	return 0.0-b*rho/(2.0*hbarc**2)*mp(rho,y)**2
def dmpdrho(rho,y):
	return 0.0-(a+2.0*b*y)/(4.0*hbarc**2)*mp(rho,y)**2
def St_rho_y(rho,y,T):
	return (s_f(mn(rho,y),un(rho,y),T,mu_N(rho,y,T))\
	+s_f(mp(rho,y),up(rho,y),T,mu_P(rho,y,T)))/rho
def s_P_rho_y(rho,y,T):
	return s_f(mp(rho,y),up(rho,y),T,mu_P(rho,y,T))/rho	
def tau_P_rho_y(rho,y,T):	
	return tau_f(mp(rho,y),up(rho,y),T,mu_P(rho,y,T))
def mu_pt0(rho,y,T):
	return up(rho,y)+(3.0**(2.0/3.0)*np.pi**(4.0/3.0)*rho**(2.0/3.0)*fm**(-2.0))/(2.0*mp(rho,y))
def tau_p_rho(rho,y,mup,T):	
	return tau_f(mp(rho,y),up(rho,y),T,mup)