Drawing the volume of revolution of a region bounded by two curves
up vote
3
down vote
favorite
I've been preparing my submission of my calculus assignment, and have been typesetting it in LaTeX, using Overleaf v2.
There are problems involving the volume (and surface areas) of the solid of revolution of functions about their axes, and I really wanted to get some neat-looking vector graphics in my submission, but TikZ, Asymptote and PGF have proven to be extremely daunting.
How would I start drawing the volume of revolution of the region bounded by x^2 and x^3, about the x-axis, for instance? If I understood this, I can extend the idea to the rest of the questions.
I understand that MWEs are useful, but I can't get the barest minimum, let alone get it to work.
tikz-pgf asymptote
New contributor
add a comment |
up vote
3
down vote
favorite
I've been preparing my submission of my calculus assignment, and have been typesetting it in LaTeX, using Overleaf v2.
There are problems involving the volume (and surface areas) of the solid of revolution of functions about their axes, and I really wanted to get some neat-looking vector graphics in my submission, but TikZ, Asymptote and PGF have proven to be extremely daunting.
How would I start drawing the volume of revolution of the region bounded by x^2 and x^3, about the x-axis, for instance? If I understood this, I can extend the idea to the rest of the questions.
I understand that MWEs are useful, but I can't get the barest minimum, let alone get it to work.
tikz-pgf asymptote
New contributor
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I've been preparing my submission of my calculus assignment, and have been typesetting it in LaTeX, using Overleaf v2.
There are problems involving the volume (and surface areas) of the solid of revolution of functions about their axes, and I really wanted to get some neat-looking vector graphics in my submission, but TikZ, Asymptote and PGF have proven to be extremely daunting.
How would I start drawing the volume of revolution of the region bounded by x^2 and x^3, about the x-axis, for instance? If I understood this, I can extend the idea to the rest of the questions.
I understand that MWEs are useful, but I can't get the barest minimum, let alone get it to work.
tikz-pgf asymptote
New contributor
I've been preparing my submission of my calculus assignment, and have been typesetting it in LaTeX, using Overleaf v2.
There are problems involving the volume (and surface areas) of the solid of revolution of functions about their axes, and I really wanted to get some neat-looking vector graphics in my submission, but TikZ, Asymptote and PGF have proven to be extremely daunting.
How would I start drawing the volume of revolution of the region bounded by x^2 and x^3, about the x-axis, for instance? If I understood this, I can extend the idea to the rest of the questions.
I understand that MWEs are useful, but I can't get the barest minimum, let alone get it to work.
tikz-pgf asymptote
tikz-pgf asymptote
New contributor
New contributor
New contributor
asked yesterday
SRSR333
162
162
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
Here's a possible solution using the sagetex
package. This uses a computer algebra system, Sage, to do the work. Documentation for volumes of revolution is here. The documentation refers to running commands using Sage. To get this into a LaTeX document, some adjustments are required.
documentclass{article}
usepackage{sagetex}
begin{document}
This is volume of revolution when area bounded by $f(x)=x^2$ and $g(x)=x^3$
is rotated around the $x$-axis:
begin{sagesilent}
u = var("u")
f = u^2
g = u^3
sur1=revolution_plot3d(f,(u,0,1),opacity=0.5,rgbcolor= (1,0.5,0),show_curve=True,parallel_axis='x') #rotate u^2 around the x-axis
sur2 = revolution_plot3d(g, (u,0,1), opacity=0.5, rgbcolor= (0,1,0),parallel_axis='x') #rotate u^3 around the x-axis
Mypic = sur1+sur2 #combine the 2 graphs
end{sagesilent}
begin{center}
sageplot[width=3.5in]{Mypic}
end{center}
end{document}
The result, running in Cocalc, is below:
Be aware, Sage is not part of the LaTeX distribution so it either has to be installed on your computer or accessed through Cocalc.
Thanks for the reply; I ended up leaving some space and drew the diagram by hand, as the deadline was approaching. I'll keep this in mind for the next assignment, though.
– SRSR333
14 hours ago
add a comment |
up vote
2
down vote
Welcome to TeX.SE! If you compile
documentclass{standalone}
usepackage{asypictureB}
begin{document}
begin{asypicture}{name=hyperboloid}
// from http://asymptote.sourceforge.net/gallery/hyperboloid.asy
settings.outformat="pdf";
settings.prc = false;
size(200);
import solids;
currentprojection=perspective(4,4,3);
revolution quadratic=revolution(graph(new triple(real z) {
return (z,0,z*z);},-1,1,40,operator ..),axis=X);
revolution cubic=revolution(graph(new triple(real z) {
return (z,0,z*z*z);},-1,1,40,operator ..),axis=X);
revolution linear=revolution(graph(new triple(real z) {
return (z,0,z);},-1,1,40,operator ..),axis=X);
draw(surface(quadratic),green,render(compression=Low,merge=true));
draw(surface(cubic),blue,render(compression=Low,merge=true));
draw(surface(linear),red,render(compression=Low,merge=true));
end{asypicture}
end{document}
with
pdflatex -shell-escape
you'll get
As you can see, for the choice x^2
and x^3
the result is not really spectacular, at least not in the domain I chose. To get a more spectacular result, you may want to adjust the function(s) and/or domain.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
Here's a possible solution using the sagetex
package. This uses a computer algebra system, Sage, to do the work. Documentation for volumes of revolution is here. The documentation refers to running commands using Sage. To get this into a LaTeX document, some adjustments are required.
documentclass{article}
usepackage{sagetex}
begin{document}
This is volume of revolution when area bounded by $f(x)=x^2$ and $g(x)=x^3$
is rotated around the $x$-axis:
begin{sagesilent}
u = var("u")
f = u^2
g = u^3
sur1=revolution_plot3d(f,(u,0,1),opacity=0.5,rgbcolor= (1,0.5,0),show_curve=True,parallel_axis='x') #rotate u^2 around the x-axis
sur2 = revolution_plot3d(g, (u,0,1), opacity=0.5, rgbcolor= (0,1,0),parallel_axis='x') #rotate u^3 around the x-axis
Mypic = sur1+sur2 #combine the 2 graphs
end{sagesilent}
begin{center}
sageplot[width=3.5in]{Mypic}
end{center}
end{document}
The result, running in Cocalc, is below:
Be aware, Sage is not part of the LaTeX distribution so it either has to be installed on your computer or accessed through Cocalc.
Thanks for the reply; I ended up leaving some space and drew the diagram by hand, as the deadline was approaching. I'll keep this in mind for the next assignment, though.
– SRSR333
14 hours ago
add a comment |
up vote
3
down vote
Here's a possible solution using the sagetex
package. This uses a computer algebra system, Sage, to do the work. Documentation for volumes of revolution is here. The documentation refers to running commands using Sage. To get this into a LaTeX document, some adjustments are required.
documentclass{article}
usepackage{sagetex}
begin{document}
This is volume of revolution when area bounded by $f(x)=x^2$ and $g(x)=x^3$
is rotated around the $x$-axis:
begin{sagesilent}
u = var("u")
f = u^2
g = u^3
sur1=revolution_plot3d(f,(u,0,1),opacity=0.5,rgbcolor= (1,0.5,0),show_curve=True,parallel_axis='x') #rotate u^2 around the x-axis
sur2 = revolution_plot3d(g, (u,0,1), opacity=0.5, rgbcolor= (0,1,0),parallel_axis='x') #rotate u^3 around the x-axis
Mypic = sur1+sur2 #combine the 2 graphs
end{sagesilent}
begin{center}
sageplot[width=3.5in]{Mypic}
end{center}
end{document}
The result, running in Cocalc, is below:
Be aware, Sage is not part of the LaTeX distribution so it either has to be installed on your computer or accessed through Cocalc.
Thanks for the reply; I ended up leaving some space and drew the diagram by hand, as the deadline was approaching. I'll keep this in mind for the next assignment, though.
– SRSR333
14 hours ago
add a comment |
up vote
3
down vote
up vote
3
down vote
Here's a possible solution using the sagetex
package. This uses a computer algebra system, Sage, to do the work. Documentation for volumes of revolution is here. The documentation refers to running commands using Sage. To get this into a LaTeX document, some adjustments are required.
documentclass{article}
usepackage{sagetex}
begin{document}
This is volume of revolution when area bounded by $f(x)=x^2$ and $g(x)=x^3$
is rotated around the $x$-axis:
begin{sagesilent}
u = var("u")
f = u^2
g = u^3
sur1=revolution_plot3d(f,(u,0,1),opacity=0.5,rgbcolor= (1,0.5,0),show_curve=True,parallel_axis='x') #rotate u^2 around the x-axis
sur2 = revolution_plot3d(g, (u,0,1), opacity=0.5, rgbcolor= (0,1,0),parallel_axis='x') #rotate u^3 around the x-axis
Mypic = sur1+sur2 #combine the 2 graphs
end{sagesilent}
begin{center}
sageplot[width=3.5in]{Mypic}
end{center}
end{document}
The result, running in Cocalc, is below:
Be aware, Sage is not part of the LaTeX distribution so it either has to be installed on your computer or accessed through Cocalc.
Here's a possible solution using the sagetex
package. This uses a computer algebra system, Sage, to do the work. Documentation for volumes of revolution is here. The documentation refers to running commands using Sage. To get this into a LaTeX document, some adjustments are required.
documentclass{article}
usepackage{sagetex}
begin{document}
This is volume of revolution when area bounded by $f(x)=x^2$ and $g(x)=x^3$
is rotated around the $x$-axis:
begin{sagesilent}
u = var("u")
f = u^2
g = u^3
sur1=revolution_plot3d(f,(u,0,1),opacity=0.5,rgbcolor= (1,0.5,0),show_curve=True,parallel_axis='x') #rotate u^2 around the x-axis
sur2 = revolution_plot3d(g, (u,0,1), opacity=0.5, rgbcolor= (0,1,0),parallel_axis='x') #rotate u^3 around the x-axis
Mypic = sur1+sur2 #combine the 2 graphs
end{sagesilent}
begin{center}
sageplot[width=3.5in]{Mypic}
end{center}
end{document}
The result, running in Cocalc, is below:
Be aware, Sage is not part of the LaTeX distribution so it either has to be installed on your computer or accessed through Cocalc.
answered yesterday
DJP
6,83421629
6,83421629
Thanks for the reply; I ended up leaving some space and drew the diagram by hand, as the deadline was approaching. I'll keep this in mind for the next assignment, though.
– SRSR333
14 hours ago
add a comment |
Thanks for the reply; I ended up leaving some space and drew the diagram by hand, as the deadline was approaching. I'll keep this in mind for the next assignment, though.
– SRSR333
14 hours ago
Thanks for the reply; I ended up leaving some space and drew the diagram by hand, as the deadline was approaching. I'll keep this in mind for the next assignment, though.
– SRSR333
14 hours ago
Thanks for the reply; I ended up leaving some space and drew the diagram by hand, as the deadline was approaching. I'll keep this in mind for the next assignment, though.
– SRSR333
14 hours ago
add a comment |
up vote
2
down vote
Welcome to TeX.SE! If you compile
documentclass{standalone}
usepackage{asypictureB}
begin{document}
begin{asypicture}{name=hyperboloid}
// from http://asymptote.sourceforge.net/gallery/hyperboloid.asy
settings.outformat="pdf";
settings.prc = false;
size(200);
import solids;
currentprojection=perspective(4,4,3);
revolution quadratic=revolution(graph(new triple(real z) {
return (z,0,z*z);},-1,1,40,operator ..),axis=X);
revolution cubic=revolution(graph(new triple(real z) {
return (z,0,z*z*z);},-1,1,40,operator ..),axis=X);
revolution linear=revolution(graph(new triple(real z) {
return (z,0,z);},-1,1,40,operator ..),axis=X);
draw(surface(quadratic),green,render(compression=Low,merge=true));
draw(surface(cubic),blue,render(compression=Low,merge=true));
draw(surface(linear),red,render(compression=Low,merge=true));
end{asypicture}
end{document}
with
pdflatex -shell-escape
you'll get
As you can see, for the choice x^2
and x^3
the result is not really spectacular, at least not in the domain I chose. To get a more spectacular result, you may want to adjust the function(s) and/or domain.
add a comment |
up vote
2
down vote
Welcome to TeX.SE! If you compile
documentclass{standalone}
usepackage{asypictureB}
begin{document}
begin{asypicture}{name=hyperboloid}
// from http://asymptote.sourceforge.net/gallery/hyperboloid.asy
settings.outformat="pdf";
settings.prc = false;
size(200);
import solids;
currentprojection=perspective(4,4,3);
revolution quadratic=revolution(graph(new triple(real z) {
return (z,0,z*z);},-1,1,40,operator ..),axis=X);
revolution cubic=revolution(graph(new triple(real z) {
return (z,0,z*z*z);},-1,1,40,operator ..),axis=X);
revolution linear=revolution(graph(new triple(real z) {
return (z,0,z);},-1,1,40,operator ..),axis=X);
draw(surface(quadratic),green,render(compression=Low,merge=true));
draw(surface(cubic),blue,render(compression=Low,merge=true));
draw(surface(linear),red,render(compression=Low,merge=true));
end{asypicture}
end{document}
with
pdflatex -shell-escape
you'll get
As you can see, for the choice x^2
and x^3
the result is not really spectacular, at least not in the domain I chose. To get a more spectacular result, you may want to adjust the function(s) and/or domain.
add a comment |
up vote
2
down vote
up vote
2
down vote
Welcome to TeX.SE! If you compile
documentclass{standalone}
usepackage{asypictureB}
begin{document}
begin{asypicture}{name=hyperboloid}
// from http://asymptote.sourceforge.net/gallery/hyperboloid.asy
settings.outformat="pdf";
settings.prc = false;
size(200);
import solids;
currentprojection=perspective(4,4,3);
revolution quadratic=revolution(graph(new triple(real z) {
return (z,0,z*z);},-1,1,40,operator ..),axis=X);
revolution cubic=revolution(graph(new triple(real z) {
return (z,0,z*z*z);},-1,1,40,operator ..),axis=X);
revolution linear=revolution(graph(new triple(real z) {
return (z,0,z);},-1,1,40,operator ..),axis=X);
draw(surface(quadratic),green,render(compression=Low,merge=true));
draw(surface(cubic),blue,render(compression=Low,merge=true));
draw(surface(linear),red,render(compression=Low,merge=true));
end{asypicture}
end{document}
with
pdflatex -shell-escape
you'll get
As you can see, for the choice x^2
and x^3
the result is not really spectacular, at least not in the domain I chose. To get a more spectacular result, you may want to adjust the function(s) and/or domain.
Welcome to TeX.SE! If you compile
documentclass{standalone}
usepackage{asypictureB}
begin{document}
begin{asypicture}{name=hyperboloid}
// from http://asymptote.sourceforge.net/gallery/hyperboloid.asy
settings.outformat="pdf";
settings.prc = false;
size(200);
import solids;
currentprojection=perspective(4,4,3);
revolution quadratic=revolution(graph(new triple(real z) {
return (z,0,z*z);},-1,1,40,operator ..),axis=X);
revolution cubic=revolution(graph(new triple(real z) {
return (z,0,z*z*z);},-1,1,40,operator ..),axis=X);
revolution linear=revolution(graph(new triple(real z) {
return (z,0,z);},-1,1,40,operator ..),axis=X);
draw(surface(quadratic),green,render(compression=Low,merge=true));
draw(surface(cubic),blue,render(compression=Low,merge=true));
draw(surface(linear),red,render(compression=Low,merge=true));
end{asypicture}
end{document}
with
pdflatex -shell-escape
you'll get
As you can see, for the choice x^2
and x^3
the result is not really spectacular, at least not in the domain I chose. To get a more spectacular result, you may want to adjust the function(s) and/or domain.
edited yesterday
answered yesterday
marmot
74.5k482157
74.5k482157
add a comment |
add a comment |
SRSR333 is a new contributor. Be nice, and check out our Code of Conduct.
SRSR333 is a new contributor. Be nice, and check out our Code of Conduct.
SRSR333 is a new contributor. Be nice, and check out our Code of Conduct.
SRSR333 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459599%2fdrawing-the-volume-of-revolution-of-a-region-bounded-by-two-curves%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password