integrating a Green's function for a damped harmonic oscillator

I have the following integrand:

int = Sin[Sqrt[-g^2 + omega^2]*(t - tp)]*Exp[-g*(t - tp)]*A*Exp[-(tp - t0)^2/sigma^2]*Cos[Omega*tp]/Sqrt[-g^2 + omega^2]


and am trying to integrate it with:

Integrate[int, {tp, 0, t}, Assumptions -> {g > 0, omega > 0, Omega > 0, A > 0, sigma > 0, t > 0, t0>0}]


but Mathematica is not able to do it (I have tried to do this with no assumptions as well). Maple does the integration in under a second and returns a solution (which can be expressed in terms of the Erf functions).

Is there a way to help Mathematica calculate this integral?

... and just to note, the result of the integration is a solution of damped harmonic oscillator, driven by a force:

A*Exp[-(t - t0)^2/sigma^2]*Cos[Omega*t]

• the small omega is the natural frequency, while the large omega (i.e. Omega) is the frequency of the drive. Commented Jul 21, 2013 at 23:16

1 Answer

This takes about 30 seconds to evaluate on my computer:

 Integrate[int // TrigToExp // Expand, {tp, 0, t},
Assumptions -> {omega > g > Omega > 0, A > 0, sigma > 0, t > 0, t0 > 0}]


Also if it is a solution of a linear ODE (with constant coefficients?) then perhaps it can be found directly with DSolve.

• thanks for taking a look at this. Doing TrigToExp, and Expanding does indeed work! I should note that you added extra assumptions in your answer, but going back to the assumptions that I specified in my question also works. Commented Jul 21, 2013 at 21:02