TikZ seems to graph the cube root function with the code provided - on the positive x-axis. Why isn't TikZ plotting the whole graph?
\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\noindent \hspace*{\fill}
\begin{tikzpicture}
\begin{axis}[width=6in,axis equal image,clip=false,
axis lines=middle,
xmin=-10,xmax=10,
domain=-10:10, samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-2.5,ymax=2.5,
restrict y to domain=-2.5:2.5,
enlargelimits={abs=1cm},
axis line style={latex-latex},
ticklabel style={font=\tiny,fill=white},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=501,domain=-10:10,blue] {x^(1/3))} node[above,pos=0.9]{$\scriptstyle{y} = f(x)$};
\end{axis}
\end{tikzpicture}
\hspace{\fill}
\end{document}
exp(ln(x)/3). That's the way it is defined in any pocket calculator. – Bernard Oct 12 '14 at 00:29twoplots: one between -10 and -0.0001, say, of-(-x)^(1/3), and one between 0.0001 and 10 ofx^(1/3). Not sure how tikz works, but mathematically, you'll have problems at 0, hence the very small but non zero values. However if tikz has asignand anabsfunction (I don't know: personally I do these things with pstricks), it might be simpler to plotsgn(x)(abs(x))^(1/3)between -10 and 10. – Bernard Oct 12 '14 at 00:48abswas the code for absolute value function. – Adelyn Oct 12 '14 at 15:58abs(\x)(with a backslash for the variable). As I said, I really don't know tikz (I only use tikz-cd, with is a quite different thing from plotting functions. Let me add that you can plot your function in one stroke if you know how to plot parametric curves (it's the curvex=t³, y=t), but you'll have to compute the bounds that correspond to x = –10 and x = 10. – Bernard Oct 12 '14 at 16:27