dydx

The Flying Pig! Version 0.90 (3-May 2000).

Use

The idea behind the program dydx is that it will differentiate mathematical expressions. To use it simply type the mathematical expression which you wish to differentiate when prompted, followed by the variable which you wish to differentiate with respect to. If you just press Enter at this stage the program assumes that you wish to differentiate with respect to x. The solution will then be displayed. For functions of more than one variable, partial differentiation is used.

Restrictions

There are a number of restrictions which you should bear in mind when using this program. It is advisable to use lower case letters for variables, to avoid confusion with the built in functions, which must be typed in upper case. The functions which dydx knows about are as follows:

SIN(), COS(), TAN(), ASN(), ACS(), ATN(), SINH(), COSH(), TANH() ASNH(), 
ACSH(), ATNH(), LOG(), LN(), EXP(), SQR().

It will also differentiate products, powers, sums, quotients and so on which include these functions. If the program does not recognise something (i.e. if it is neither a function nor the differentiation variable) then it is assumed to be a constant. The expressions should conform to the OPL syntax, with the exception that powers are expressed using a^b rather than a**b. In accordance with this you should write, for example, 2*x and not 2x. The program doesnt like spaces in expressions, but this will change in a future release. If brackets are not used the priority should in theory work as follows: ^,*,/,+,-.

The program will recognise some syntactic errors, such as unmatched brackets. However, in general if you have typed an unintelligible function, the chances are the program will not notice and will happily provide an equally unintelligible answer.

Examples

The following are examples of expressions which the program should have no trouble differentiating:

(x^2)/(COS(x)+SIN(x))

ASN(5*(x^3)+2*(x^2)+x+(1/2))^(x+1)

The library

The routines used for the differentiation are written in OPL and should hopefully be fairly easy to understand. The source is included with this distribution. Feel free to make changes or improvements to the program, although if you do make improvements or additions, Id be grateful if you would send me copies.

This program and its associated libraries are very much under development at the moment and as such I make no guarantee that they will produce correct answers. You have been warned! If you have suggestions for improvements or find mistakes I would be very glad to hear from you; I am very keen to develop the routines further. In particular I hope to include rudimentary integration at some point, although I think this will be a far more complex task! If you have any comments at all I can be contacted by post at:

22 Grasmere Road, Thundersley, Essex, SS7 3HF

or by e-mail at:

david@flypig.co.uk

and my website is at: www.flypig.co.uk

I hope you find the program useful!

