# TransformedRegion with piecewise function

Is it possible to use TransformedRegion with a Piecewise defined function?

I tried the following, but it doesn't work and I don't understand why.

V[{x_, y_}] = Piecewise[{{{2 x , y}, x < .5 }, {{.5 x , y}, x >=  .5}}];
Region[
TransformedRegion[Rectangle[], V]
]


EDIT: How does TranformedRegion transform a region? Why does it not work with simple discontinuous or non-differentiable transformations?

• What happens if you use Region[TransformedRegion[Rectangle[], {Piecewise[{{2 Indexed[#, 1], Indexed[#, 1] < 1/2}, {Indexed[#, 1]/2, Indexed[#, 1] >= 1/2}}], Indexed[#, 2]} &]]? – J. M.'s torpor May 2 '20 at 11:14

The map under consideration is discontinuous on Rectangle[] . I have doubts whether TransformedRegion works with such maps. The command

Region[TransformedRegion[Rectangle[], Function[p, {Piecewise[{{2*p[[1]], p[[1]] < 1/2},
{1/2*p[[1]], p[[1]] >= 1/2}}], p[[2]]}]]]


crashes the kernel on my comp and the command

Region[TransformedRegion[Rectangle[], Function[p, {Piecewise[{{2*p[[1]], p[[1]] < 1/2},

{3*p[[1]] - 1/2,p[[1]] >= 1/2}}], p[[2]]}]]]


, where the map is continuous, works well.

r1 = TransformedRegion[Rectangle[{0, 0}, {1/2, 1}],Function[p, {2*p[[1]], p[[2]]}]]

• Thanks. I had already figured out that TransformedRegion does not work well with discontinuous functions. I guess what I wanted to ask was why? How does TransformedRegion work? I like to understand the reason behind this limitation. – Cantor May 20 '20 at 6:57
• @Cantor: Your question "How does TransformedRegion work? I like to understand the reason behind this limitation" should be addressed to Mathematica developers. As I was informed by Maple developers, the analogous command of Maple finds the image of the boundary of a transformed region and then fills its interior. If a map is discontinuous, then the image of the boundary as a rule consists of several pieces and the command of Maple does not work. Don't hesitate to ask for further explanation in need. – user64494 May 20 '20 at 9:23