Volume of a shape bounded by curve `y=f(x)` and `x`-axis between `a leq x leq b` revolving about `y`-axis is given by

`V_y=2pi int_a^b xy dx`

In order to use the above formula we first need to write `y` as a function of `x.`

`(x-h)^2+y^2=r^2`

`y=+-sqrt(r^2-(x-h)^2)`

The positive part describes upper half of the circle (blue) while the negative part (red) describes the lower semicircle.

In the graph above `r=2` and `h=5.`

Since the both halves have equal ares the resulting volumes will also be equal for each half. Therefore, we can calculate volume of whole torus as two times the semi-torus (solid obtained by revolving a semicircle).

Bounds of integration will be points where the semicircle touches the `x`-axis.

`4pi int_(h-r)^(h+r)x sqrt(r^2-(x-h)^2)dx=`

Substitute `x-h=r sin t` `=>` `x=r sin t+h` `=>` `dx=r cos t dt,` `t_l=-pi/2,` `t_u=pi/2`

`t_l` and `t_u` denote new lower and upper bounds of integration.

`4pi r int_(-pi/2)^(pi/2)(r sin t+h)sqrt(r^2-r^2 sin^2 t)cos t dt=`

`4pi r int_(-pi/2)^(pi/2)(r sin t+h)r sqrt(1-sin^2 t)cos t dt=`

Use the fact that `sqrt(1-sin^2 t)=cos t.`

`4pi r^2 int_(-pi/2)^(pi/2)(r sin t+h)cos^2 t dt=`

`4pi r^3 int_(-pi/2)^(pi/2) cos^2 t sin t dt+4pi r^2h int_(-pi/2)^(pi/2)cos^2 t dt=`

Let us calculate each integral separately

`I_1=4pi r^3 int_(-pi/2)^(pi/2) cos^2 t sin t dt=`

Substitute `u=cos t` `=>` `du=sin t dt,` `u_l=0,` `u_u=0.`

`4pir^3 int_0^0 u^3/3 du=0`

`I_2=4pi r^2h int_(-pi/2)^(pi/2)cos^2 t dt=`

Rewrite the integral using the following formula `cos^2 theta=(1+cos2theta)/2.`

`2pi r^2h int_(-pi/2)^(pi/2)(1+cos 2t)dt=2pi r^2h(t+1/2sin2t)|_(-pi/2)^(pi/2)=`

`2pi r^2 h(pi/2+0+pi/2-0)=2pi^2r^2 h`

**The volume of the torus generated by revolving the given region about `y`-axis is `2pi^2r^2h.` **

The image below shows the torus generated by revolving region bounded by circle `(x-5)^2+y^2=2^2` i.e. `r=2,` `h=5` about `y`-axis. The part generated by revolving `y=sqrt(r^2-(x-h)^2)` is colored blue while the negative part is colored red.