DerivativeAt()
the partial derivative with respect to one named variable
Basic examples (2)
oQ = new stzMathFunction("x^2 - 2", [ "x" ])
? oQ.DerivativeAt("x", [ 0 ])
? oQ.DerivativeAt("x", [ 1 ])0 2
run on 2026-10-02 04:25 inside the library at commit 0e72e2e2c; taken from 15-an-identity-is-not-a-self-check.en.md(opens in a new tab)
oQ = new stzMathFunction("x^2 - 2", [ "x" ])
? oQ.DerivativeAt("x", [ 0 ])
? oQ.DerivativeAt("x", [ 1.41421356 ])0 2.83
run on 2026-10-02 04:25 inside the library at commit 0e72e2e2c; taken from 14-the-derivative-that-checks.en.md(opens in a new tab)
Scope (2)
oS = new stzMathFunction("sin(x)", [ "x" ])
? oS.DerivativeAt("x", [ 0 ])
? fabs( oS.DerivativeAt("x", [ 0 ]) - cos(0) ) < 0.0000000011 1
run on 2026-10-02 04:25 inside the library at commit 0e72e2e2c; taken from 14-the-derivative-that-checks.en.md(opens in a new tab)
oF = new stzMathFunction("x*x + x*x", [ "x" ])
# f(3) = 18
? oF.ValueAt([3])
# f'(3) = 12, not 6
? oF.DerivativeAt("x", [3])
oG = new stzMathFunction("(x+y)*(x+y)", [ "x", "y" ])
# both operands of a shared node get their share
? oG.DerivativeAt("x", [2,3])
# ...and so does the other
? oG.DerivativeAt("y", [2,3])18 12 10 10
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from numeric_autodiff_narrated.ring(opens in a new tab)
The extensions of this method
Each extension, and whether it exists for this method; an extension that exists combines with the others (FindSTCS).
Every example is a test file of the library, run inside the library for this page; only those whose output kept every promise their file wrote are shown.
See also
- The class stzMathFunction
- The area's reference: Numeric & optimization
- The other methods in these examples: stzMathFunction.ValueAt

