Disclaimer: I dont know i'm getting confused with basic microeconomic prodoucer theory (note: Ive been watching some Hak Choi Videos on youtube),but this is my overall thought process.
We know that the standard profit maximization problem can be described as: $$\max\pi=py(x)-wx$$
let $y(x)=x^\alpha$
it follows that the optimal $x^*$ from such a formula is:
$$\frac{\partial\pi}{\partial x}=p\alpha x^{\alpha-1}-w=0$$ $$x^*=\left(\frac{w}{p\alpha}\right)^{\frac{1}{\alpha-1}}$$
it follows that the optimal $y^*$
$$y^*=\left(\frac{w}{p\alpha}\right)^{\frac{\alpha}{\alpha-1}}$$
however, isn't the profit maximization problem also just a revenue maximization problem subject to a constraint? $$\max py(x) $$ $$s.t.\bar{C}(x)=wx $$
let $y(x)=x^\alpha$
It follows that our Lagrangian for this problem is:
$$L=py(x)+\lambda(\bar{C(x)}-wx)$$
taking the derivative of our Lagrangian With respect to $x$ we find $$\frac{\partial L}{\partial x}=p\alpha x^{\alpha-1}-\lambda w=0$$
$$x^*=\left(\frac{\lambda w}{p\alpha}\right)^{\frac{1}{\alpha-1}}$$
it follows: $$y^*=\left(\frac{\lambda w}{p\alpha}\right)^{\frac{\alpha}{\alpha-1}}$$
I find that there is a great deal of similarity between these two problems and their solutions are also very similar. based on this reason I ask, is this an appropriate way to solve for the input and out of a profit maximizing firm? if so what happens to $\lambda$ in the profit function?