Solving a Homogeneous ODE:
> homo:=diff(u(t),t,t)+u(t)=0;
> dsolve(homo,u(t));
Solving an Inhomogeneous ODE:
> inhomo:=diff(u(t),t,t)+u(t)=1-exp(-t);
> dsolve(inhomo,u(t));
> simplify(%);
Using Undetermined Coefficients
> undet:=subs(u(t)=A+B*exp(-t),inhomo);
> undet:=eval(undet);
We can see that A=1 and B=-1/2, which agrees with the above result.