Liking cljdoc? Tell your friends :D

sicmutils.calculus.derivative

This namespace implements a number of differential operators like D, and the machinery to apply D to various structures.

This namespace implements a number of differential operators like [[D]], and
the machinery to apply [[D]] to various structures.
raw docstring

Dclj/s

Derivative operator. Takes some function f and returns a function whose value at some point can multiply an increment in the arguments, to produce the best linear estimate of the increment in the function value.

For univariate functions, D computes a derivative. For vector-valued functions, D computes the Jacobian of f.

The related [[Grad]] returns a function that produces a structure of the opposite orientation as D. Both of these functions use forward-mode automatic differentiation.

Derivative operator. Takes some function `f` and returns a function
whose value at some point can multiply an increment in the arguments, to
produce the best linear estimate of the increment in the function value.

For univariate functions, [[D]] computes a derivative. For vector-valued
functions, [[D]] computes
the [Jacobian](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant)
of `f`.

The related [[Grad]] returns a function that produces a structure of the
opposite orientation as [[D]]. Both of these functions use forward-mode
automatic differentiation.
sourceraw docstring

D-as-matrixclj/s

(D-as-matrix F)
source

derivativeclj/s

(derivative f)

Returns a single-argument function of that, when called with an argument x, returns the derivative of f at x using forward-mode automatic differentiation.

For numerical differentiation, see sicmutils.numerical.derivative/D-numeric.

f must be built out of generic operations that know how to handle [[d/Differential]] inputs in addition to any types that a normal (f x) call would present. This restriction does not apply to operations like putting x into a container or destructuring; just primitive function calls.

Returns a single-argument function of that, when called with an argument `x`,
returns the derivative of `f` at `x` using forward-mode automatic
differentiation.

For numerical differentiation,
see [[sicmutils.numerical.derivative/D-numeric]].

`f` must be built out of generic operations that know how to
handle [[d/Differential]] inputs in addition to any types that a normal `(f
x)` call would present. This restriction does _not_ apply to operations like
putting `x` into a container or destructuring; just primitive function calls.
sourceraw docstring

partialclj/s

(partial & selectors)

Returns an operator that, when applied to a function f, produces a function that computes the partial derivative of f at the (zero-based) slot index provided via selectors.

Returns an operator that, when applied to a function `f`, produces a function
that computes the partial derivative of `f` at the (zero-based) slot index
provided via `selectors`.
sourceraw docstring

taylor-seriesclj/s

(taylor-series f x dx)

Returns a sicmutils.series/Series of the coefficients of the Taylor series of the function f evaluated at x, with incremental quantity dx.

The typical definition of a Taylor series at the point x is

$$f(x) = f(a) + \frac{f'(a)}{1!}(x-a) + \frac{f''(a)}{2!} (x-a)^2 + \ldots$$

All derivatives of the original function and this Taylor series match at the point a.

The argument dx is instead interpreted as an incremental difference from (x-a). So, passing 0 for dx would return the evaluation of the Taylor series at the point a.

Returns a [[sicmutils.series/Series]] of the coefficients of the [Taylor
series](https://en.wikipedia.org/wiki/Taylor_series) of the function `f`
evaluated at `x`, with incremental quantity `dx`.

The typical definition of a Taylor series at the point `x` is

$$f(x) = f(a) + \frac{f'(a)}{1!}(x-a) +  \frac{f''(a)}{2!} (x-a)^2 + \ldots$$

All derivatives of the original function and this Taylor series match at the
point `a`.

The argument `dx` is instead interpreted as an incremental difference
from `(x-a)`. So, passing 0 for `dx` would return the evaluation of the Taylor
series at the point `a`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close