سؤال

I am trying to get the coefficients of the Taylor series expansion of arbitrary functions. The input function has to be in the form of variables, and the output has to contain only the coefficients.

I have tried some MATLAB functions like 'taylor', but they give the entire expansion in the form of an expression written in symbolic form. I know such a thing can be done in Mathematica, but I have no exposure to it. Therefore I am reluctant to use Mathematica to do it.

It'd be a great help if a MATLAB function can be suggested. A C/C++ library capable of doing the same will be equally helpful.

Edit: I need the coefficients of the Taylor series expansion of: I need to find the coefficients of the Taylor series expansion of

f(x) = Product_from_{m=1}_to{M}[ {(1-2^{-m})z(1-p)} / {1-z+(1-2^(-m)z(1-p)} ].

هل كانت مفيدة؟

المحلول 2

I think I have found a way:

Enter the function in the form of syms. And then use taylor to find the Taylor series expansion. After than use sym2poly to get the coefficients.

If anyone has a better method, please write your answers.

نصائح أخرى

Are you looking for this function?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top