\documentclass[a4paper,12pt]{article}
\usepackage{pstricks,pstricks-add,pst-3dplot,pst-func,fourier,fullpage}
\usepackage{amsmath}
\usepackage{graphicx}
%\usepackage{xepersian}
%\settextfont[Scale=1]{XB Niloofar}
%\setlatintextfont[Scale=1]{Linux Libertine}
%\setdigitfont[Scale=1]{XB Zar}
%\title{رسم توابع با \lr{\textsf{PSTricks}}}
%\author{وفا خلیقی}
\newcommand*\func{ x 3 exp x y 4 exp mul add x 5
  div sub 10 mul 2.729 x dup mul y dup mul add
  neg exp mul 2.729 x 1.225 sub dup mul y dup
  mul add neg exp add }
\begin{document}
%\maketitle
\begin{figure}[h]
\centering
\begin{pspicture}(-6,-3)(6,4)
  \psset{Alpha=45,Beta=15,unit=0.75}
  \psplotThreeD[plotstyle=curve,
     yPlotpoints=50,xPlotpoints=80,
     linewidth=0.5pt](-4,4)(-4,4){\func}
  \pstThreeDCoor[xMin=-1,xMax=5,yMin=-1,
                 yMax=5,zMin=-1,zMax=3.5]
\end{pspicture}
\caption{نمودار تابع $z(x,y)=10\left(x^3+xy^4-\frac{x}{5}\right)e^{-(x^2+y^2)}+e^{-\left((x-1.225)^2+y^2\right)}$}
\end{figure}


\begin{align}
f(x) &= 6 + 3x-x^2\label{eq1}\\
g(x) &= 2 -x - x^2 + 0.5x^3 -0.1x^4 + 0.025x^5\label{eq2}\\
h(x) &= -2 + x - x^2 + 0.5x^3 + 0.1x^4 + 0.025x^5 + 0.2x^6\label{eq3}\\
h∗(x) &= -2 + (x - 1) - (x - 1)^2 + 0.5(x - 1)^3+ 0.1(x - 1)^4 + 0.025(x - 1)^5 + 0.2(x - 1)^6\label{eq4}
\end{align}\newpage

\begin{figure}[h]

\centering
\psset{yunit=0.5cm,xunit=1cm}
\begin{pspicture*}(-3,-5)(5,10)
\psaxes[Dy=2]{->}(0,0)(-3,-5)(5,10)
\psset{linewidth=1.5pt}
\psPolynomial[coeff=6 3 -1,linecolor=red]{-2}{5}
\psPolynomial[coeff=2 -1 -1 .5 -.1 .025,linecolor=blue]{-1.8}{4}
\psPolynomial[coeff=-2 1 -1 .5 .1 .025 .2 ,linecolor=magenta]{-2}{4}
\psPolynomial[coeff=-2 1 -1 .5 .1 .025 .2 ,linecolor=magenta,xShift=1,linestyle=
dashed]{-2}{4}
\rput[lb](4,4){\textcolor{red}{$f(x)$}}
\rput[lb](4,8){\textcolor{blue}{$g(x)$}}
\rput[lb](2,4){\textcolor{magenta}{$h(x)$}}
\end{pspicture*}

\caption{.}
\end{figure}

:\\
\begin{center}

\psset{unit=1.25cm}
\begin{pspicture}[plotpoints=200](-0.5,-3)(10,2.5)
  \psStep[algebraic,fillstyle=solid,fillcolor=yellow]
         (0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)}
  \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=blue]
         (0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)}
  \psaxes{->}(0,0)(0,-2.75)(10,2.5)
  \psplot[algebraic,linecolor=white,labelFontSize=\footnotesize]
         {0.001}{9.75}{2*sqrt(x)*cos(ln(x))*sin(x)}
  \uput[90](6,1.2){$f(x)=2\cdot\sqrt{x}\cdot\cos{(\ln{x})}\cdot\sin{x}$}
\end{pspicture}
\end{center}
\end{document}