Changed integrate_primitive_polynomial from recursive to iterative 

Solved the cases such as risch_integrate(log(x),x)

Earlier
>>risch_integrate(log(x),x)
RuntimeError: maximum recursion depth exceeded while calling a Python object


Now
>>risch_integrate(log(x),x)
fives answer within few seconds without any recursion limit getting exceeded