Python software which can solve mathematics

it took me 3 years to make this software

it is 1000s of lines of code

math equations are tree data structures. it has nodes like function names, variables and integers in them decorated with brackets.

this is the tree of the equation “sin(x)^2 + cos(x)^2 = 1”

in my software there many function, even though among all of them god() function is the most useful and important function.

god() internally uses all other functions in the library to do maths.

  1. god = solves a math problem automatically with steps
  2. simplify = simplify equation by merging like terms and removing unnecessary terms
  3. expand = expansion of equation and distributive property
  4. fraction = cross multiplication of fractions
  5. apart = partial fraction decomposition
  6. wavycurvy = this can be used to solve univariate inequality
  7. absolute = make cases for |x|
  8. integrate_summation = distribute integrals across sums
  9. diff = perform differentiation wrt to a variable treating all others as constant
  10. diff2 = performs partial and complete differentiation
  11. etc…

check the github repository to know more

!pip install mathai==1.5.4
from mathai import *
god("integrate(1/(sin(x)*cos(x)),x)")

this code outputs (you can run this on google colab)

? integrate(1/(sin(x)*cos(x)),x)
thinking...
integrate((1/(cos(x)*sin(x))),x)
integrate((2/sin((2*x))),x)
log(abs(tan(x)))
=> log(abs((sin(x)/cos(x))))

check the github repository below and feedback

Interesting project. I like how you’ve broken the mathematical expression into a tree structure before evaluation. Visualizing operations this way makes complex calculations much easier to understand and debug. I’ve been exploring different math-related tools recently, and one thing I’ve found useful is quickly checking age, date, and time calculations alongside mathematical formulas. For anyone working with calculation-based projects, this can be handy too: https://myagecalculate.com/