Answer
$$y=2\sin \frac{\pi x}{2}$$
Work Step by Step
Looking at the graph, we find that this is the graph of a sine function with amplitude $2$ and period $4$. So, we conclude that$$A=2, \quad B=\frac{2\pi }{4 }=\frac{\pi }{2} \\ \Rightarrow \quad y=A \sin Bx = 2 \sin \frac{\pi x }{2}.$$