The curve defined by x²+y²=4|x|+4|y| can be expanded, quadrant by quadrant, into the equations of four circles, splitting the whole curve into four regions, each corresponding to a semicircular arc. When drawing the plot, use four distinct colors to mark these four arcs, and place next to each arc a label showing the equation of its corresponding circle, with the label color kept consistent with the arc’s region. Finally, produce a complete image that satisfies all the above requirements.
PiecewiseExpand[eqn = x^2 + y^2 == 4 RealAbs[x] + 4 RealAbs[y], Reals]
ContourPlot[
Evaluate[eqn = x^2 + y^2 == 4 RealAbs[x] + 4 RealAbs[y]], {x, -5,
5}, {y, -5, 5}, AxesOrigin → {0, 0}, Frame → False, Axes → True,
AspectRatio → Automatic]
The code above expands the equation into the four region-wise circle equations and draws the plot — so how can we produce the exact image required by the earlier description?
