Calca - Humane Symbolic Calculator for OS X and iOS
calca.io
calca.io
* Soulver allows free text editing within a line of computation; Calca allows free editing in the entire file
* Both update as you type
* Soulver understands arithmetic; Calca knows algebra, calculus, and algorithms
* Soulver requires that all variables be defined; Calca does not
* Soulver does not support user defined functions; to Calca, everything is a function
* Soulver has no programming constructs; Calca is one step away from being a general purpose programming language.
* Soulver does not support matrices; Calca does
http://ipython.org/notebook.html
I think it does what you want