[Maple Math]

In this case, we have [Maple Math] , and the general solution is of the form [Maple Math] .

The condition [Maple Math] implies that [Maple Math] , and the condition [Maple Math] implies that [Maple Math] or [Maple Math] .

This last condition will be true whenever [Maple Math] for [Maple Math] = 1, 2, 3, ....

We can instruct Maple to verify this reasoning as follows:

> H:='H';de2 := diff(H(x),x$2)=-omega^2*H(x);

[Maple Math]

[Maple Math]

> sol2 := dsolve(de2,H(x));

[Maple Math]

> H:=unapply(rhs(sol2),x);

[Maple Math]

> solve({D(H)(0)=0,H(Pi)=0},{omega,_C2});

[Maple Math]

Note that it is up to us to notice that other values of [Maple Math] also work.