Let $y(x)$ be a continuous solution of the IVP:
$$\left\{\begin{eqnarray}y'+2y &=& f(x)\\y(0) &=& 0\end{eqnarray}\right.$$
Find $y(\dfrac{3}{2})$.
$$f(x) = \begin{cases} 1 &\text{$0\leq x\leq 1$} \\ 0 &\text{$x>1$} \end{cases}$$
My try :
I solved it in two cases:
Case 1:$x\in [0,1]$ taking $y^{'}+2y=1$ and using $y(0)=0$ on solving I get $y=\dfrac{1-e^{-2x}}{2}$
case 2:$x>1$ taking $y^{'}+2y=0$; I get $\ln y=-2x+c$ where $c$ is a constant.
what should I do now?
Your task is to glue the functions together at $x=1$.
As commented by @amd it might be better to first write the function in the second case as $y=Ce^{-2x}$. Then, for the function to be continuous at $x=1$, you should find $C$ so that the expression to the left of $x=1$ and the expression to the right of $x=1$ agrees at $x=1$, i.e. you should solve the equation $$ \frac{1-e^{-2\cdot 1}}{2}=Ce^{-2\cdot 1}. $$
In the figure below, you find the expression to the left in blue. To the right of $x=1$ you see several curves, corresponding to different values of $C$. The red ones correspond to wrong values of $C$, since for these there is a jump at $x=1$. The green one is the correct one.
Once, you have calculated the value of $C$, you just have to insert $x=3/2$ into $y=Ce^{-2x}$.