Theoretica
A C++ numerical and automatic mathematical library
|
Taylor series expansions. More...
Functions | |
template<typename DualFunction > | |
polynomial< real > | expand_linear (DualFunction f, real x0=0) |
Computes the first order Taylor expansion of a generic function around x0, computed using dual numbers. More... | |
template<typename Dual2Function > | |
polynomial< real > | expand_quadratic (Dual2Function f, real x0=0) |
Computes the second order Taylor expansion of a generic function around x0, computed using dual numbers (of second order). More... | |
Taylor series expansions.
|
inline |
Computes the first order Taylor expansion of a generic function around x0, computed using dual numbers.
Automatic differentiation is used to compute the exact values of the function and its derivatives at x0.
f | A function taking and returning a dual number, representing the function to expand in series. |
x0 | The center of the Taylor expansion |
|
inline |
Computes the second order Taylor expansion of a generic function around x0, computed using dual numbers (of second order).
Automatic differentiation is used to compute the exact values of the function and its derivatives at x0.
f | A function taking and returning a dual2 number, representing the function to expand in series. |
x0 | The center of the Taylor expansion |