Question: Solving system of differential equations with bound on solutions

I know how to solve system of differential equations numerically, but now I want to know how to set a bound on the solutions. 

For example, if my system of DE is like this:   dx/dt = x+y   dy/dt = x-y    , solve x and y in t. 

I can solve this without any restriction on x and y, now I need to know how to bound x and y, e.g. x can only fall in the interval [0,1]


Thank you very much!

Please Wait...