update mathematica codes
use eigenval instead of Ecos^2r in mean IF
simplify