# Graphing arcsin(x)

Hartmut Henkel hartmut_henkel at gmx.de
Sun Nov 21 23:40:52 CET 2021

On Sun, 21 Nov 2021, Djones9976 via texhax wrote:

> Can someone please tell me how to plot a graph of arcsin(x).  I can
> plot arccos(x) and arctan(x) using the codes below, but all I get is a
> blank when I try to plot arcsin.  I read somewhere that postscript
> only recognizes arctan(x) but I don't know if that is my problem.  As
> you will see from this code, I am trying to avoid tikz because so much
> other code is written without it and putting them together just
> confuses the issue. Many thanks,

\documentclass{article}
\begin{document}
\begin{figure}
\psset{algebraic=true,plotpoints=501}
\begin{pspicture}(-3,-1.5)(3,1.5)
\psaxes[xunit=1](0,0)(-6.283,-1.5)(6.283,1.5)
\psclip{\psframe[linestyle=none](-3,-2)(3.15,4)}%
\psplot[linecolor=blue,linestyle=dashed,linewidth=2pt]{-1}{1}{asin(x)}
\psplot[linecolor=red,linestyle=dashed,linewidth=2pt]{-1}{1}{acos(x)}
\endpsclip % <------------ was missing
\end{pspicture}
\caption{Inverse Trigonometric plots in algebraic notation}
\end{figure}
\newpage
\begin{figure}
\psset{algebraic=false,plotpoints=501}
\begin{pspicture}(-3,-1.5)(3,1.5)
\psaxes[xunit=1](0,0)(-6.283,-1.5)(6.283,1.5)
\psclip{\psframe[linestyle=none](-3,-2)(3.15,2)}%
\psplot[linecolor=green]{-3.14}{3.14}{x ATAN }
\endpsclip
\end{pspicture}
\caption{Inverse Trigonometric plots in reverse polish notation}
\end{figure}
\end{document}

...the above example works here with latex & dvips, an \endpsclip was
missing, giving an "! Extra }, or forgotten \endgroup." error.

Best Regards, Hartmut

> D. W. Jones
> djones9976 at aol.com
>
>  \begin{figure}
> \psset{algebraic=true,plotpoints=501}
> \begin{pspicture}(-3,-1.5)(3,1.5)
> \psaxes[xunit=1](0,0)(-6.283,-1.5)(6.283,1.5)
> \psclip{\psframe[linestyle=none](-3,-2)(3.15,4)}%
> \psplot[linecolor=blue,linestyle=dashed,linewidth=2pt]{-1}{1}{asin(x)}
> \psplot[linecolor=red,linestyle=dashed,linewidth=2pt]{-1}{1}{acos(x)}
> \end{pspicture}
> \caption{Inverse Trigonometric plots in algebraic notation}
> \end{figure}
> \newpage
>
> \begin{figure}
> \psset{algebraic=false,plotpoints=501}
> \begin{pspicture}(-3,-1.5)(3,1.5)
> \psaxes[xunit=1](0,0)(-6.283,-1.5)(6.283,1.5)
> \psclip{\psframe[linestyle=none](-3,-2)(3.15,2)}%
> \psplot[linecolor=green]{-3.14}{3.14}{x ATAN }
> \endpsclip
> \end{pspicture}
> \caption{Inverse Trigonometric plots in reverse polish notation}
> \end{figure}