[Tex/LaTex] Optimization formulas in LaTeX


This is the code I'm using for my optimization problem.

\displaystyle \min_{w,b,\xi} & \multicolumn{3}{l}{\frac{1}{2}w^{t}w+C\sum_{i=1}^{N}{\xi_{i}}}\\
\textrm{s.t.} & y_{i}(w\phi(x_{i}+b))+\xi_{i}-1\\
&\xi\geq0    \\

This is the result:
enter image description here

I want third argument (\xi\geq0) under yi. How can I do that? How can I add i=1 and N under and above summation?

Best Answer

this is very easy to accomplish using the aligned environment from amsmath:

\min_{w,b,\xi} \quad & \frac{1}{2}w^{t}w+C\sum_{i=1}^{N}{\xi_{i}}\\
\textrm{s.t.} \quad & y_{i}(w\phi(x_{i}+b))+\xi_{i}-1\\
  &\xi\geq0    \\

optput of example code

(in the future, please make your code a full compilable example, from \documentclass through \end{document}.)

Related Question