\documentclass[border=5,tikz]{standalone}
%\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{intersections}
\begin{document}

\begin{tikzpicture}[>=stealth,scale=2]
\filldraw[fill=cyan,draw=none]
(1,0) -- ++(0,1)            %start and rise
to[out=20,in=170] ++(2,1)   %graph
-- ++(0,-2) -- cycle;       %down and back
\draw[->] (-1,0) -- (4.2,0) node[below left] {$x$};        
\draw[->] (0,-0.5) -- (0,3.2) node[below left] {$y$};
\draw
(1,0) ++(0,1)               %start+rise => removed: --
+(-0.5,0)                   %a little back!
to[out=0,in=180+20] +(0,0)  %draw!
to[out=20,in=170] ++(2,1)   %graph
to[out=170+180,in=180] +(0.5,0)%a little forward!
 ++(0,-2);                  %down and back => removed: --, cycle
\filldraw (1,0) circle (1.5pt) node[below left]{$a$};
\filldraw (3,0) circle (1.5pt) node[below left]{$b$};
\draw[dashed] (1,0) +(0,-0.5) -- +(0,3);
\draw[dashed] (3,0) +(0,-0.5) -- +(0,3);
\draw (2,0.5) node[]{$A$};
\end{tikzpicture}

\end{document}