clc;
syms t;
%f = sym('cos(t+1)+t');
f = cos(t+1)+t;
f1 = subs(f,t,-t);
pair = 1/2*(f+f1);
odd = 1/2*(f-f1);
subplot(311);
fplot(f,[-8,8]);
subplot(312);
fplot(pair,[-8,8]);
subplot(313);
fplot(odd,[-8,8]);
clc;
syms t;
%f = sym('cos(t+1)+t');
f = cos(t+1)+t;
f1 = subs(f,t,-t);
pair = 1/2*(f+f1);
odd = 1/2*(f-f1);
subplot(311);
fplot(f,[-8,8]);
subplot(312);
fplot(pair,[-8,8]);
subplot(313);
fplot(odd,[-8,8]);