Menu

piecewise functions

Angie
2024-06-18
2024-08-30
  • Angie

    Angie - 2024-06-18

    Hello,

    Is it possible to solve equations containing piecewise functions? If so, how can it be done?

    Thank you!

     
  • hilmeijer

    hilmeijer - 2024-08-30

    MatCont deals with systems of smooth ODEs, so you cannot "just" include piecewise functions as it might lead to numerical issues.
    What you could do instead is to approximate your piecewise function, say you have a Heaviside, then H(x)=(1+tanh(ax))/2 is a smooth approximation. The higher value of the parameter a the steeper this sigmoidal approximation.
    You should still check if the results match what you expect.

     

Log in to post a comment.