Find the volume of the solid generated by revolving the region bounded by $y=x$ and $y=x^2$ about the line $y=x$ Find the volume of the solid generated by revolving the region bounded by $y=x$ and $y=x^2$ about the line $y=x$
I am confused, how do we approach such problems, where the rotation lines are not vertical/horizontal.

One way to do this is to rotate everything counter-clockwise about the angle $\theta = \pi/4$, so the line $y=x$ would line up with the $y$-axis
We can parametrize the curves:
$$y = x \rightarrow x_1 = t, \quad y_1 = t $$
$$y = x^2 \rightarrow x_2 = t, \quad y_2 = t^2 $$
Applying the rotation gives new coordinates
$$ x' = x\cos\theta - y\sin\theta = \frac{x-y}{\sqrt{2}} $$
$$ y' = x\sin\theta + y\cos\theta = \frac{x+y}{\sqrt{2}} $$
So curves when rotated are
$$ x_1' = \frac{t-t}{\sqrt{2}} = 0, \quad y_1' = \frac{t+t}{\sqrt{2}} = \sqrt{2}t $$
$$ x_2' = \frac{t-t^2}{\sqrt{2}}, \quad y_2' = \frac{t+t^2}{\sqrt{2}} $$
The original bounds are $(0,0)$ and $(1,1)$, rotated become $(0, 0)$ and $\left(0, \sqrt{2}\right)$, so $t$ goes from $0$ to $1$
The solid is equivalent to rotating the second curve around the $y$-axis
$$ V = \int_0^1 \pi x_2'^2 \frac{dy_2'}{dt} dt = \int_0^1 \pi \left( \frac{t-t^2}{\sqrt{2}} \right)^2 \left( \frac{1 + 2t}{\sqrt{2}} \right)\, dt  $$
