# Equation on multiple line [duplicate]

This question already has an answer here:

I have a mathematical expression, I try to write it in multiple line. I tried: multline, equation + split, align .. .

$\text{max} \left \{frac{1}{2}2x^{2}(2A+6Bx^{-4})+x(2Ax-2Bx^{-3}+\frac{1}{3}-4(Ax^{2}+Bx^{-2}+\frac{1} {3}x+1)+x+4,Ax^{2}+Bx^{-2}+\frac{1}{3}x-Ax^{2}-Bx^{-2}-\frac{1}{3}x-1 \right\}$


## marked as duplicate by Werner, user13907, percusse, Svend Tveskæg, egreg equations StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 20 '16 at 23:49

Another option is to use the align-environment. That is really practical and allows formatting/aligning with the &-Sign

\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\max \biggl\{\frac{1}{2}2x^{2}(2A+6Bx^{-4})+x(2Ax-2Bx^{-3}\frac{1]{3}-\\
4(Ax^{2}+Bx^{-2}+\frac{1} {3}x+1)+x+4,Ax^{2}+ \\
Bx^{-2}+\frac{1}{3}x-Ax^{2}-Bx^{-2}-\frac{1}{3}x-1   \biggr\}
\end{align*}


Your problem likely comes from the fact that \left .. \right cannot be used across line breaks. Use \biggl\{ and \biggr\} instead. Also, instead of \text{max} you can use \max.

By the way, looks like there's a parenthesis missing on the first line, and there's a comma in the second line that looks like it doesn't belong there. \documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}
\max \biggl\{\frac{1}{2}2x^{2}(2A+6Bx^{-4})+x(2Ax-2Bx^{-3}+\frac{1}{3}-
\\4(Ax^{2}+Bx^{-2}+\frac{1} {3}x+1)+x+4,Ax^{2}+ \\
Bx^{-2}+\frac{1}{3}x-Ax^{2}-Bx^{-2}-\frac{1}{3}x-1   \biggr\}
\end{multline}
\end{document}