<s>[INST] Optimization problem in a single variable. $$f(x) = x^3 - 3x $$
Find the maximum value of the function $f(x)$ on the set of real numbers satisfying 
$$x^4 + 36 \le 13x^2$$ 
I have only learned how to solve such question when the constraints are in an equality rather than an inequality through the Lagrangian method. General method to solve such problems with inequality constraints would also be extremely helpful.
Thanks.
 [/INST] $$\begin{align}
x^4+36 &\le 13x^2 \\
x^4-13x^2+36 &\le 0\\
x^4-9x^2-4x^2+36 &\le 0\\
x^2(x^2-9)-4(x^2-9)  &\le 0\\
(x^2-2^2)(x^2-3^2)  &\le 0\\
(x+3)(x+2)(x-2)(x-3)  &\le 0\\
\end{align}$$
This inequality is only satisfied when $2 \le x \le 3$ or $-3 \le x \le -2$.
$f(x)=x^3-3x=x(x^2-3)$ so $f(x)$ is an odd function. Also, it is an increasing function so $f(3)$ is the maximum value of $f(x)$ in this domain.
We can verify this by observing that:
$$\begin{align}
f(-3) &= -18\\
f(-2) &= -2\\
f(2) &= 2\\
f(3) &= 18\\
\end{align}$$ 

General method:
$\cdot$ Find the domain.
$\cdot$ Find the gradient by differentiating the function.
$\cdot$ Equate gradient to $0$ and find the values of $x$.
$\cdot$ Differentiate the gradient and calculate $f''(x)$.
$\cdot$ If $f''(x) \gt 0$ it is a minimum.
$\ \ $If $f''(x) \lt 0$ it is a maximum.
$\ \ $If $f''(x) = 0$ it is a point of inflection.  
</s>