EEE 306 Lab 2 : Taylor’s error

July 19, 2017
By shp

Find the sum of the n terms for the sequence
Input: x n
Term_no sum
for all term leading to n
Example input:
Example Output:


Find the approximation of e^x using maclaurin series for %Ea <n%
Input: x n
interation_no approximation %Ea
for every iteration
Example input:

0.5 0.0001

Example Output:

2 Approximation=1.500000 Error=50.000000
3 Approximation=1.625000 Error=8.333333
4 Approximation=1.645833 Error=1.282051
5 Approximation=1.648438 Error=0.158228
6 Approximation=1.648698 Error=0.015798
7 Approximation=1.648720 Error=0.001316
8 Approximation=1.648721 Error=0.000094

Approximation for e^0.500000 with 0.000094% error is 1.648721


Submit Assignment 2 through this link

Leave a Reply