Hello,
while going through my old University notes, I discovered this nice function.
A college of mine (hi Michael!) wanted to build a function which forms a heart and this is our result.
Obviously, a function cannot do this as you have multiple -values for one -value but combining two functions in two regimes, you can get close ( it is still missing that the first derivative must converge against for ).
Here is the result:
{% pdflatex usepackage=tikz %} \begin{tikzpicture} \draw[->] (-1.1,0) -- (1.1,0) node[right] {}; \draw[->] (0,-1.1) -- (0,1.1) node[above] {}; \draw[samples=100, domain=0:1,smooth,variable=\x,blue] plot ({\x}, {-sqrt(1-1/3(\x^2+2abs(\x)))}); \draw[samples=100, domain=0:1,smooth,variable=\x,blue] plot ({-\x}, {-sqrt(1-1/3(\x^2+2abs(\x)))}); \draw[samples=100, domain=0:1,smooth,variable=\x,red] plot ({\x}, {sqrt(abs(\x)-\x^2)}); \draw[samples=100, domain=0:1,smooth,variable=\x,red] plot ({-\x}, {sqrt(abs(\x)-\x^2)}); \end{tikzpicture}