1)Find the general solution of $\displaystyle x''+x=4 \cos (2t)$. 2)Determine the solution that satisfies $\displaystyle x(0)=0$, $\displaystyle x'(0)=0$.

Attempt: 1)I've found the general solution to the homogeneous DE to be $\displaystyle x_1(t)= \cos (t)$ and $\displaystyle x_2(t)= \sin (t)$.

So I propose a solution to the non-homogeneous DE to be of the form $\displaystyle u_1(t)x_1(t)+u_2(t)x_2(t)$.

$\displaystyle u_1'(t)=\frac{-4 \cos (2t) \sin (t)}{\cos ^2 (t)+ \sin ^2 (t)}=-4 \cos (2t) \sin (t)$. Similarly, $\displaystyle x_2'(t)=-4 \cos (2t) \cos (t)$.

Therefore the general solution to the DE is of the form $\displaystyle x(t)=-4\cos (t) \int \cos (2t) \sin (t) dt -4 \sin (t) \int \cos (2t)\cos (t) dt$. Should I calculate the indefinite integrals or just let it this way? What method would you use to solve the integrals? (I don't see any good u/substitution nor integration by part).

2)I think I should replace t with 0 in my last expression and then equal to 0. But I'm totally unsure about the limits of the integrals. To get $\displaystyle x'(t)$, I would derivate $\displaystyle x(t)$ with respect to t, set $\displaystyle t=0$ and equal $\displaystyle x'(0)=0$ in order to get the constants of integration if they are indefinite integrals? I'm confused on this.