0

When I solve an equation using SymPy, it would be nice to learn what it actually did to find the solutions.

The following is a simple test case for answers. We know it should be using the quadratic equation, or some equivalent approach.

from sympy import *
>>> x = Symbol('x', real=True)
>>> solve(2*x**2 + 12*x + 12)
[-3 - sqrt(3), -3 + sqrt(3)]

Is some way of filtering through a record of the execution stack, or something else to extract what steps were useful to SymPy in solving a problem? I imagine some sort of tree-like search of steps is taken by SymPy, and a record of the stack calls would have to be pruned/simplified somehow.

Galen
  • 1,128
  • 1
  • 14
  • 31

0 Answers0