Jonathan Worthington :: jnthn.net

Calculus Tools

I've written a number of Perl modules that support representation and manipulation of mathematical expressions. If you want to see stuff relating to how you can use them or their development, look towards the bottom of this page.

Differentiation

The derivative of an expression is a second expression that describes the gradient of the first one.

Newton Raphson

The Newton Raphson method solves an equation of the form f(x) = 0. To solve your equation using Newton Raphson, you'll need to re-arrange it into that form. For example, to solve "x^2 = 5", you'd need to re-arrange it to "x^2 - 5 = 0".

= 0

Taylor Series

The Taylor Series of an expression is an infinite polynomial that is equivalent to it.

Taylor Series Equivalence (In Testing, Research)

By comparing the equality of the first N terms of an expression's Taylor series it is possible to get an idea of whether two expressions are equivalent. This tool will usually successfully identify whether a trig identity is valid, but is not at all foolproof. Expression equivalence is still a problem I'm working on, and this idea is written up in a paper I'll be giving at the European Perl Conference 2005.

Integration (Coming Soon)

The opposite to differentiation, not always possible analytically, and hard to implement. This tool is still under development. Check back in the future for more information.

The History Of This Work

In April 2003 I wrote a module that took an algebraic expression, differentiated it and handed it back. Unfortunately, the way it was written made it unreliable and very hard to extend and fix. In August 2004 I started re-writing it from scratch, pulling apart parsing from differentiation. As well as resulting in a much more stable differentiation engine, it has also opened the door to implementing a great number of other modules.

Using These Modules

The Perl modules are available on CPAN from my directory.

All content Copyright (C) Jonathan Worthington 2003-2005 unless otherwise stated.