I'm writing about the volume by an integral, and I had to draw this.

How do I draw it properly?
Here is my codes:
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\usepackage[lmargin=3cm,rmargin=2cm,tmargin=2cm,bmargin=1.7cm]{geometry}
\begin{document}
\begin{tikzpicture}[scale=0.6]
\draw[->] (-1,0) -- (25,0) node[right] {$x$};
\draw (0,0) -- (4,0) -- (4,1.93) -- cycle;
\draw[dashed] (0,0) -- (4,0) -- (4,-1.93) -- cycle;
\draw[dashed,sloped] (4,-1.93) .. controls (3.3,0) .. (4,1.93) ;
\draw[dashed,sloped] (4,-1.93) .. controls (4.7,0) .. (4,1.93) ;
\draw[sloped] (5,0) .. controls (6.19,1.86) and (7.74,1.12) .. (8.2,1.83) ;
\draw[sloped,dashed] (5,0) .. controls (6.19,-1.86) and (7.74,-1.12) .. (8.2,-1.83) ;
\draw[dashed,sloped] (8.2,-1.83) .. controls (8.7,0) .. (8.2,1.83) ;
\draw[dashed,sloped] (8.2,-1.83) .. controls (7.7,0) .. (8.2,1.83) ;
\draw[sloped] (9,0) .. controls (11.04,1.96) .. (14.59,0) ;
\draw[sloped,dashed] (9,0) .. controls (11.04,-1.96) .. (14.59,0) ;
\draw[dashed,sloped] (11.04,-1.5) .. controls (10.5,0) .. (11.04,1.5) ;
\draw[dashed,sloped] (11.04,-1.5) .. controls (11.5,0) .. (11.04,1.5) ;
\draw (15.79,0) -- (17.5,1.93) -- (22,0) -- cycle;
\draw[dashed] (15.79,0) -- (17.5,-1.93) -- (22,0) -- cycle;
\draw[dashed,sloped] (17.5,-1.93) .. controls (16.8,0) .. (17.5,1.93) ;
\draw[dashed,sloped] (17.5,-1.93) .. controls (18.1,0) .. (17.5,1.93) ;
\end{tikzpicture}
\end{document}


pstricksso may be you are telling it not to do so. – Manuel Mar 17 '14 at 15:02