# How to plot the graph of sine and its inverse function in same coordinates?

I a trying to plot this graph using tikz picture, but I am still failed to get. I don't know what to do to plot this. I tried with this

\documentclass[10pt]{article}
\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\begin{center}
\begin{tikzpicture}
\begin{axis}
[width=2.3in,
axis line style = thick,
ymin=-1.2,ymax=1.2,
xmin=-2.1,xmax=2.1,
%clip=false,
xtick=\empty,
ytick={-1,0,1},
extra x ticks={3.14, 6.28},
extra x tick labels={$\pi$},
every extra x tick/.style={
xticklabel style={anchor=north west},
%       grid=major,
%       major grid style={dashed,black}
},
axis lines = center,
xlabel=$x$,ylabel=$y$,
domain=-.5*pi:.5*pi,
samples=200,]
%   \addplot [domain=-1:1, black, thick]  {asin(x)};
%\addlegendentry{$y=\arcsin(x)$};
\node at (axis cs:0.2, -0.22) {$O$} ;
\node at (axis cs:6.48,-0.28)   {$2\pi$};
\node at (axis cs:-1.57,-0.29)   {$\frac{-\pi}{2}$};
\node at (axis cs:-3.55,-0.29)   {$-\pi$};
\node at (axis cs:1.7,-0.29)   {$\frac{\pi}{2}$};
\node at (axis cs:-6.28,-0.29)   {$-2\pi$};
%   \node at (axis cs:3.6,-0.9)   {$A$};
%   \node at (axis cs:5.8,-0.9)   {$B$};
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}


• Since |\sin(x)|\le|x| \forall x, |\sin(x)|\le 1 \forall x, and \sin'(0)=\cos(0)=1, the blue line in your screenshot cannot be a correct representation of the sine function.
– Mico
Commented Jul 23, 2020 at 21:15

so first, your figure seems wrong. This is definitely not a sin function, which only ossilates between -1 and 1.

what I belive you where trying to do, can be accomplished by this:

\begin{tikzpicture}
\begin{axis}[
samples=500,
xtick={-1.57,-1,0,1,1.57},
xticklabels={$-\pi/2$,-1,0,1,$\pi/2$},
axis line style = thick,
axis lines = center,
]