plotting Piecewise function and Circles

Hi.

How can I graph a piecewise function that includes the equation of a circle/circles?

Best,
P.Kay

Hi,

I am not quite sure what exactly you want, but this involves a piecewise function of the equation of circles:

Plot[Piecewise[{{Sqrt[1 - x^2], x < 1}, {Sqrt[1 - (x - 2)^2], x > 1}}], {x, -1, 3}, AspectRatio -> 1/4]

This one also might be a possible answer:

ParametricPlot[Piecewise[{{{Cos[u], Sin[u]}, u < 2 Pi}, {{Cos[u] + 2., Sin[u] + 2.},u > 2 Pi}}], {u, 0, 4 Pi}]

Note that Piecewise has this form

so it does not actually have a slot for the equations for a circle. It needs the values in the form of a function.

Hope this helps,

M.

Hi Marco,
Thank you for taking the time and answering my question. I’m new to Mathematica and this was exactly what I was looking for.

Best regards,
P.Kay