How do I solve the equation: (p(t)g(t))''=Ag(t) I have the equation (p(t)g(t))''=Ag(t), where: p(t) is a known given function, for instance p(t)=sin(2*pi*f*t) but not necessarily periodical in the general case. A is a known real constant, for instance A=A1 or A=A2, etc. g(t) is the unknown function which I want to determine. initial conditions: g(0)=known value=g0 possible g'(0) known value=g0' What I need is to display (using MATLAB) the time evolution of g=g(t), so I need an expression for this g(t). For some A I must get an oscillating g(t) (at least for p(t) periodical) for others g(t) should die (converge) quickly to zero. Is there an explicit formula (even with integrals that have to be numerically evaluated) for g(t)?