Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}[scale=1,>=latex,x=1.5cm,y=0.8cm]
        \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$};
    \end{tikzpicture}
\end{document}
share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.