I want to find a first order ode, an initial value problem, that has the solution $$y=(1-y_0)t+y_0$$ where $y_0$ is the initial value.The ode has to be of first order, that is: $$y'=f(y).$$ I need this to test a special solver I am building. The main objective is to find an ode that has the property that the end-value goes into the reverse direction of the initial value. My thought is, that the function above is the most simple one that fulfills that requirement. However, any other idea that produces my desired result is welcome.
I came so far: since $$y'=1-y_0=f((1-y_0)+y_0)$$ $f$ should be something like $$f(z)=\frac{z-y_0}{t}$$ so we get: $$y'=\frac{y-y_0}{t}$$ However, I don't know how to properly get the initial condition into the equation, the $y_0$ part in the ode itself doesn't seem right, since the initial value can't be put into the ode itself but is a special constrained outside the ode. Can anyone help me get this clear?