lab01 full source code - seems to be working, though the approximation is not very good (3 times difference with real solution)