SAGE : Solving a Simple 1st-Order ODE 

Solve the 1st order linear non-homogeneous equation $$y'+2y=t e^{-t}$$ with $y(0)=4$.

First the general solution:


We can also include the initial condition $y(0)=4$ using ics=[0,4] as well as make a plot of the solution.