How can you write following equation in Latex. Basically I have faced problem with long text enter image description here

I used


  \max\limits_{x,\lambda,\nu} L_(x,\lambda,\nu=\left\{

    f(x), & \text{if}\text{if x satisfy the primal condition} \\
    \infty, & \text{otherwise}


I got

enter image description here

  • you presumably got an error message that \text is undefined. After (any) error message the pdf output is not usable, and you should ask about the error not show the output. (load the amsmath package to define it) – David Carlisle Dec 18 '19 at 17:15

With the cases* environment from mathtools:



\[ \theta_{\mathcal{P}}(w) = \begin{cases*}
f(w) & if $w$ satisfies primal constraints \\
0 & otherwise

enter image description here


Please note that questions like this is generally frowned upon here as it has the characteristics of a do this for me question. Generally you should show what you have do far. Any good latex instructions should tell you how to construction expressions like this.

\theta_{\mathcal{P}}(w) = 
   f(w) & \text{if $w$ ... } 
   \infty & \text{otherwise} 

If you want, a day, to use the enviroment array instead of the best specific environment cases or dcases, you can to use this MWE.

enter image description here

\theta_{\mathcal{P}}(w) = \left\lbrace
f(w) & \text{if $w$ satisfy the primal condition}\\
\infty & \text{otherwise}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.