I am attempting to create the following pgfplot of the function:
\documentclass[10pt, oneside]{article}
\usepackage{pgfplots}
\pgfplotsset{width=10cm,compat=1.9}
\begin{document}
\begin{tikzpicture}[scale=0.75]
\begin{axis}[
axis lines = left,
ymax=1,
ymin=0,
xlabel = \( x \),
ylabel = {\( f(x) \)},
xtick={0,1},
xticklabels={$0$,$1$},
ytick={0,1},
yticklabels={$0$,$1$},
]
\addplot[domain=0:1, samples = 500, color=red, style=very thick] {(2 / pi)*asin(sqrt(x)) };
\end{axis}
\end{tikzpicture}
\end{document}
But the plot erroneously outputs as
What is the reason for this, and what would the remedy be?