绘制 f(x)= sin ^-1(x) 返回错误!

绘制 f(x)= sin ^-1(x) 返回错误!

我正在尝试绘制函数 f(x)= sin ^-1(x)。但我只收到了错误消息“缺少数字,视为零。...samples=100] plot (\x,{(sin)^(-1)(deg(\x))})”.. 我无法弄清楚问题出在哪里。

    \documentclass[border = 12]{standalone}

    \usepackage{ifthen}
    \usepackage{makecell,amsmath}
    \usepackage{pgfmath}
    \usepackage{standalone}
    \usepackage{stix}
    \usepackage{tkz-euclide}
    \usepackage{tikz}
    \usetkzobj{all}
    \usetikzlibrary{angles}
    \usetikzlibrary{automata}
    \usetikzlibrary{arrows}
    \usetikzlibrary{arrows.meta}
    \usetikzlibrary{calc}
    \usetikzlibrary{decorations.markings}
    \usetikzlibrary{intersections}
    \usetikzlibrary{patterns}
    \usetikzlibrary{positioning}
    \usetikzlibrary{quotes}
    \usetikzlibrary{shapes}
    \usetikzlibrary{shapes.callouts}
    \usetikzlibrary{shapes.geometric}



    \begin{document}
    \begin{tikzpicture}


    \begin{scope}[thick,scale=2,>={Latex}, font=\fontsize{11.25}{11.25}\selectfont]
    \pgfgettransformentries{\mya}{\myb}{\myc}{\myd}{\mys}{\myt}
    \pgfmathsetmacro{\preserve}{1/\mya}

    \foreach \x/\m in {{-pi/2}/-\frac{\pi}{2},{-pi/4}/-\frac{\pi}{4},{pi/4}/\frac{\pi}{4},{pi/2}/\frac{\pi}{2}}
    \draw (\x,3pt*\preserve)--(\x,-3pt*\preserve) node [below] {$\m$};


    \foreach \y in {-1,1}
    \draw (3pt*\preserve,\y)--(-3pt*\preserve,\y) node [left] {$\y$};


    \draw [ultra thick, domain={-pi/2*1.08}:{pi/2*1.08},samples=100, <->] plot (\x,{sin(deg(\x))});

    \draw [ultra thick, domain={-pi/4}:{pi/4},samples=100] plot (\x,{(sin)^(-1)(deg(\x))});
    \node [Bluey!160!] at (1.15,0.4) {$f(x)=\sin x$};


    \draw[<->](0,-1.5)--(0,1.5)node[above]{$y$};
    \draw[<->](-2,0)--(2,0)node[right]{$x$};


    \end{scope} 

    \end{tikzpicture}

    \end{document} 

相关内容