Question: 1 . 2 3 Use the first seven terms in cos ( x ) = 1 - x ^ 2 / 2 ! + x
Use the first seven terms in cosx x x x x x to calculate an estimated value of Do the calculation with
MATLAB use format long to display the numbers Determine the true relative error. For the exact
value of use exp in MATLAB.
Hint:
Do the following calculation with Python instead of MATLAB:
a Set the precision with Python similar to format long in MATLAB;
b Calculate value of e
# Python sript
import numpy as np
npsetprintoptionsprecision
printe
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
