[pstricks] inverse functions

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Wed Sep 24 13:09:40 CEST 2003


Bhaskaracharya Pratishthana sagte:

> I used pst-plot to draw functions and trignometric functions.
> How to draw inverse trignometric functions.?
> e.g.cos inverse etc

PostScript doesn't know the arccos, so you have to do
it with the atan function.

Herbert


\documentclass{article}
\usepackage{amsmath}
\usepackage{pst-plot}
\begin{document}
\psset{xunit=2}
\begin{pspicture}(-1.5,-5)(1.5,3)
	\psaxes{->}(0,0)(-1.5,-5)(1.5,3)
	\psplot[plotpoints=500, linewidth=1.5pt]%
		{-1}{1}{/k 3.141 180 div def
			x dup dup mul neg 1 add sqrt atan k mul neg 1.56 add}
	\psplot[plotpoints=500, linewidth=1.5pt]% the nagative values of the root
		{-1}{1}{/k 3.141 180 div def
			x dup dup mul neg 1 add sqrt neg atan k mul neg 1.56 add}
	\uput[-45](1.25,0){$x$}
	\uput[180](0,3.25){$y$}
	\rput[l](0.4,2){$\mathbf{f(x)=\arccos x}$}
\end{pspicture}

\end{document}


-- 
Dr.-Ing Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE






More information about the PSTricks mailing list