live app: derivative-calculator
Calculates the symbolic derivative of the given function. It parses the expression first using recursive descent parsing
and then recusrsively calculates the derivative. It uses MathJax to render mathematical expressions written in AsciiMath
The following functions and operators are currently supported
functions: ln, sqrt, sin, cos, tan, cot, sec, cosec. operator: unary and binary - and +, ^ (exponential),
* (multiplication), / (division)
All arguments to functions should be enclosed in parenthesis. for example : sin(x+1), sqrt(x^2)
ln,sqrt,sin,cos,tan,cot,sec,cosec^unary - and +* and /d/dxbinary - and +
So, d/dx a*b means d/dx (a*b), but d/dx a + b means (d/dx a) + b. also sin(x)^3 means ((sin(x))^3 and not sin(x^3).
- left associative:
+,-,*,/ - right associative:
^
So, a*b/c/d means ((a*b)/c)/d, and a^b^c means a^(b^c).
In case of power of trigonometric functions, input should be provided like (sin(x))^3, sin^3(x) will not work.
- Install
pythonandpipif not already installed. - Install
pipenvif not already installed bypip install pipenv - git clone the repo
cdto the project folder- run
pipenv --threeto create apython3virtual environment - run
pipenv installto install project dependencies - run
pipenv shellto activate virtual environment. - run
python app.pyto run the development server. the server will be accessible now athttp://localhost:5000