$0~$ division error occurs as I use $~ t= \tan^{}\left( \frac{\theta_{}}{ 2 } \right) ~$ of the integration. I have to integral the below formula of integration .
$$  a, d \in\mathbb{R}_{>0}  ~~\wedge~~ d > a  $$
$$  \alpha := \int_{0 }^{\frac{\pi}{2}  } \frac{  d  }{  d- a \cdot \cos^{}\left(\theta_{} \right)   }  \,d\theta    $$
$$ = d\int_{0 }^{\frac{\pi}{2}  } \frac{  1  }{  d- a \cdot \cos^{}\left(\theta_{} \right)   }  \,d\theta    $$
My tries are as below so far . By the way , I wonder if such system exists which enable  2-column-display to be used against the below equations .
$$  t= \tan^{}\left( \frac{\theta_{}}{ 2 }  \right)  $$
$$  \theta_{} : 0 ~\rightarrow~ \frac{\pi}{2}  $$
$$  t : 0 ~\rightarrow~1= \tan^{}\left( \frac{  1  }{  2  } \cdot \frac{\pi}{2}  \right) $$
$$  \frac{  dt  }{  d\theta   } = \frac{1}{2}  \sec^2\left( \frac{\theta}{ 2 }  \right)   $$
$$  \frac{  d\theta   }{  dt  } = \frac{  2  }{ \sec^2\left( \frac{\theta}{2} \right)   }  $$
$$  1+ t^2 = \sec^2\left( \frac{\theta}{2}  \right)  $$
$$  \therefore ~~ d\theta = \frac{  2 \,dt  }{  1+ t^2 } = 2 \, dt \left( 1 + t^2 \right)^{-1}    $$
$$  \cos(\theta) = 2 \cos^2\left(\frac{\theta}{ 2 } \right) -1 $$
$$ = 2 \left( \cos\left(\frac{\theta}{ 2 } \right) \right)^2 -1 $$
$$ =  2 \left( \sec^{-1}\left( \frac{\theta}{2} \right) \right)^2 -1 $$
$$ = 2 \left( \sec^2\left( \frac{\theta}{2} \right) \right)^{-1} -1 $$
$$  \therefore ~~ \cos(\theta)  = 2(1+ t^2)^{-1} -1 $$
$$ \cos(\theta) = \frac 2 {1+ t^2} -1 $$
$$ = \frac 2 {1 + t^2} - \frac{ (1+ t^2) }{1+t^2}  $$
$$ = \frac{  2 - (1 + t^2)   }{  1+ t^2}  $$
$$ = \frac{  2-1-t^2}{1+ t^2}  $$
$$ = \frac{  1- t^2}{ 1 + t^2} = \cos(\theta) = (1-t^2) (1+t^2)^{-1}  $$
$$  \alpha = \int_0^{\frac{\pi}{2}  } \frac d {  d- a \cos(\theta)}  \,d\theta    $$
$$  = d\int_{0 }^{\frac{\pi}{2}  } \frac{  d\theta  }{  d- a \cdot \cos^{}\left(\theta_{} \right)   }      $$
$$ = d\int_{0 }^{1 }  \left( \frac{  2 \, dt  \left( 1  +  t  ^{2}  \right)  ^{-1}  }{  d- a \cdot \left\{ \left( 1- t ^{2}   \right) \left( 1+t ^{2}  \right) ^{-1} \right\}   }  \right)    $$
$$ = d \int_{0 }^{1 } \frac{  2 \,dt (1+ t^2)^{-1}   }{ d - a(1- t^2) (1+ t^2)^{-1}} $$
$$ = 2d \int_0^1 \frac{ (1+ t^2)^{-1} \,dt  }{ d - a(1-t^2) (1+t^2)^{-1}} $$
$$ = 2d \int_0^1 \frac{(1+t^2)^{-1} \, dt  }{ \left\{d - a(1- t^2) (1+ t^2)^{-1}  \right\}   } \cdot \frac{ (1 + t^2)^1 }{ (1 + t^2)^1} $$
$$ = 2 d \int_{0 }^{1 } \frac{  dt  }{  d \left( 1+ t  ^{2}  \right) -a \cdot \left( 1-t ^{2}  \right)   }   $$
$$ = 2 d \int_{0 }^{1 } \frac{  1 }{  d + d \cdot t ^{2}   - a + a \cdot t ^{2}   } dt  $$
$$ = 2 d \int_{0 }^{1 } \frac{  1 }{ \left( d-a \right) + \left( d+a \right)t ^{2}     } dt  $$
$$ = 2d \left[ \frac{  \ln\left(  \left( d-a \right) + \left( d+ a  \right) t  ^{2}  \right)  }{   2 \left( d + a  \right)t   }   \right]_{0}^{1} ~~ \leftarrow~~ \text{As } t= 0 ~~\text{is set , the zero division error occurs .}    $$
I need hints to solve $~ \alpha  ~$

Use the below general equation to proceed the given integration .
$$ a \in \mathbb R_{> 0} $$
$$ \frac{  a  }{  a ^{2} + x ^{2}   } = \frac{  d  }{  dx  }  \left( \tan^{-1} \left( \frac{  x  }{a    } \right)   \right)  $$
