Messing about with the sympy module, specifically the lambdify function. Figured out a way to calculate both the integral and the derivative; this should form an important part of the model.