First-order linear ordinary differential equation with piecewise constant source term Find a continuous solution satisfying the DE: $\frac{dy}{dx} + 2y = f(x)$
$$\begin{align}
f(x) &= \begin{cases}
1, &  0 \leq x \leq 3 \\
0, &  x>3\text{.}\end{cases}\\
y(0)&=0\end{align}
$$
I don't get this problem at all. Can anyone explain what the above means for starters?

This ODE is first order linear. You've probably seen it as follows: Consider
$$ \left \{ \begin{array}{cc} y'(x) + p(x) y(x) = g(x) \\y(0) =0 \end{array} \right.$$
The solution is found using an integrating factor
$$ \mu (x) = \exp \left [ \int_{0}^x p(s) ds  \right ]$$
and "factoring" the ODE to obtain
$$ y(x) = \frac{1}{\mu(x)} \int_{0}^x \mu(s) g(s) ds  $$
Thus in our case we have
$$ \mu(x) = \exp \left [ \int_0^x 2ds \right ] = \exp (2x) $$
so
$$y(x) = e^{-2x} \int_0^x 1_{[0,3]}(s)e^{2s} ds =  \left \{ \begin{array}{cc} \frac{1}{2}(e^{-2x}-1) & x <3 \\ \frac{1}{2}(e^{-2x}-e^{6-2x}) & x\geq 3 \end{array} \right . $$
Notice that the limit from both side of $y$ to $x=3$ approach the same limit. Thus $y$ is continuous.
