Clear[u, λ, x, t, k]

DSolve[{u''[x] + (1 + λ)*u[x] == 0}, u[x], 
      x]

First guess for eigenfunction is sin(nx)

(∫_0^(π/2))Cos[2*x]*
        Sin[x] \[DifferentialD]x

Guess again

(∫_0^(π/2))Cos[2*x]*
        Sin[2*x] \[DifferentialD]x

That works

Find ((Subscript[u, k])^2)

(∫_0^(π/2))(((Sin[
                2*x]))^2) \[DifferentialD]x

(∑_(k = 3))((Sin[2*k*x]/(4*(k^2) - 3))*(∫_0^(π/2))Sin[2*k*t]*Cos[2*t] \[DifferentialD]t)