Any availiable function to find the Taylor series of multi variables function in Matlab?

14 ビュー (過去 30 日間)
Mehdi
Mehdi 2023 年 11 月 29 日
編集済み: Torsten 2023 年 12 月 1 日
I am looking for a ready to use function in Matlab to find the Taylor expansion of a functions with two or more variables (e.g. tanh(x^7*y^9^z^5)). Please let me know if there is such function in Matlab.

採用された回答

Torsten
Torsten 2023 年 11 月 29 日
移動済み: Torsten 2023 年 11 月 29 日
  8 件のコメント
Mehdi
Mehdi 2023 年 12 月 1 日
I need to estimate this function (g) with polynomials so the Taylor series expansion is the best choice, but unsuccessful yet.
Torsten
Torsten 2023 年 12 月 1 日
編集済み: Torsten 2023 年 12 月 1 日
suppose f=x. Still could not estimate f even with a lot of terms.
The Taylor series for tanh(x) converges for |x| < pi/2, and you will need many terms to make it converge when you approach the boundaries.
If you change your command to
fplot((taylor(g,[x],[0],'Order',88)),[-0.15,0.15])
you will see that the behaviour of the Taylor approximation near 0 is correct.

サインインしてコメントする。

その他の回答 (1 件)

the cyclist
the cyclist 2023 年 11 月 29 日
syms x y z;
f = tanh(x^7*y^9*z^5) % I think you may have had a typo or two in your function, so check this
f = 
taylor_series = taylor(f, [x, y, z], 'Order', 127);
disp(taylor_series);

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by