I want to draw the region bounded by y=x^2 and y=x. Any ideas? I was hoping this would be somewhat simple. I've tried used a similar, with \begin{axis}..\end{axis}, but it doesn't like that. Did I not declare a package or something?

Also, if I wanted to show the solid this region creates by rotating it about the x-axis, is there a way to did this in latex? (If you had cal 2, think volume of a solid rotated about …).

## Best Answer

Like I said in the comments, plotting a function in 2D is relatively easy in

`pgfplots`

, and with the version 1.10 filling between is even easier.## Output

## Code