How to solve $y' = \ln 3 (y- \left \lfloor{y}\right \rfloor - \frac{3}{2}), $ subject to $ y(0)=0$? If I were to let $y = x+z$ where $x$ is the integer part of the solution and $z$ is the other bit then we have
$$x'+z' = \ln3\bigg(z-\frac{3}{2}\bigg)$$
I am not sure whether I am any better off. The integer part is discontinuous, so I am not sure whether $x'$ makes any sense. Does anyone have any experience with these types of ODE's?
The exact solution is 
$$y(t) = -  \left \lfloor{t}\right \rfloor + \frac{1}{2}(1-3^{t- \left \lfloor{t}\right \rfloor })  , t \geq 0$$
 A: The problem can be simplified by assuming $0<y<1$ We can then attempt to extend the solution to satisfy a more general domain.
$$y'=(\ln 3)\left(y-\frac 32\right)$$
Substituting $z = y - \frac 32$, $z'=y'$, we obtain a simple linear ODE.
$$z'=z\ln 3$$
$$z=c(3)^t,\ \ \ c\in\mathbb R$$
$$y=c(3)^t+\frac 32$$
We now need to determine which values of $t$ satisfy $0<y<1$, which immediately requires that $c<0$.
$$\log_3\left(\frac{-1}{2c}\right)<t<\log_3\left(\frac{-3}{2c}\right)$$
$$0<t-\log_3\left(\frac{-1}{2c}\right)<1$$
Letting $t_0=\log_3\left(\frac{-1}{2c}\right)$, we have $0<t - t_0 <1$. We can then plug $t_0$ back into the original equation to obtain a simple expression.
$$y=\frac 32 - \frac 12(3)^{t-t_0}$$
In the ODE, note that the substitution $y\to y+n$ for some integer $n$ does not change the equation. From this, we can obtain the most general set of strong solutions:
$$y=n+\frac 32-\frac 12(3)^{t-t_0},\ \ n\in\mathbb Z,\ \ t_0\in\mathbb R,\ \ 0<t-t_0<1$$
This solution set can never satisfy the initial condition $y(0)=0$. In fact, there are no solutions that satisfy the ODE for integer values of $y$, due to the discontinuity in the ODE. If, however, we permit weak solutions that are continuous and satisfy the ODE almost everywhere, then we can join the endpoints of the solution curves to make curves that are defined for all $t$. The exact solution you provided was obtained in exactly this manner; notice that it doesn't satisfy the ODE at $y=0$ since its derivative doesn't exist there.
