analytical solution for m = 20; for K > 30 results start to be numerically unstable.