$$(D^2+1)^{2}y= 24 x \cos x$$ given that $y=Dy=D^2y=0$ and $D^3 y=12$ when $x=0$
A part of the solution I got but finding difficulty in the other part. Let it be y= y1 +y2 $y1=(A+Bx)sin(x)+(C+Dx)cos(x)$ For Integral part i was struck at $$y2=(1/(D^2+1)^{2})24x cosx $$ $$y2=-12i (1/(D^2+1))[(1/D-i)-(1/D+i)]xe^{ix}$$
The answer is $y=3x^2sinx-x^3cosx$
It's a linear differential equation with constant coefficients. This way you immediately know that the homogeneous solutions will be exponential/trigonometric and if there are any duplicate roots of the characteristic equations (there are, as you can see the left side is already factorized), you will get polynomial*exponential/trigonometric, too. The particular solution also follows the familiar procedure with trial functions in this case.
However, this question looks like it's made for Laplace transform. Just substitute $D$ with $s$ on the left, find the laplace transform of the right hand side from the tables, and invert the transform (you will need the initial conditions in this step).