![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/413913/image.jpeg)
How i do Taylor series summation method?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/413723/image.png)
0 commentaires
Réponses (1)
Setsuna Yuuki.
le 14 Nov 2020
Modifié(e) : Setsuna Yuuki.
le 14 Nov 2020
I hope it helps you!
% Integral
syms y;
fun = @(y) asin(y);
resInt = integral(fun,0,1);
% Taylor loop with 80 component
syms x;
sumatoria = 0; maxi = 80;
serie = zeros(1,maxi); expo = zeros(1,maxi);
for n = 1:maxi
k = n-1;
serie(n) = factorial(2*k)/((4^k)*((factorial(k))^2)*(2*k+1));
expo(n) = 2*k+1;
sumatoria = sumatoria + serie(n)*x^(expo(n));
end
func = matlabFunction(sumatoria)
resLoop = integral(func,0,1);
% Using the "taylor" command, with 5 components
sumatoria = taylor(fun,y);
func = matlabFunction(sumatoria)
resTaylor = integral(func,0,1);
result = table(resInt, resLoop, resTaylor);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/413913/image.jpeg)
0 commentaires
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!