0

I want to create the following set of curves. However, 2) is not ill-defined because it's not bijective. How can this graphed on Tikz? I tried drawing, but this doesn't produce smooth looking curves.

1) y=x^0.5-x

2) x=y^0.5-y

enter image description here

2
  • 2
    These are called parametric plots and can be made easily. – user121799 Mar 27 '18 at 18:06
  • 1
    "ill-defined because it's not bijective" should be ""well-defined because it's multivalued" – Benjamin McKay Mar 27 '18 at 19:07
5

Here an example using pgfplots, but you can do the same with TikZ only.

\documentclass[tikz,border=2mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\begin{document}
\tikzset{declare function={f(\x)=(\x)^(1/2)-\x;}}
\begin{tikzpicture}

\begin{axis}[domain=0:0.5,ytick={0,0.5,1},xtick={0,1,2,3,4},
xmin=0,ymin=0,ymax=0.5,xmax=0.5,mark=none,samples=100] 
  \addplot[very thick] {f(x)};
  \addplot[very thick] ({f(x)},{x});
\end{axis}  
\end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.