Plot[Piecewise[{{Sqrt[2 - x^2/2], x < 2}, {Sqrt[(-4 + x^2)/(-2 + x^2)], x > 2}}], {x, 0, 4}]