Currently doing revision for a MATLAB module next year. Was attempting a question and was hoping for some help it.
I am asked to consider this Taylor series expansion:
S(x,n)=(x-1) – 1/2(x-1)^2 + 1/3(x-1)^3 – 1/4(x-1)^4 +…+ ((-1)^(n-1))*(1/n)*(x-1)^n
From this write a matlab function that, given the values of x and n, returns the value of S(x,n).
Obviously, I do not want someone to do the problem for me and just copy it. I would just like some advise and how to represent this as a script.
Thank you in advance for your time
Best Answer