-
Notifications
You must be signed in to change notification settings - Fork 364
L_23q
Joris Gillis edited this page Apr 4, 2023
·
3 revisions
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
To edit, see writing tips.