Given constants $b_1$, $b_2$ such that $b_1 − e^{-b_2} ≥ 0$, maximise $f(x) =2\tan^{-1} x_1 + x_2$ subject to $x_1 + x_2 ≤ b_1$, $− \ln{x_2} ≤ b_2$, $x_1 ≥ 0$, $x_2 ≥ 0$.
I am trying to learn optimisation alone and I can't figure out this problem. I want to minimize $-f(x)$. My Lagrangian is
$L(x,\lambda,z) = 2\tan^{-1} x_1 + x_2 - \lambda_1(z_1+x_1+x_2-b_1)-\lambda_2(-\ln{x_2} -b_2+z_2)$
I got that $\lambda_1 \leq 0$ and I think $\lambda_2$ should be $0$ but I'm not sure. I also calculated the gradient and equaled it to $0$ but I'm not sure how to do the different cases.
I would appreciate some help.
Hint.
Considering that $-\ln x_2 \le b_2\equiv x_2 \ge e^{-b_2}$ for $x_2 \ge 0$
the restrictions can be transformed to
$$ g_1(x,b,\epsilon) = x_2-b_2-\epsilon^2\\ g_2(x,b,\epsilon)=b_1-b_2-\epsilon^2\\ g_3(x,b,\epsilon)=x_1+x_2-b_1+\epsilon^2\\ g_4(x,b,\epsilon)=x_1-\epsilon^2\\ g_5(x,b,\epsilon)=x_2-\epsilon^2\\ g_6(x,b,\epsilon)=b_2-\epsilon^2\\ $$
(here $b_2$ represents $e^{-b_2}$. Now with
$$ f(x) = 2\arctan x_1+x_2 $$
we have the Lagrangian
$$ L(x,b,\epsilon,\lambda) = f(x)+\sum_{k=1}^6 g(x,b,\epsilon_k) $$
so the stationary points are the solutions for
$$ \left\{ \begin{array}{rcl} \lambda_3+\lambda_4+\frac{2}{x_1^2+1}&=&0 \\ \lambda_1+\lambda_3+\lambda_5+1&=&0 \\ \lambda_2-\lambda_3&=&0 \\ -\lambda_1-\lambda_2+\lambda_6&=&0 \\ -\epsilon_1^2-b_2+x_2&=&0 \\ -\epsilon_2^2+b_1-b_2&=&0 \\ \epsilon_3^2-b_1+x_1+x_2&=&0 \\ x_1-\epsilon_4^2&=&0 \\ x_2-\epsilon_5^2&=&0 \\ b_2-\epsilon_6^2& =& 0 \\ -2 \epsilon_k \lambda_k & =& 0 \end{array} \right. $$
for $k = 1,\cdots,6$