It's unclear what the planes are supposed to be, so I'll take [tex]x=a[/tex] and [tex]x=b[/tex] with [tex]0\le a<b<\pi[/tex].
The cross sections are disks with diameter [tex]\csc x-\cot x[/tex], so each disk of thickness [tex]\Delta x[/tex] has a volume of
[tex]\dfrac{\pi(\csc x-\cot x)^2}4\Delta x[/tex]
Then taking infinitesimally thin disks, we find the solid has a volume of
[tex]\displaystyle\frac\pi4\int_a^b(\csc x-\cot x)^2\,\mathrm dx[/tex]
Since
[tex](\csc x-\cot x)^2=2\csc^2x-2\csc x\cot x-1[/tex]
and
[tex]\dfrac{\mathrm d(\csc x)}{\mathrm dx}=-\csc x\cot x[/tex]
[tex]\dfrac{\mathrm d(\cot x)}{\mathrm dx}=-\csc^2x[/tex]
it follows that the volume is
[tex]\displaystyle\frac\pi4\left(-2\cot x+2\csc x-x\right)\bigg|_a^b[/tex]
[tex]=\dfrac\pi4(2(\cot a-\cot b)+2(\csc b-\csc a)+a-b)[/tex]
[tex]=\dfrac\pi4\left(2\tan\dfrac b2-2\tan\dfrac a2+a-b\right)[/tex]