Find the optimal labor supply when labor utility is linear I have been working the afternoon on an intertemporal exercise where I'm blocking on something very basic. Have been looking on previous posts but didn't find a similar question.

We have the utility function of the household : $ U(C_1,C_2,n_2)= \log(c_1) + \beta \log(c_2) - \beta n_2 $ 

We have an allocation $ \bar y $ for period 1 and none for period 2, the household can only work in period two.

Here is the budget constraint : $ c_1 p_1 + c_2 p_2 = p_1 ( \bar y - x ) + qx + wn_2 + \pi  $ 

And the production function of the firm : $ f(k) = k^\alpha n_2^{1-\alpha} $

What I did until now is replacing $ c_2 $ in the utility function to have it depending on $c_1$,$ n_2$ and $ x $ only. Then I derive it for each variable and I can get the optimal condition for consumption : 
$ \frac{c_2}{c_1} = \beta \frac{p_1}{p_2} $, the other derivatives gives me : $ w = p_2 c_2 $ and $ q = p_1 $ .
By replacing $c_2$ in the budget constraint, I can determine $ c_1$ and then $c_2$, and x is given by the market clearing condition $ \bar y = c_1 + x $.

But I can't find anyway to determine $n_2$, it's usually in a logarithm so we can find it in our First Order Conditions...

Edit : 
$ x $ is the amount of capital given to the firm by the household, so we sould have $ x=k $ on capital market

$ q $ is the price of capital per unit

$ \pi $ is the profit of the firm , i.e. $ \pi(k,n_2) = p_2 k^\alpha n_2^{1-\alpha} - kq - wn_2 $

Edit 2 :
Rereading my question, I realize I should precise : 
The household can only consume the firm production in period 2, which is why he contributes to the capital and labor of the firm, earning wages and profits.
Therefore, we should also have $ f(k,n_2) = c_2 $ I believe

Edit 3 : 
My profit maximisation gives me : 
$ \frac{\alpha}{1-\alpha} n_2 w = k q $

Edit 4 after @X recommendation : 
So I do the lagrangian and derivatives, which gets me : 

$ \frac{1}{c_1} = \lambda p_1 $

$ \frac{\beta}{c_2} = \lambda p_2 $

$ \beta = \lambda w $

$ p_1 = q $

After computing, I find : $ c_1 = \frac{p_1 \bar y + w n_2 - \pi}{p_1(1+\beta)} $ and $ x = k = \bar y - c_1 = \frac{\beta p_1 \bar y - w n_2 + \pi}{p_1(1+\beta)} $

But still having trouble regarding my original issue, $ n_2 $ : I did , according to your advices : 
$ \frac{\alpha}{1-\alpha} n_2 w = k q $

$ \frac{\alpha}{1-\alpha} n_2 \frac{\beta}{\lambda} = \frac{\beta p_1 \bar y - w n_2 + \pi}{p_1(1+\beta)} p_1 $

$ \frac{\alpha}{1-\alpha} n_2 \beta p_1 c_1 = \frac{\beta p_1 \bar y - w n_2 + \pi}{(1+\beta)} $

$ \frac{\alpha}{1-\alpha} n_2 \frac{\beta}{1+\beta}(p_1 \bar y + w n_2 - \pi) = \frac{\beta p_1 \bar y - w n_2 + \pi}{(1+\beta)} $

$ \frac{\alpha}{1-\alpha} n_2 \beta(p_1 \bar y + w n_2 - \pi) = \beta p_1 \bar y - w n_2 + \pi $

$  n_2 \beta(p_1 \bar y + w n_2 - \pi) = \frac{1-\alpha}{\alpha} \frac{\beta p_1 \bar y - w n_2 + \pi}{\beta(p_1 \bar y + w n_2 - \pi)} $

Still pretty stupid as results ... I also used the central planner way and found $ n_2 = 1 - \alpha $ , which is weird..
I'd still like to go at the end of this way if someone has an idea.

Any idea ? 
Thanks.
I guess you mean that the condition $-\beta +\lambda w =0$ does not include labor. But you have the profit maximizing wage relation that includes labor and wage, and so combining, you can obtain an expression that includes the marginal product of labor, and the multiplier lambda, which can be expressed in terms of the other decision variables.



Ok, I see you got lost in running around your equations.

Profits are zero since the firm is a price taker and the production function is homogeneous of degree one (constant returns to scale).

$$ \frac{\alpha}{1-\alpha}n_2 w = k q \implies n_2\frac{\beta}{\lambda} = \frac{1-\alpha}{\alpha} kq$$

Since $\lambda = 1/c_1p_1$, $q=p_1$ and $k = \bar y -c_1$we get 

$$n_2\beta c_1p_1 = \frac{1-\alpha}{\alpha} (\bar y -c_1)p_1$$

$$\implies n_2 = \frac{1-\alpha}{\alpha\beta } \left(\frac{\bar y}{c_1} -1\right)$$.

Now, go back to the budget constraint

$$c_1 p_1 + c_2 p_2 = p_1 ( \bar y - x ) + qx + wn_2 + \pi$$

Inserting the various optimal conditions, you should arrive at 

$$c_1 = \frac {\bar y}{1+\alpha \beta}$$

which leads to $n_2 = 1-\alpha$.