Calculus powered graphical calculator with Python. Enter a function, equality, inequality, or matrix, and Calcupy will try to detect your input and give relevant visuals. Because Calcupy is powered by the SymPy computer algebra system, it is possible to manipulate expressions in the input field (see SymPy syntax).
Quickly jump to a section in this document:
The app has been deployed to https://calcupy.herokuapp.com/
. It may take some time initially, because the server has to wake up if it has not been used for 30 minutes.
Check out the release notes to see what functionality has been developed and released recently.
The roadmap covers a list of functionality that we like to have Calcupy be able to understand. The following areas of mathematics will be added:
- Algebra, calculus, linear algebra
- Graph theory
- Statistics / Probability theory
- Linear programming solvers
- Constraint satisfaction problem (CSP) solvers
Currently the app is in a proof-of-concept mode, which means that we will develop rapidly. In later stages the design patterns that have emerged will be extrapolated, and the entire app will be rebuild around those patterns.
Enter an expression to get started. The calculator will evaluate the expression and determine if it is an expression, equality or inequality. If it is an expression with one variable, a line plot, and single variable calculus is available. If the expression has two variables, a surface, contour and gradient plot are available, as well as multivariable calculus functions. Otherwise there are basic algebra methods available, such as solving for one variable, expanding, factoring, finding factors, and trigonometric expansions.
Based on what type of expression and how many variables there are, the following functionality is available:
Variables | Type | Action |
---|---|---|
0 | Expression | Evaluate |
1+ | Expression, equality, inequality | Simplify |
1+ | Expression, equality, inequality | Expand |
1+ | Expression, equality, inequality | Expand trig |
1+ | Expression, equality, inequality | Factor |
1+ | Expression | Factors |
1 | Expression | Line plot |
1 | Expression | Derivative |
1 | Expression | Second derivative |
1 | Expression | Indefinite integral |
1 | Expression | Integrate from 0 to T |
1 | Expression | Integrate from -inf to inf |
2 | Expression | Surface plot |
2 | Expression | Contour plot |
2 | Expression | Gradient plot |
2+ | Expression | Partial derivatives |
2+ | Expression | Second partial derivatives |
2+ | Expression | Gradient |
2 | Expression | Hessian matrix |
1+ | Equality, inequality | Solve for variable |
0+ | Matrix | Transpose |
0+ | Square matrix | Inverse |
0+ | Square matrix | Determinant |
0+ | Square matrix | Eigenvectors and values |
1 | Column vector | Line plot of vectors |
1 | Matrix 2x1 | Parametric plot 2D |
1 | Matrix 3x1 | Parametric plot 3D |
1 | Matrix NxM where M,N >= 2 | Matrix plot |
0 | Symmetric square matrix | Undirected graph |
0 | Square matrix | Directed graph |
0 | Simple graph | Graph complement |
0 | Graph | Degree matrix |
0 | Undirected graph | Minimum spanning tree (MST) |
1 | Expression | Polar plot |
1 | Matrix | Polar plot |
Not what you want? Submit what you are missing, as an issue, on Github.
The following are examples of expressions that are understood:
- Constants (evaluate):
- One variable:
- Two variables:
- Equalities:
- Inequalities:
- Matrices:
- Parametric:
- Polar:
- Graphs:
There is no UI component yet to change the plot limits. However, it can be done manually by opening the console and entering app.plot_xlim = app.plot_ylim = [-10,10]; app.plot()
.
Algebra simplify
, factor
, expand
, cancel
, apart
, trigsimp
, expand_trig
, ln
, expand_log
, logcombine
, expr.rewrite(sin)
, expr.rewrite(gamma)
, expr.rewrite(exp)
.
Calculus diff(expr, x)
, diff(expr, x, 2)
, expr.diff((x, n))
, integrate(expr, x)
, integrate(expr, (x, 0, oo))
, integrate(expr, (x, -oo, oo), (y, -oo, oo))
, limit(expr x, 0)
, limit(expr, x, oo)
, limit(1/x, x, 0, '+')
, expr.series(x, 0, 4)
, expr.series(x, 0, 4).removeO()
.
Matrices: M.T
, eye(n)
, zeros(n)
, ones(n)
, diag(1, 2, 3)
, M.det()
, M.charpoly(t)
, randMatrix(n)
.
Feel free to contribute! Also, if you have an idea, please let me know (or submit it as an issue on Github)!
Special thanks to all of our contributors!
Made possible by:
- SymPy for computer algebra capabilities.
- Matplotlib for plotting.
- Graphviz for drawing graphs.
- Flask as back-end.
- Vue.js as front-end.
- Mathjax for equation typesetting.
Hosted on Heroku with gUnicorn.