PDIFFERENTIATE

From iMath
Jump to navigation Jump to search

Syntax

PDIFFERENTIATE ( equation|expression, symbol, expression)


Implemented in iMath since version 2.2.0 or earlier.

Explanation

Partially differentiate the expression or both sides of the equation with respect to the symbol. The third parameter gives the number of times to differentiate.

iMath does partial differentiation by treating all functions as constants, unless they explicitly contain the differentiation variable in their argument list.

If you are differentiating a function, e.g. PDIFFERENTIATE(f(x), x, 1), iMath will create a derivative object. This looks like a fraction with a differential in the numerator and another in the denominator. If you need to cancel a term in this fraction, you must use the simplification "cancel-diff".

You might be tempted to create a partial derivative of a function manually with something like partial(f) over partial(x). This is not the recommended way, though, because in complicated terms iMath might not be able to match the correct differentials in numerator and denominator, which can lead to strange results for higher-order derivatives and when printing.

It is possible to differentiate to a symbol that is a function.


Example

%%ii FUNCTION { {none}, f, x;t}

@eq1@ EQDEF g = PDIFFERENTIATE(f(x;t), t, 1)

@eq2@ EQDEF g = PDIFFERENTIATE(f, t, 1)

@eq3@ EQDEF g = PDIFFERENTIATE(k * f, t, 1)

The third equation will become g = 0 because t is not contained in the argument list of f (the second equation is considered a special case). Currently this behaviour is considered a feature, but it might be changed in the future, especially if someone with better knowledge of analysis contacts the author of iMath through a bug or feature request.

See also

DIFFERENTIATE Differential Partial