## 6 Solutions to Optimization Problems
### Convex Programming  
Convex programming is an effective technique for real-time optimization. However, nonconvexity in the optimization problems, including both objective functions and constraints, is common in UAV-enabled, RIS-assisted communication. As a result, alternating optimization (AO) and iterative optimization methods, such as SCP and SCA, are typically used to address the nonconvexity of these problems [100]. The nonconvexity in RIS-assisted UAV-enabled communication arises primarily from two sources: the channel modeling of the CLoS link and the nonholonomic constraints involved in trajectory optimization. Depending on the specific system and problem setup, additional nonconvexity terms may also be introduced into the optimization problem  
To tackle the complexity, the optimization problem is normally decomposed into three sub-optimization problems: (P1) power allocation for communication; (P2) beamforming and phase shift design; and (P3) path-planning and trajectory optimization; in each of which other optimization variables are constant.  
For example, by considering a fixed trajectory and phase shift design the power transmission problem P1 in the achievable rate formula in (10) is solved using a standard convex programming solver such as CVX [48]. Then, the phase shift design rule is given in Equation (8). However, the trajectory optimization problem P3 is nonconvex as we highlighted in Remark 3. To tackle this issue, slack convex objective function is utilized as per the convex relaxations technique presented in Lemma 2 given from [164].  
**Lemma 2**.: _With given \(Q_{1}\), \(Q_{2}\), \(Q_{3}\), \(\tau\) and \(\kappa\) all positive values, function \(f(x,y)\) is convex with respect to \(x>0\) and \(y>0\)_  
\[f(x,y)=log_{2}\left(Q_{1}+\frac{Q_{2}}{x^{\frac{1}{2}}y^{\frac{1}{2}}}+\frac{ Q_{3}}{x^{\tau}y^{\kappa}}\right), \tag{26}\]  
See the proof in [164].  
Since \(f(x,y)\) is convex with respect to \(x\) and \(y\), it can be linearized by applying the first-order Taylor expansion at a given point [164].  
Other useful tools are the following inequalities:  
\[\mathbf{a}\cdot\mathbf{b}\ \leq\|\mathbf{a}\|\|\mathbf{b}\| \tag{27}\]  
\[\left(\mathbf{a}^{2}+\mathbf{b}^{2}\right)^{\
icefrac{{1}}{{2}}}\leq( \mathbf{a}+\mathbf{b}) \tag{28}\]  
For instance, to handle the nonconvexity of the optimization problem, after applying the phase shift rule (8), the equivalent formula of the achievable rate in (10) is obtained by using inequality (28) and applying [PERSON]'s formula in [96]. Then, by the first-order Taylor approximation, the convex model is developed and solved by a standard convex (CVX) solver. Also, the nonconvexity of the UAV linear speed optimization formula in (24) has been tackled by applying the inequality (29) in [97] to obtain the convex upper bound of (24).  
Alternative methods are defining convex slack variables. For example, (9) is formulated as  
\[\max\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\  
where \(\alpha\) and \(\beta\) are slack variables corresponding to \(d^{T}\_RIS\) and \(d^{RIS\_R}\) in (9), respectively. Then, the following constraints are applied:  
\[\alpha\leq\underbrace{\left\|p^{Tx}-p^{RIS}\right\|_{2}}_{d^{T}\_RIS}\quad \&\quad\beta\leq\ \underbrace{\left\|p^{RIS}-p^{Rx}\right\|_{2}}_{d^{RIS\_R}}, \tag{30}\]  
Then, it is proved that the relaxed recasting problem is equivalent to the original problem [94]. The maximization problem in (30) is globally lower-bounded by calculating the first-order Taylor expansion of (31) at the local point. The nonconvexity of the (30) itself can be handled by defining a new slack variable \(\xi\) and imposing additional constraint \(\xi<\alpha\beta\), which can be linearized by applying the logarithm function to the formula (\(\ln\xi\leq\ln\alpha+\ln\beta\)) and linearizing it by using the first-order Taylor expansion [94].  
The solution to nonconvexity of nonholonomic heading constraint \(\text{C}1_{6}\) in \(\mathcal{P}2\) can be found in Lemma 1 in [117].