DIFFERENTIATE: Difference between revisions

From iMath
Jump to navigation Jump to search
(Created page with "{{Keyword | <code>DIFFERENTIATE ( equation|expression, symbol, expression)</code> | Differentiate the expression or both sides of the equation with respec...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
Differentiate the expression or both sides of the equation with respect to the symbol. The third parameter gives the number of times to differentiate.
Differentiate the expression or both sides of the equation with respect to the symbol. The third parameter gives the number of times to differentiate.


If you are differentiating a function, e.g. <code>DIFFERENTIATE(f(x), x, 1)</code>, iMath will automatically separate the resulting expression into two differential objects <code>df(x)</code> and <code>dx^{-1}</code>, but will mark them as being connected, so that on printing they can be displayed correctly.
If you are differentiating a function, e.g. <code>DIFFERENTIATE(f(x), x, 1)</code>, 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 [[SIMPLIFY|simplification "cancel-diff"]].
 
You might be tempted to create a differential of a function manually with something like <code>differential(f) over differential(x)</code>. 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.
It is possible to differentiate to a symbol that is a function.
Line 14: Line 16:
<code>@eq1@ EQDEF q = -k A DIFFERENTIATE( T,x,1 )</code>
<code>@eq1@ EQDEF q = -k A DIFFERENTIATE( T,x,1 )</code>


<code>@eq2@ EQDEF @eq1@ * differential(x)</code>
<code>@eq2@ EQDEF SIMPLIFY(@eq1@ * differential(x), "canceldiff")</code>


This defines the equation for heat conduction and prepares it for integration by separation of the variables.
This defines the equation for heat conduction and prepares it for integration by separation of the variables.
|4=
[[PDIFFERENTIATE]] [[Differential]] [[Partial]]
}}
}}
[[Category:Manipulation]]
[[Category:Manipulation]]

Latest revision as of 19:01, 27 June 2017

Syntax

DIFFERENTIATE ( equation|expression, symbol, expression)


Implemented in iMath since version 2.2.0 or earlier.

Explanation

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

If you are differentiating a function, e.g. DIFFERENTIATE(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 differential of a function manually with something like differential(f) over differential(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

FUNCTION { {none}, T, x}

@eq1@ EQDEF q = -k A DIFFERENTIATE( T,x,1 )

@eq2@ EQDEF SIMPLIFY(@eq1@ * differential(x), "canceldiff")

This defines the equation for heat conduction and prepares it for integration by separation of the variables.

See also

PDIFFERENTIATE Differential Partial