clear all; close all; clc; pkg load symbolic; syms s(t); DJ = diff(s,t,2) + 3*diff(s,t) + 2*s == 1; sol = dsolve (DJ, s(0) == 0, diff(s)(0) ==0 ) latex(sol) s = rhs(sol) * heaviside(t) h1 = diff(s) h = diff(h1) + 2*h1 h_fact = factor(h, dirac(t), diff(dirac(t)), heaviside(t)) latex( h_fact ) subs(h, t, 0) h = subs( h_fact, [dirac(t), diff(dirac(t))], [0,0] ) syms tau y = int( subs(h, t, tau) * exp(t-tau), tau, 0, t ) latex(y)