# Maximization of Average Achievable Rate for NOMA-UAV Dual-User Communication System Assisted by RIS
## 4 Proposed Algorithm
### UAV Trajectory Optimization
\begin{split}-v_{1}^{2}[k]\leq(v_{1}^{(0)})^{2}[k]-2v_{1}^{(0)}v_{ 1}[k],\end{split}  \tag{37}\]  
\[ \begin{split} R_{2}^{\prime}[k]\geq\log_{2}A_{1}[k]+& \frac{B_{1}[k]}{A_{1}[k]\ln 2}(u_{2}[k]-u_{2}^{(0)}[k])\\ &+\frac{C_{1}[k]}{A_{1}[k]\ln 2}(v_{1}[k]-v_{1}^{(0)}[k]),\end{split}  \tag{38}\]\[H_{1}^{\prime}[k]\geq \Bigg{(}\frac{A}{(u_{1}^{(0)})^{\alpha}[k]}+\frac{B}{(u_{1}^{(0)})^{ \frac{\alpha}{2}}[k](v_{1}^{(0)})^{\frac{\alpha}{2}}[k]}+\frac{C}{(v_{1}^{(0)})^ {\alpha}[k]}\Bigg{)} \tag{39}\] \[+L_{1}^{(0)}\Big{(}u_{1}[k]-u_{1}^{(0)}[k]\Big{)}+I_{1}^{(0)} \Big{(}v_{1}[k]-v_{1}^{(0)}[k]\Big{)}\] \[=t_{1}[k],\]  
\[H_{2}^{\prime}[k]\geq \Bigg{(}\frac{A}{(u_{2}^{(0)})^{\alpha}[k]}+\frac{B}{(u_{2}^{(0)} )^{\frac{\alpha}{2}}[k](v_{1}^{(0)})^{\frac{\alpha}{2}}[k]}+\frac{C}{(v_{1}^{(0 )})^{\alpha}[k]}\Bigg{)} \tag{40}\] \[+L_{2}^{(0)}\Big{(}u_{2}[k]-u_{2}^{(0)}[k]\Big{)}+J_{2}^{(0)} \Big{(}v_{1}[k]-v_{1}^{(0)}[k]\Big{)}\] \[=t_{2}[k],\]  
\[\text{where }A_{0}[k]=\log_{2}\!\!\left(\!1+\frac{p_{1}[k]}{p_{2}[k]+ \frac{\alpha^{2}}{H_{1}^{(0)}[k]}}\!\right)\!,B_{0}[k]=\frac{p_{1}[k]H_{1}^{( 0)}[k]}{(p_{2}[k]H_{1}^{(0)}[k]+\frac{\alpha^{2}}{H_{1}^{(0)}[k]}}\!\right)\! \left(\frac{-\alpha A}{(u_{1}^{(0)})^{\frac{\alpha}{2}}[k](v_{1}^{(0)})^{ \frac{\alpha}{2}}[k]}+\frac{-\frac{\alpha}{2}B}{(u_{1}^{(0)})^{\frac{\alpha}{ 2}}[k](v_{1}^{(0)})^{\frac{\alpha}{2}}[k]}\right)\!,\] \[C_{0}[k]=\frac{p_{1}[k]H_{1}^{(0)}[k]}{(p_{2}[k]H_{1}^{(0)}[k]+ \frac{\alpha^{2}}{H_{1}^{(0)}[k]+\frac{\alpha^{2}}{H_{1}^{(0)}[k]}}}+\frac{- \frac{\alpha}{2}E}{(u_{1}^{(0)})^{\frac{\alpha}{2}}[k](v_{1}^{(0)})^{\frac{ \alpha}{2}}[k]}\right)\!,\,A_{1}[k]=\log_{2}\!\!\left(1+\frac{p_{2}[k]H_{1}^{( 0)}[k]}{\xi^{2}}\right)\!,\] \[B_{1}[k]=\frac{p_{2}[k]}{\xi^{2}}\left(\frac{-\frac{\alpha D}{(u _{2}^{(0)})^{\alpha}[k]}}{(u_{2}^{(0)})^{\alpha+1}[k]}+\frac{-\frac{\alpha}{2 }E}{(u_{2}^{(0)})^{\frac{\alpha}{2}}[k](v_{2}^{(0)})^{\frac{\alpha}{2}}[k]} \right)\!,\,C_{1}[k]=\frac{p_{2}[k]}{\xi^{2}}\!\left(\frac{-\kappa F}{(v_{1}^ {(0)})^{\alpha+1}[k]}+\frac{-\frac{\xi}{2}E}{(u_{2}^{(0)})^{\frac{\alpha}{2} }[k](v_{1}^{(0)})^{\frac{\alpha}{2}}+1}\right)\!,\] \[L_{1}^{(0)}=(\frac{-\alpha A}{(u_{1}^{(0)})^{\alpha+1}[k]}+\frac{- \frac{\alpha}{2}B}{(u_{1}^{(0)})^{\frac{\alpha}{2}}+1}[k](v_{1}^{(0)})^{ \frac{\alpha}{2}}[k]}\!,\,\,I_{1}^{(0)}=\frac{-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0)} \Big{(}v_{1}[k]-v_{1}^{(0)}[k]\Big{)}\]8 \[+L_{1}^{(0)}\Big{(}u_{1}[k]-u_{1}^{(0)}[k]\Big{)}+I_{1}^{(0)} \Big{(}v_{1}[k]-v_{1}^{(0)}[k]\Big{)}\]9 \[=t_{1}[k],\]0  
where \(R_{1}^{\prime\prime}[k]=\frac{B_{0}[k]}{A_{0}[k]\ln^{2}}u_{1}[k]+\frac{C_{0}[k ]}{A_{0}[k]\ln^{2}}v_{1}[k]\), \(R_{2}^{\prime\prime}[k]=\frac{B_{1}  
\[=t_{1}[k],\]1 \[=t_{1}[k],\]2 \[=t_{1}[k],\]3 \[=t_{1}[k],\]4  
The consequence of adding two functions with convexity is still a convex-type function [30]. The non-convex component of problem \(\mathrm{P}(4)\) is \(R_{a}[k]\), which primarily transforms \(R_{a}[k]\) into a convex function.