Question: Is this a bug in solve?

Is this a bug in Maple?  it gives error in Maple 2026.2 and also Maple 2025.2

restart;

ode:=-1/diff(Y(X),X)^3*diff(diff(Y(X),X),X)+4*X = piecewise(0 <= Y(X) and Y(X) < Pi,0,Pi <= Y(X) and Y(X) < 2*Pi,10,2*Pi <= Y(X),0);

solve(ode,diff(Y(X),X$2))

workaround is to use isolate instead of solve or Solve:

 

 

But why solve fails just because RHS is piecewise ?

Wanted to check before sending bug report in case it is by design.

Please Wait...