It is possible to obtain the value of through the infinite sum In this problem, you
Question:
It is possible to obtain the value of π through the infinite sum
In this problem, you will explore the convergence of this summation for a finite number of terms N,
Write a MATLAB function that computes the value of this sum up to a desired value of the residual
The latter expression is only valid for N > 1. Your program should compute the value of π(N) and the number of terms N required to reach the first term where the residual is less than ϵ = 10−1, 10−2, . . . , 10−8. Make one semilog plot of the eight outputs for the value of the sum versus ϵ and a log–log plot of the eight outputs for the number of terms needed to compute the sum for a given value of ϵ. Your program should also output the value of π(N) and the value of N for ϵ = 10−8.
Step by Step Answer:
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis