1Math::Symbolic::DerivatUisveer(3C)ontributed Perl DocumeMnattaht:i:oSnymbolic::Derivative(3)
2
3
4
6 Math::Symbolic::Derivative - Derive Math::Symbolic trees
7
9 use Math::Symbolic::Derivative qw/:all/;
10 $derived = partial_derivative($term, $variable);
11 # or:
12 $derived = total_derivative($term, $variable);
13
15 This module implements derivatives for Math::Symbolic trees. Deriva‐
16 tives are Math::Symbolic::Operators, but their implementation is drawn
17 from this module because it is significantly more complex than the
18 implementation of most operators.
19
20 Derivatives come in two flavours. There are partial- and total deriva‐
21 tives.
22
23 Explaining the precise difference between partial- and total deriva‐
24 tives is beyond the scope of this document, but in the context of
25 Math::Symbolic, the difference is simply that partial derivatives just
26 derive in terms of explicit dependency on the differential variable
27 while total derivatives recongnize implicit dependencies from variable
28 signatures.
29
30 Partial derivatives are faster, have been tested more thoroughly, and
31 are probably what you want for simpler applications anyway.
32
33 EXPORT
34
35 None by default. But you may choose to import the total_derivative()
36 and partial_derivative() functions.
37
39 The package variable %Partial_Rules contains partial derivative rules
40 as key-value pairs of names and subroutines.
41
43 partial_derivative
44
45 Takes a Math::Symbolic tree and a Math::Symbolic::Variable as argument.
46 third argument is an optional boolean indicating whether or not the
47 tree has to be cloned before being derived. If it is true, the subrou‐
48 tine happily stomps on any code that might rely on any components of
49 the Math::Symbolic tree that was passed to the sub as first argument.
50
51 total_derivative
52
53 Takes a Math::Symbolic tree and a Math::Symbolic::Variable as argument.
54 third argument is an optional boolean indicating whether or not the
55 tree has to be cloned before being derived. If it is true, the subrou‐
56 tine happily stomps on any code that might rely on any components of
57 the Math::Symbolic tree that was passed to the sub as first argument.
58
60 Please send feedback, bug reports, and support requests to the
61 Math::Symbolic support mailing list: math-symbolic-support at lists dot
62 sourceforge dot net. Please consider letting us know how you use
63 Math::Symbolic. Thank you.
64
65 If you're interested in helping with the development or extending the
66 module's functionality, please contact the developers' mailing list:
67 math-symbolic-develop at lists dot sourceforge dot net.
68
69 List of contributors:
70
71 Steffen Müller, symbolic-module at steffen-mueller dot net
72 Stray Toaster, mwk at users dot sourceforge dot net
73 Oliver Ebenhöh
74
76 New versions of this module can be found on http://steffen-mueller.net
77 or CPAN. The module development takes place on Sourceforge at
78 http://sourceforge.net/projects/math-symbolic/
79
80 Math::Symbolic
81
82
83
84perl v5.8.8 2008-02-22 Math::Symbolic::Derivative(3)