Likelihood ratio for normal distribution with known variance 
Let $X_1,...,X_n$ random sample of $X$~$N(\mu,\sigma^2)$ with known
  $\sigma^2$.Take $a=.05$ find the expression for power function of the
  likelihood-ratio test $$H_0:\mu\leq 0\space vs\space H_1:\mu>0$$

I know that $\hat{\mu}=\overline{X}$
$$\lambda(x)=\frac{\sup_{\Theta_0}L(\theta|x)}{\sup_{\Theta}L(\theta|x)}=\frac{(2\pi)^\frac{-n}{2}(\sigma^2)^{\frac{-n}{2}}e^{-\frac{1}{2\sigma^2}\sum (x_i-\mu_0)^2}}{(2\pi)^\frac{-n}{2}(\sigma^2)^{\frac{-n}{2}}e^{-\frac{1}{2\sigma^2}\sum (x_i-\overline{x})^2}}$$
$$\sum(x_i-\mu_0)^2=\sum(x_i-\overline{x})^2+n(\overline{x}-\mu_0)^2$$
then
$$\lambda(x)=e^{-\frac{n}{2\sigma^2}(\overline{x}-\mu_0)^2}$$
so
$$\lambda(x)\leq c\Leftrightarrow -\frac{n}{2\sigma^2}(\overline{x}-\mu_0)^2\leq log(c)\Leftrightarrow \overline{x}\geq-\sigma\sqrt{\frac{2log(c)}{n}}+\mu_0$$
In the answer they define the critical region as $\overline{X}\geq c\frac{\sigma}{\sqrt{n}}$. 
But I don't know how to get it, perhaps they disregarded some terms to facilitate the calculation of the power function
 A: Your derivation is only partially correct because you have not taken the composite null hypothesis into account. When you have a composite null hypothesis, you need to consider two cases. First the case where the mle is within the null set and then the case where it is not. 
Assume first that the mle $\bar{X}<0$ then the maximized likelihood under the null and the alternative is the same.
In the more interesting scenario that $\bar{X}>0$, the LRT 
$$\lambda(\mathbf{x})=\frac{\sup_{\Theta_0}L(\theta|x)}{\sup_{\Theta}L(\theta|x)}\leq c$$
indeed reduces to
$$-\frac{n}{2\sigma^2}(\bar{x}-\mu_0)^2\leq log(c)=c^{\prime}$$
where $\mu_0\leq 0$. Since $\mu_0<\bar{X}$ this allows you to take square roots without needing the absolute value and so we get the rejection rule
$$\bar{X}\geq k$$
where $k=\sqrt{ -\frac{2\sigma^2}{n}c^{\prime}}+\mu_0$. Notice that since $\sigma^2$ is known we are treating it as a constant. It doesn't matter how one defines the constant because in the end you will want to select $k$ such that
$$P_{H_0} \left( \bar{X}\geq k \right)=\alpha \iff P_0 \left( \frac{\bar{X}}{\sigma}\geq \frac{k}{\sigma} \right)=\alpha \iff \Phi\left(\frac{k}{\sigma}\right)=1-\alpha $$
where $\alpha$ is a prespecified significance level. Under the normality, the ratio $\displaystyle{\frac{\bar{X}}{\sigma}}$ is the well known $Z$-test (can you guess which test the LRT would reduce to had we not known $\sigma^2$?). If you select $k$ based on this, you can then determine the constant $c$ if you so desire but this is highly unnecessary.
To sum up then, the LRT equals
$$\lambda \left(\mathbf{x} \right)=\begin{cases} 1 & \bar{X} \leq 0 \\ \frac{\bar{X}}{\sigma} & \bar{X} >0 \end{cases} $$
and you reject if the latter quantity is too large. I trust that you can derive the power function yourself now?
