Question: How to achieve a piecewise function?

My goal is to plot the integral J with respect to t and as you can see J is a piecewise function.

This is my code.   hw2_numerical_2.mw

 

Actually it's a problem about adiabatic invariants.

If you want to know the backgroud please see this link.

www.mapleprimes.com/questions/206645-How-To--Numerically--Solve-It-

Please Wait...