# Hybrid Active-Passive Reconfigurable Intelligent Surface for Cooperative Transmission Systems
## Appendix A The CDF Derivation of SNR for HAPR Systems
\] (A12)  
Using Equation (3.381.3) in [28], we can solve the first integral in (A12) as  
\[\int_{y_{1}}^{\infty}y^{m_{D}-1}e^{-\mathrm{Y}_{D}y}dy=\mathrm{Y}_{D}^{-m_{D} }\Gamma(m_{D},\mathrm{Y}_{D}y_{1})\] (A13)  
The second integral in (A12) can be replaced by  
\[\int_{y_{1}}^{\infty}y^{m_{D}-k-1}e^{-\mathrm{Y}_{D}y-\frac{\mathrm{Y}_{S}c}{ y}}dy=\int_{0}^{\infty}y^{m_{D}-k-1}e^{-\mathrm{Y}_{D}y-\frac{\mathrm{Y}_{S}c}{ y}}dy-\int_{0}^{y_{1}}y^{m_{D}-k-1}e^{-\mathrm{Y}_{D}y-\frac{\mathrm{Y}_{S}c}{ y}}dy\] (A14)  
The integral of \([0,\infty)\) can be found using the Equation (3.471.9) in [28] as  
\[\int_{0}^{\infty}y^{m_{D}-k-1}e^{-\mathrm{Y}_{D}y-\frac{\mathrm{Y}_{S}c}{y}} dy=2\left(\frac{\mathrm{Y}_{S}c}{\mathrm{Y}_{D}}\right)^{\frac{m_{D}-k}{2}}K_{m_{D}-k} \left(2\sqrt{\mathrm{Y}_{S}\mathrm{Y}_{D}c}\right)\] (A15)  
In order to solve for the integral of \([0,y_{1}]\), we employ the compound Simpson formula [29], which is expressed in a general form as follows,  
\[\int_{a}^{b}f(x)dx\approx S_{n}=\frac{h}{6}\left\{f(a)-f(b)+\sum_{l=0}^{n}\left[4f \left(x_{l+\frac{1}{2}}\right)+2f(x_{l})\right]\right\}\] (A16)  
where \(n\) is the number of equal parts of \([a,b]\), \(h=\frac{b-a}{n}\) is the step size, and interval points \(x_{k}=a+kh(k=0,1,...,n)\) is used to construct the interpolation type product formulas, \(x_{l+\frac{1}{2}}\) is the midpoint of the interval of \([x_{l},x_{l+1}]\). Here, we split integral interval \([0,y_{1}]\) of (A14) into \(n_{1}\) parts equally, the integral interval points are denoted as \(y_{l}=lh\), where \(h=\frac{y_{1}}{n_{1}}\). Therefore, by substituting (A16) into the second integral of (A14), the approximate expression of the \([0,y_{1}]\) integral can be evaluated as follows,  
\[\int_{0}^{y_{1}}y^{m_{D}-k-1}e^{-Y_{D}y-\frac{Y_{S}c}{y}}dy\approx S_{n_{1}} \left\{-f_{y}(y_{1})+\sum_{l=1}^{n_{1}}\left[4f_{y}\Big{(}y_{l+\frac{1}{2}} \Big{)}+2f_{y}(y_{l})\right]\right\}\] (A17)  
where \(f_{y}(y)=y^{m_{D}-k-1}e^{-Y_{D}y-\frac{Y_{S}c}{y}}\). Introduce (A13), (A15), and (A17) into (A12), the closed approximate expression for \(I_{1}\) is  
\[I_{1}=\frac{\Gamma(m_{D},Y_{D}y_{1})}{\Gamma(m_{D})}-\sum_{k=0}^{m_{S}-1}\frac {Y_{D}^{m_{D}}(Y_{S}c)^{k}}{\Gamma(m_{D})k!}\left[2\bigg{(}\frac{Y_{S}c}{Y_{ D}}\bigg{)}^{\frac{m_{D}-k}{2}}K_{m_{D}-k}\Big{(}2\sqrt{Y_{S}Y_{D}c}\Big{)}-S_{n_{1}}\right]\] (A18)  
Moving forward, we evaluate the integral of the second region,  
\[I_{2}=\int_{0}^{x_{2}}\int_{0}^{\frac{x}{ax-b}}f(x,y)dydx=\frac{Y_{S}^{m_{S}}Y _{D}^{m_{D}}}{\Gamma(m_{S})\Gamma(m_{D})}\int_{0}^{x_{2}}x^{m_{S}-1}e^{-Y_{S} x}dx\int_{0}^{\frac{x}{ax-b}}y^{m_{D}-1}e^{-Y_{D}y}dy\] (A19)  
Using Equation (3.381.1) and Equation (8.353.6) in [28], we obtain the integral result with respect to \(y\), which is  
\[\int_{0}^{\frac{x}{ax-b}}y^{m_{D}-1}e^{-Y_{D}y}dy=Y_{D}^{m_{D}}(m_{D}-1)! \left[1-e^{-\frac{Y_{D}x}{ax-b}}\sum_{q=0}^{m_{D}-1}\frac{\left(\frac{Y_{D}x}{ ax-b}\right)^{q}}{q!}\right]\] (A20)  
Plugging (A20) into (A19) results in the integral expression for the subsequent step,  
\[I_{2}=\frac{Y_{S}^{m_{S}}}{\Gamma(m_{S})}\left(\int_{0}^{x_{2}}x^{m_{S}-1}e^{ -Y_{S}x}dx-\sum_{q=0}^{m_{D}-1}\frac{(Y_{D})^{q}}{q!}\int_{0}^{x_{2}}x^{m_{S} +q-1}(ax-b)^{-q}e^{-Y_{S}x-\frac{Y_{D}x}{ax-b}}dx\right)\] (A21)  
Likewise, the first integral in (A21) can be evaluated by using Equation (3.381.1) in [28], and the result of the integral is obtained as  
\[\int_{0}^{x_{2}}x^{m_{S}-1}e^{-Y_{S}x}dx=Y_{S}^{m_{S}}\gamma(m_{S},Y_{S}x_{2})\] (A22)  
Create a variable substitution for the second integral in (A21), that is, set \(t=ax-b\), and rewrite it as  
\[ \begin{split}\sum_{q=0}^{m_{D}-1}\frac{(Y_{D})^{q}}{q!}\int_{0}^{ x_{2}}x^{m_{S}+q-1}(ax-b)^{-q}e^{-Y_{S}x-\frac{Y_{D}x}{ax-b}}dx& =\sum_{q=0}^{m_{D}-1}\frac{(Y_{D})^{q}b^{m_{S}+q-1-r}}{q!a^{m_{S}+ q}}e^{-\frac{Y_{S}b+Y_{D}}{a}}\\ &\times\int_{-b}^{ax_{2}-b}(b+t)^{m_{S}+q-1}t^{-q}e^{-\frac{Y_{S} }{a}t-\frac{Y_{D}b}{a}t^{-1}}dt\end{split}