# Energy-Optimized Content Refreshing of Age-of-Information-Aware Edge Caches in IoT Systems
## Appendix B  
When \(\overline{\beta}=1\), i.e., \(c_{\overline{\beta}}=f_{\text{T}}\), the optimization problem maximizes \(E\{T\}\) under the constraint given by the AoI requirement:  
\[max_{w,s}\quad ws+\frac{s}{e^{\lambda s}-1} \tag{2}\]  
s.t.  
\[g(s)\leq w\leq h(s)\]  
\[s\geq s_{min}\]  
\[w\in\mathbb{Z}^{+},\ s\in\mathbb{R}^{+}\]  
For a given \(s\), the model chooses the maximum possible value of \(w\) to maximize the objective function, so it is necessary to study the objective function when \(w=h(s)\).  
We denote \(\varphi(w,s)\) as the objective function, i.e., \(\varphi(w,s)=ws+\frac{s}{e^{\lambda s}-1}\), and we define \(F(s)\): \(F(s)\triangleq\varphi(f(s),s)\).  
Therefore:  
* If \(s\leq AoI_{a}\leq sw\): It is: \[w=\frac{AoI_{a}}{\alpha s}+\frac{e^{-\lambda s}(1-\alpha)}{(1-e^{-\lambda s} )\alpha}\] and \[F(s)=\bigg{[}\frac{AoI_{a}}{\alpha s}+\frac{e^{-\lambda s}(1-\alpha)}{(1-e^{- \lambda s})\alpha}\bigg{]}s+\frac{s}{e^{\lambda s}-1}=\frac{AoI_{a}}{\alpha}+ \frac{1}{\alpha}\frac{se^{-\lambda s}}{(1-e^{-\lambda s})}\] So, \[F^{\prime}(s)=\frac{1}{\alpha}\frac{\big{(}e^{-\lambda s}-s\lambda e^{- \lambda s}\big{)}\big{(}1-e^{-\lambda s}\big{)}-\big{(}\lambda e^{-\lambda s }\big{)}\big{(}se^{-\lambda s}\big{)}}{\big{(}1-e^{-\lambda s}\big{)}^{2}}= \frac{1}{\alpha}\frac{\big{(}1-e^{-\lambda s}-s\lambda\big{)}e^{-\lambda s}}{ \big{(}1-e^{-\lambda s}\big{)}^{2}}\]And \(F^{\prime}(s)\leq 0\) results in:  
\[e^{-\lambda s}\Big{(}1-e^{-\lambda s}-s\lambda\Big{)}\ \leq 0\]  
That is:  
\[\Big{(}1-e^{-\lambda s}-s\lambda\Big{)}\ \leq 0\]  
We define \(x=\lambda s\) and \(l(x)=1-e^{-x}-x\).  
It is:  
\[l(0)=1-1=0\]  
and  
\[l^{\prime}(x)=e^{-x}-1\]  
So \(l^{\prime}(x)\leq 0\) results in:  
\[e^{-x}\leq 1\text{ for }x\geq 0\]  
Therefore, \(l(x)\) is always \(\leq 0\) for \(x\geq 0\), because \(l(x)\) is decreasing and it is \(l(0)=0\). This means that \(F^{\prime}(s)\) is always \(\leq 0\) for \(x\geq 0\) (\(\lambda s\geq 0\)), so \(F(s)\) is decreasing and the maximum value is obtained for \(s=s_{min}\). Then, we have to consider the integer constraint on \(w\).  
* If \(0\leq AoI_{a}<s\): It is: \[w=\frac{\frac{AoI_{a}}{as}-e^{-\lambda s}}{1-e^{-\lambda s}}\] and \[F(s)=\left[\frac{\frac{AoI_{a}}{as}-e^{-\lambda s}}{1-e^{-\lambda s}}\right] s+\frac{s}{e^{\lambda s}-1}=\frac{\frac{AoI_{a}}{as}e^{\lambda s}-\frac{AoI_{a}}{as}}{e^{ \lambda s}+e^{-\lambda s}-2}\] So, \[F^{\prime}(s)=\frac{\big{(}\frac{AoI_{a}}{as}\lambda e^{\lambda s}\big{)} \big{(}e^{\lambda s}+e^{-\lambda s}-2\big{)}-(\lambda e^{\lambda s}-\lambda e ^{-\lambda s}\big{)}\big{(}\frac{AoI_{a}}{as}e^{\lambda s}-\frac{AoI_{a}}{as} \big{)}}{\big{(}e^{\lambda s}+e^{-\lambda s}-2\big{)}^{2}}\] \[\qquad\qquad\qquad=\frac{-\frac{AoI_{a}}{as}\lambda e^{\lambda s}- \frac{AoI_{a}}{as}\lambda e^{-\lambda s}+2\frac{AoI_{a}}{as}\lambda}{\big{(}e ^{\lambda s}+e^{-\lambda s}-2\big{)}^{2}}\] And \(F^{\prime}(s)\leq 0\) results in: \[-\frac{AoI_{a}}{as}\lambda e^{\lambda s}-\frac{AoI_{a}}{as}\lambda e^{-\lambda s }+2\frac{AoI_{a}}{as}\lambda\ \leq 0\] That is: \[-e^{\lambda s}-e^{-\lambda s}+2\ \leq 0\] We define \(x=\lambda s\) and \(l(x)=-e^{x}-e^{-x}+2\). It is: \[l(0)=-1-1+2=0\] and \[l(x)=-e^{x}+e^{-x}\] So \(l^{\prime}(x)\leq 0\) results in: \[e^{-x}\leq e^{x}\text{ for }x\geq 0\] So, \(l(x)\) is always \(\leq 0\) for \(x\geq 0\), because \(l(x)\) is decreasing and it is \(l(0)=0\). This means that \(F^{\prime}(s)\) is always \(\leq 0\) for \(x\geq 0\) (\(\lambda s\geq 0\)), so \(F(s)\) is decreasing and the maximum value is obtained for \(s=s_{min}\). Then we have to consider the integer constraint on \(w\).