Skip to content
Joris Gillis edited this page Apr 4, 2023 · 3 revisions

Standard documentation for taylor:

 univariate Taylor series expansion

::

 taylor(DM ex, DM x, DM a, int order) -> DM
 taylor(SX ex, SX x, SX a, int order) -> SX

Calculate the Taylor expansion of expression 'ex' up to order 'order' with respect to variable 'x' around the point 'a'

$(x)=f(a)+f'(a)(x-a)+f''(a)\frac

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

Example usage:

::

taylor(sin(x), x)

::

x

Extra doc: https://github.com/casadi/casadi/wiki/L_23q

Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/matrix_decl.hpp#L758

Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/matrix_decl.hpp#L758-L760

Extra documentation

To edit, see writing tips.

Clone this wiki locally