LateX/Python hybrid that symbolically solves equations on the fly. Works for most integrals and derivatives. The basic syntax is as follows:

$$ {expression} = \eval{expression} $$

The symbolic computation is performed over SymPy


We're Physics/Math/Astronomy majors and writing LaTeX reports for upper division homeworks is a nasty part of the job description - especially since the integrals tend to get extremely cumbersome. In response, we wrote a LaTeX module that feeds your derivatives and indefinite integrals through an open source symbolic processor (SymPy) and inserts it - formatted - into your LaTeX document with a single command (\eval).

How We Built it

We wrote a parser that takes a LaTeX input string, parses it into a format that SymPy can work with and then process the output back into LaTeX. We also defined a latex routine that calls said Python script and feeds the answer back into the string with a single command


Math has a lot of different ways of writing things. These materialized as corner cases that we had to painstakingly debug one at a time. The parser also uses a significant amount of regex - and all the associated nastiness

Things we Learned

  1. SymPy can do - almost - everything that Mathematica can
  2. Math has a lot of horrible corner cases
  3. LaTeX needn't be therapy inducing.

Tools we used

  1. Python: The answer to every problem in the universe
  2. LaTeX: Typesets math
  3. SymPy: Python's cure-all open-source symbolic processor
  4. Regex: Regular Expressions. Beautiful for pattern matching.

Built With

Share this project: