# ParametricPlot and Piecewise function

I want to create a ParametricPlot with multiple Piecewise functions in it. I have tried the following code but it doesn't work

ParametricPlot[Piecewise[{{Cos[x] + x/2, 1 > x > 16}, {Sin[x], 16 > x > 20}}], {x, 0, 21}, Axes -> True]


Basically I want my graph to show a loop but only for a certain interval, as shown in this image:

I used the following command for it:

ParametricPlot[{Cos[x] + x/2, Sin[x]}, {x, 1, 16}]

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory Tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Sep 1 '15 at 2:45
• I'm still confused. It seems like you managed to plot what you wanted. Do you mean you want this same plot, just with PlotRange -> {{1, 20}, All}? Or do you want some other function plotted for 16 < x < 20 (because that is not at all clear from your initial attempt)? If so, please provide this other function. – march Sep 1 '15 at 3:31
• Let me get this straight: you are plotting a trochoid, and you only want a few pieces of it, yes? Then you don't need the complication of Piecewise[]. – J. M. will be back soon Sep 1 '15 at 4:17

ParametricPlot[{Cos[x] + x/2, Sin[x]}, {x, 0, 21}, Axes -> True,