You first have to express it as (D-1)(D-1)y = e2x(cosh2x + cos2x) (Call his g(x) )
Then let (D-1)y be expressed as z so that the new expression is (D-1)z = g(x)
Solve for z and then substitute it back to the original expression! This is a tedious process compared to other methods but it does work if the coefficients are constants.
Let's look at a simple example:
Let (D2 - 2D +1) = 1
then (D-1)(D-1)y = 1 Let (D-1)y = z, then
(D-1)z = 1 or dz/dx -z = 1 or dz/dx = z+1
The solution to this equation is z = Kex - 1 (K is a constant)
Now go back to the original equation and substitute now that we know z
(D-1)y = z = Kex - 1 or dy/dx - y = Kex - 1
Now you are left with a first order equation that you can solve easily!