A producer is a price-taker on both the market for input factors labor and capital, and the market for end products. The cost of one unit of labor equals $w=2$, the cost of one unit of capital equals $r=32$, while the selling price of the end products equals $p=32$. The production function of this producer is given by $Y(L,K)=L^{\frac{1}{8}}K^{\frac{1}{2}}$. We determine the maximum profit.
The revenue function is given by $R(L,K)=pY(L,K)=32L^{\frac{1}{8}}K^{\frac{1}{2}}$ and the cost function by $C(L,K)=wL+rK=2L+32K$, which results in the profit function
\[
\pi (L,K)=32L^{\frac{1}{8}}K^{\frac{1}{2}}-2L-32K.
\]
Since the partial derivatives of $\pi(L,K)$ equal
$\pi'_{L}(L,K) =4L^{-\frac{7}{8}}K^{\frac{1}{2}}-2$ and
$\pi'_{K}(L,K) =16L^{\frac{1}{8}}K^{-\frac{1}{2}}-32$,
the stationary points of $\pi(L,K)$ are solutions of the following system.
$$\begin{align}
4L^{-\frac{7}{8}}K^{\frac{1}{2}}-2&=0\\
16L^{\frac{1}{8}}K^{-\frac{1}{2}}-32&=0
\end{align}$$
Hence, $K^{\frac{1}{2}}=\frac{1}{2}L^{\frac{7}{8}}$ and therefore, $K=\frac{1}{4}L^{\frac{14}{8}}$.
Consequently, $L^{\frac{1}{8}}(\frac{1}{4}L^{\frac{14}{8}})^{-\frac{1}{2}}=2$, which gives $2L^{-\frac{3}{4}}=2$. Thus, $L=1$, which gives $K=\frac{1}{4}$.
Hence, $(L,K)=(1,\frac{1}{4})$ is the only stationary point. By the use of the criterion function we investigate whether or not this point is a maximum location. It holds that $\pi''_{LL}(L,K)=-3\frac{1}{2}L^{-\frac{15}{8}}K^{\frac{1}{2}}$, $\pi''_{KK}(L,K)=-8L^{\frac{1}{8}}K^{-\frac{3}{2}}$ and $\pi''_{LK}(L,K)=2L^{-\frac{7}{8}}K^{-\frac{1}{2}}$, which implies that the criterion function is given by
$$\begin{align}
C(L,K) &= \pi''_{LL}(L,K)\pi''_{KK}(L,K)-(\pi''_{LK}(L,K))^{2}\\
&=(-3\tfrac{1}{2}L^{-\frac{15}{8}}K^{\frac{1}{2}}) \cdot (-8L^{\frac{1}{8}}K^{-\frac{3}{2}})-(2L^{-\frac{7}{8}}K^{-\frac{1}{2}})^2\\
&=28L^{-\frac{14}{8}}K^{-1}-4L^{-\frac{14}{8}}K^{-1}\\
&=24L^{-\frac{14}{8}}K^{-1}.\\
\end{align}$$
Hence, as $C(1,\frac{1}{4})>0$ and $\pi''_{LL}(1,\frac{1}{4})<0$ it follows that $\pi (L,K)$ has a maximum at $(L,K)=(1,\frac{1}{4})$, with value $\pi (1,\frac{1}{4})=6.$
The revenue function is given by $R(L,K)=pY(L,K)=32L^{\frac{1}{8}}K^{\frac{1}{2}}$ and the cost function by $C(L,K)=wL+rK=2L+32K$, which results in the profit function
\[
\pi (L,K)=32L^{\frac{1}{8}}K^{\frac{1}{2}}-2L-32K.
\]
Since the partial derivatives of $\pi(L,K)$ equal
$\pi'_{L}(L,K) =4L^{-\frac{7}{8}}K^{\frac{1}{2}}-2$ and
$\pi'_{K}(L,K) =16L^{\frac{1}{8}}K^{-\frac{1}{2}}-32$,
the stationary points of $\pi(L,K)$ are solutions of the following system.
$$\begin{align}
4L^{-\frac{7}{8}}K^{\frac{1}{2}}-2&=0\\
16L^{\frac{1}{8}}K^{-\frac{1}{2}}-32&=0
\end{align}$$
Hence, $K^{\frac{1}{2}}=\frac{1}{2}L^{\frac{7}{8}}$ and therefore, $K=\frac{1}{4}L^{\frac{14}{8}}$.
Consequently, $L^{\frac{1}{8}}(\frac{1}{4}L^{\frac{14}{8}})^{-\frac{1}{2}}=2$, which gives $2L^{-\frac{3}{4}}=2$. Thus, $L=1$, which gives $K=\frac{1}{4}$.
Hence, $(L,K)=(1,\frac{1}{4})$ is the only stationary point. By the use of the criterion function we investigate whether or not this point is a maximum location. It holds that $\pi''_{LL}(L,K)=-3\frac{1}{2}L^{-\frac{15}{8}}K^{\frac{1}{2}}$, $\pi''_{KK}(L,K)=-8L^{\frac{1}{8}}K^{-\frac{3}{2}}$ and $\pi''_{LK}(L,K)=2L^{-\frac{7}{8}}K^{-\frac{1}{2}}$, which implies that the criterion function is given by
$$\begin{align}
C(L,K) &= \pi''_{LL}(L,K)\pi''_{KK}(L,K)-(\pi''_{LK}(L,K))^{2}\\
&=(-3\tfrac{1}{2}L^{-\frac{15}{8}}K^{\frac{1}{2}}) \cdot (-8L^{\frac{1}{8}}K^{-\frac{3}{2}})-(2L^{-\frac{7}{8}}K^{-\frac{1}{2}})^2\\
&=28L^{-\frac{14}{8}}K^{-1}-4L^{-\frac{14}{8}}K^{-1}\\
&=24L^{-\frac{14}{8}}K^{-1}.\\
\end{align}$$
Hence, as $C(1,\frac{1}{4})>0$ and $\pi''_{LL}(1,\frac{1}{4})<0$ it follows that $\pi (L,K)$ has a maximum at $(L,K)=(1,\frac{1}{4})$, with value $\pi (1,\frac{1}{4})=6.$