Implemented code to compute equations.