TITLE: ODE with time dependent jumps of coefficients
QUESTION [1 upvotes]: Consider the following ODE
\begin{align}
x'(t) = -x(t)k(t)r
\end{align}
where $r > 0$ and 
\begin{align}
k(t) = 
\begin{cases} 
1 \quad  t\in [0,\bar t)\\
\frac{3}{2} \quad  t\in [\bar t,\bar t + 1)\\
1\quad  t\in [\bar t + 1, \infty)
\end{cases}
\end{align}
We thus get
\begin{align}
x(t) = 
\begin{cases} 
x(0)e^{-rt} \quad  &t\in [0,\bar t)\\
x(\bar t)e^{-r\frac{3}{2}(t-\bar t)} \quad  &t\in [\bar t,\bar t + 1)\\
x(\bar t + 1)e^{-r(t-\bar t-1)}\quad  &t\in [\bar t + 1, \infty)
\end{cases}
\end{align}
Is it possible to get rid of the cases and give a general solution for $x(t)$ over $t \in [0,\infty)$?

REPLY [1 votes]: Hint.
With the Laplace transform
$$
\mathcal{L}(x(t)k(t)) = \int_0^{\bar t}x(t) e^{-st}dt + \frac 32\int_{\bar t}^{\bar t +1}x(t) e^{-st}dt +\int_{\bar t + 1}^{\infty}x(t) e^{-st}dt
$$
NOTE
$$
\int_a^b = \int_a^c - \int_b^c
$$
{"set_name": "stack_exchange", "score": 1, "question_id": 2935210}