Branch cuts are your friends. You can have fun with them!
An integral with branch cut.
This is a deep dive into the math of low pass filter with driven by a square wave.
Mass-spring system with dumping and driving forces. A full solution is presented with interactive plots.