odesolve use to be mathcad's best solver. however, their statespace solver is much better. the help and quicksheets can get you started. if you want some example files, I can post them. the users here on the forum helped me get a pwm input working. i haven't tried a sawtooth wave but i expect it would handle it well. the nice thing about the statespace solver is it can handle a lot more inputs than odesolve can.