Advertisement

Advertisement

Calculate the Derivative of …

Set differentiation variable and order in "Options". Preview of your input:

Loading … please wait!
This will take a few seconds.

Not what you mean? Use parentheses!

Recommend this Website

If you like this website, then please support it by giving it a +1 and a Like. Thank you!

Book Recommendation

Calculus for Dummies

An extremely well-written book for students taking Calculus for the first time as well as those who need a refresher. This book makes you realize that Calculus isn't that tough after all. → to the book

Advertisement

Result

Above, enter the function to derive. Differentiation variable and other settings can be changed in "Options". When you're done, click "Go!" to start the derivative calculation. The result will be shown below.

Advertisement

Advertisement

How the Derivative Calculator works …

For those with a technical background, the following section explains how the Derivative Calculator works.

First, a parser analyzes the mathematical formula. It transforms it into a form that is better understandable by a computer, namely a tree (see figure below). In doing this, the Derivative Calculator has to respect the order of operations. A specialty in mathematical formulas is that the multiplication sign can be left out sometimes, for example we write "5x" instead of "5*x". The Derivative Calculator has to detect these cases and insert the multiplication sign.

The parser is implemented in JavaScript, based on the Shunting-yard algorithm, and can run directly in the browser. This allows for quick feedback while typing by transforming the tree into a LaTeX formula. MathJax takes care of displaying the formula in the browser.

When the "Go!" button is clicked, the Derivative Calculator sends the mathematical formula and the settings (differentiation variable and order) to the server, where it is analyzed again using the same JavaScript code (this is possible using Node.js). This time, the formula gets transformed into a form that can be understood by the computer algebra system Maxima.

How the Derivative Calculator works

Maxima takes care of actually computing the derivative of the mathematical formula. Like any computer algebra system, it applies a number of rules to simplify the formula and calculate the derivatives according to the commonly known differentiation rules. Maxima's output is transformed to LaTeX again and is then presented to the user.

Displaying the steps of calculation is a bit more involved, because the Derivative Calculator can't completely rely on Maxima for this task. Instead, the derivatives have to be calculated manually step by step. The rules of differentiation (product rule, quotient rule, chain rule, …) have been implemented in JavaScript code. There is also a table of derivative functions for the trigonometric functions and the square root, logarithm and exponential function. In each calculation step, one differentiation operation is carried out or rewritten. For example, constant factors are pulled out of differentiation operations and sums are split up (sum rule). This, and general formula simplifications, are done by Maxima. For each calculated derivative, the LaTeX representations of the resulting mathematical expressions are tagged in the HTML code so that highlighting is possible.

The interactive function graphs are computed in the browser and displayed within a canvas element (HTML5). For each function to be graphed, the calculator creates a JavaScript function, which is then evaluated in small steps in order to draw the graph. While graphing, singularities (e. g. poles) are detected and treated specially. The gesture control is implemented using Hammer.js.

If you have any questions or ideas for improvements to the Derivative Calculator, don't hesitate to write me an e-mail.

Partner Sites

zweigmedia.com: Contains calculus tutorials and online tools.

stevewillot.com: Steve Willot's math help website contains learning/memory aides and useful links.

tutor-homework.com: Homework help and tutoring for mathematics, chemistry and physics. Also contains online tools.