For the classes of Atul Roy
script
syms y(t)
Dy = diff(y,t);
D2y = diff(y,t,2);
ode = D2y - 4*Dy + 16*y == t^2*exp(-t)*cos(t);
conds = [y(0) == 0, Dy(0) == 1];
ySol = dsolve(ode, conds);
simplify(ySol)
%Plotting
fplot(ySol, [0 10])
grid on
xlabel('t')
ylabel('y(t)')
title('Solution of the ODE')
hold off
fplot(ySol, [0 1])
hold off
fplot(ySol, [0 2])