TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to illustrate the disk and shell methods for computing the volume of solids of revolution. I was able to use the following code to create a typical approximating disk when the revolution is about the x-axis. I am stuck on how to create a typical approximating shell when the same region is revolved about the y-axis. How might I achieve this?

        \fill[fill=green,opacity=0.5] (1,0) -- plot[domain=1:4] (\x,{sqrt(2*(\x)+1))}) -- (4,0);
        \fill[fill=green,opacity=0.5] (1,0) -- plot[domain=1:4] (\x,{-sqrt(2*(\x)+1))}) -- (4,0);
        \draw[-,thick,domain=-.2:4.5,samples=100] plot (\x,{sqrt(2*(\x)+1))}) node[right] {\footnotesize $y=f(x)$};
        \draw[-,thick,domain=-.2:4.5,samples=100] plot (\x,{-sqrt(2*(\x)+1))});
        \draw[fill=gray!50] (4,0) circle [x radius =.2 , y radius =3];
        \draw[fill=gray!50] (1,0) circle [x radius =.2 , y radius =1.732050808];
        \draw[fill=red!40] (2.3,0) circle [x radius =.2 , y radius =2.449489743];
        \fill[red!40] (2.3,-2.449489743) rectangle (2.7,2.449489743);
        \draw[fill=red!40] (2.7,0) circle [x radius =.2 , y radius =2.449489743];
        \draw (2.3,2.449489743) -- (2.7,2.449489743);
        \draw (2.3,-2.449489743) -- (2.7,-2.449489743);
        \draw[<->] (2.3,-2.6) -- (2.7,-2.6) node[below, midway] {\footnotesize $\Delta x$};
        \draw[<->] (2.9,0) -- (2.9,2.449489743) node[right, midway]  {\footnotesize $R$};
        \draw[->,thick] (-1,0) -- (5,0) node[above] {\footnotesize $x$};
        \draw[->,thick] (0,-5) -- (0,5) node[below right]{\footnotesize $y$};
        \draw[-] (1,3pt) -- (1,-3pt) node[below] {\footnotesize $a$};
        \draw[-] (4,3pt) -- (4,-3pt) node[below] {\footnotesize $b$};
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.