Question: I want to use the vectoring method in MATLAB to show the Leibniz series converges to pi/4. my code currently is: n = 1:100000000; x
I want to use the vectoring method in MATLAB to show the Leibniz series converges to pi/4.
my code currently is: n = 1:100000000; x = x + ((-1.^n) / (2*n +1)); format long ANS = cumsum(x) I am not getting the correct answer and I am not sure why?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
