You are on page 1of 1

syms x

f = log(x);
T = taylor(f,x,'ExpansionPoint',1,'Order',8);
fplot([f T])
ylim([-10 10])
f = cos(x);
T4 = taylor(f,x,'ExpansionPoint',0,'Order',4);
% fplot([f T4])
T6 = taylor(f,x,'ExpansionPoint',0,'Order',6);
figure
fplot([f T4 T6])
xlim([-6 6])
ylim([-10 10])
hold on
T6_4 = taylor(f,x,'ExpansionPoint',4,'Order',6);
fplot(T6_4)
% xlim([-6 10])
T6_m4 = taylor(f,x,'ExpansionPoint',-4,'Order',6);
fplot(T6_m4)
xlim([-10 10])

You might also like