Please solve using matlab Write a script that performs the T

Please solve using matlab

Write a script that performs the Taylor series expansion of cos(x) about zero. Determine the order necessary such that when the expansion is evaluated at 3, the relative error between the expansion and the real function is less than or equal to 10^-6. You will need to use a loop, and the order must start at 1. relative error = abs(actual - estimate)/actual * 100

Solution

clear all
close all
clc
format short
syms x;
for i=1:1:5
    y = 1-power(x,i+1)/factorial(i);
    yy=y+y;
end
yy

Please solve using matlab Write a script that performs the Taylor series expansion of cos(x) about zero. Determine the order necessary such that when the expans

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site