2. Depending on the non-negative parameter $a$, determine the limit:

$$
\lim _{x \rightarrow 0^{+}}\left(\frac{a+2018^{x}}{2}\right)^{\frac{2018}{x}}
$$
2. Note that for $x \rightarrow 0^{+}$ we have $\frac{2018}{x} \rightarrow \infty$. For $0 \leqslant a < 1$, the expression $\frac{a+2018^{x}}{2}$ in the neighborhood of the point $x=0$ takes values greater than 1, so the desired limit is equal to $\infty$. The only case left is $a=1$. Then we have:

$\lim _{x \rightarrow 0^{+}}\left(\frac{1+2018^{x}}{2}\right)^{\frac{2018}{x}}=\lim _{x \rightarrow 0^{+}}\left(e^{\ln \frac{1+2018^{x}}{2}}\right)^{\frac{2018}{x}}=\lim _{x \rightarrow 0^{+}} e^{\frac{2018\left(\ln \left(1+2018^{x}\right)-\ln 2\right)}{x}}=e^{2018 \lim _{x \rightarrow 0^{+}} \frac{\ln \left(1+2018^{x}\right)-\ln 2}{x}}$

so it remains to calculate $\lim _{x \rightarrow 0^{+}} \frac{\ln \left(1+2018^{x}\right)-\ln 2}{x}$. By applying L'Hôpital's rule, we get

$$
\lim _{x \rightarrow 0^{+}} \frac{\ln \left(1+2018^{x}\right)-\ln 2}{x}=\lim _{x \rightarrow 0^{+}} \frac{\frac{1}{1+2018^{x}}\left(2018^{x} \ln 2018\right)}{1}=\frac{\ln 2018}{2}
$$

Therefore, the solution to the problem is:

$$
\lim _{x \rightarrow 0^{+}}\left(\frac{a+2018^{x}}{2}\right)^{\frac{2018}{x}}= \begin{cases}0, & \text { for } 0 \leqslant a < 1 \\ \infty, & \text { for } a > 1 \\ e^{1009 \ln 2018}, & \text { for } a = 1\end{cases}
$$