I've got a solid I'm trying to find the volume of. I've gotten down the process in Mathematica as to how to do this if it's being rotated around an axis or even a line, but let's assume we have a cross section that is between two curves and bounded by x > 0.
We're going to find the volume of the solid if the region is cross sections of equilateral triangles perpendicular to the x axis here. I've already got code for the two endpoints...is it possible to have Mathematica do something like this?
This is what I have right now...but I'm not sure if this is being done properly for the situation.
f[x_] := 3x^3 - 0.75x^5
g[x_] := x^2 - 6x + 2
{x1, x2}=x/. Solve[f[x]==g[x] && x > 0,x, Reals];
sideLength=Sqrt[3](f[x]-g[x])/2;
volumeTri=Integrate[1/4*Pi*sideLength^2, {x, x1, x2}]
I'm getting a result here but I'm not sure if this is how it's done in Mathematica, nor could I find any supporting documentation. I don't need any visual output, just the volume of the solid in which the region between those curves (for x > 0) has cross sections perpendicular to the x-axis that are equilateral triangles.
Is this how it's done in Mathematica or am I missing something? Any suggestions on efficiency to improve the code are also welcome.