Function uses formula method and returns b coefficients (nothing more). Fast matrix calculations.