AJSesinando
To solve a first-order linear differential equation with a sine or cosine input, such as x-dot plus kx equals cosine(omega t), rewrite the cosine as the real part of e^(i omega t) and solve the complex equation with an integrating factor. The cosine case is the real part of the complex solution, and the sine case is its imaginary part, so one calculation solves both. Because the equation is linear, solutions for combined inputs can be added (superposition).