# Revision history [back]

### How to find and plot both steady periodic solution and actual solution?

Hi! I haven't been able to figure out how to do this in Sage, Let's say I have the differential equation with initial values

x''+4x'+5x=15cos(4t), x(0)=0, x'(0)=0


And want to find both the steady periodic solution as well as the full solution

When I put in

f=function('f')(x)
de=diff(f,x,2)+4*diff(f,x)+5*f==15*cos(4*x)
z=desolve_laplace(de,dvar=f,ics=[0,0,0])
show(expand(z))


I get

165/377*cos(x)*e^(-2*x) - 630/377*e^(-2*x)*sin(x) - 165/377*cos(4*x) + 240/377*sin(4*x)


Xsp(t) = 0.773cos(4t-2.173)