Taylor expansion with symbolic toolbox
4 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I want to know how to do an approximation by the first and the second terms of Taylor expansion to symbolic expression, as for the expression below. How could I do that!
thank you for your help
0 个评论
回答(1 个)
Ayush Modi
2024-9-18,18:11
Hi Insaf,
I am assuming, you want to find the approximate with the Taylor series expansion of f up to the second order.
You can achieve this using "taylor" function. Here is the sample code for your reference:
syms x(theta) alpha r a
f = x(theta) + alpha * (r + x(theta))^a
taylor_expansion = taylor(f, 'Order', 2)
Refer to the following documentation for more information on "taylor" function:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!