Write a MATLAB program to compute an approximation of the infinite series for si
ID: 3669332 • Letter: W
Question
Write a MATLAB program to compute an approximation of the infinite series for sigma_n = 1^infinity 1/n(n + 1) for N = 35 two ways. The N term partial sum of the infinite series is sigma_n =1^N 1/n(n + 1) Using element by element operations on arrays and MATLAB's built in sum function. Using iteration (for loop) and scalar operations. Do not use element by element operations on arrays or MATLAB's built in sum function for this version. Compare the two series approximation results to the limit of the series. This series is a telescoping series and the limit as N approaches is infinity is lim_N rightarrow infinity sigma_n = 1^N 1/n(n + 1) = lim_N rightarrow infinity (1 - 1/N - 1) = 1. Your program should display the series approximations and how close the approximations are to the limit of the series.Explanation / Answer
let your exression/Formula be S
then sloution is:
function [x,n]=Myfn(x,n)
x=zra(size(x));
S=(x^2)/37;
for ii=3:n
S=S+((x^ii)/fctrl(ii));
end
end
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.