This is a follow-up question to Area between curves.
After one day, i found out how to do it in LaTeX (Miktex):
\documentclass[10pt]{article}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-3.5,-0.5)(4,7)
\begin{psclip}{
\psplot[linestyle=none,algebraic,plotpoints=2000]{-3}{3}{x^2+1}%
\psline[linestyle=none,algebraic,plotpoints=2000](-1,1)(-1,2)(2,5)(2,1)
}%
\psframe*[linecolor=cyan,fillstyle=solid](-1,1)(2,5)
\end{psclip}
\psplot[algebraic,plotpoints=2000,yMaxValue=5.6]{-2.3}{2.3}{x^2+1}
\psplot[algebraic,plotpoints=2000]{-3.5}{2.5}{x+3}
\psaxes{->}(0,0)(-3.5,-.9)(4,6.5)
\uput[-90](3.9,-.2){$x$}
\uput[-135](-.2,6.7){$y$}
\end{pspicture}
\end{document}

Strange that the followwing code doesn't work:
\documentclass[10pt]{article}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-3.5,-0.5)(4,7)
\begin{psclip}{
\psplot[linestyle=none,algebraic,plotpoints=2000]{-1.2}{2.2}{x^2+1}%
\psplot[linestyle=none,algebraic,plotpoints=2000]{-1.2}{2.2}{x+3}
}%
\psframe*[linecolor=cyan,fillstyle=solid](-1,1)(2,5)
\end{psclip}
\psplot[algebraic,plotpoints=2000,yMaxValue=5.6%,linecolor=cyan
]{-2.3}{2.3}{x^2+1}
\psplot[algebraic,plotpoints=2000]{-3.5}{2.5}{x+3}
\psaxes{->}(0,0)(-3.5,-.9)(4,6.5)
\uput[-90](3.9,-.2){$x$}
\uput[-135](-.2,6.7){$y$}
\end{pspicture}
\end{document}
Looks like the problem is with functions like f(x)= ax + b.
Am i correct?

\psline[linestyle=none,algebraic,plotpoints=2000](-1,1)(-1,2)(2,5)(2,1)by\psplot[linestyle=none,algebraic,plotpoints=2000]{-1.2}{2.2}{x+3}makes the filling of the area stop working? No idea for my part… – Franck Pastor Feb 15 '15 at 17:11