Cases with long math equationBad formating with align + cases and long equationsMath equation with cases and division signsTabs in cases environment in an equationIs there a way to put two labelled equations into one beginequation and align both of them at the beginning?Aligned block misaligned with leading extra white spaceHow can I left-align each cell in an equation containing math symbols?How can I denote column and row names in a matrix and align equations with that matrix?Need help to create a more flexible cancel command that works inside an align environment

Lípínguapua dopo Pêpê

How far did Gandalf and the Balrog drop from the bridge in Moria?

Help, I cannot decide when to start the story

Are there any cons in using rounded corners for bar graphs?

An array battle with odd secret powers

Locked Room Murder!! How and who?

What would it take to get a message to another star?

"Table of Astronomy's" depiction of the solar system models

Did DOS zero out the BSS area when it loaded a program?

Are there really no countries that protect Freedom of Speech as the United States does?

Swap (and hibernation) on SSD in 2019?

Word for an event that will likely never happen again

What are those bumps on top of the Antonov-225?

In which case does the Security misconfiguration vulnerability apply to?

What is a "soap"?

Can lodestones be used to magnetize crude iron weapons?

How much can I judge a company based on a phone screening?

Does an object storing more internal energy emit more thermal radiation?

What can Amex do if I cancel their card after using the sign up bonus miles?

Is it possible to arrive in the US without a C-1 visa for a transit flight

Is there a way to proportionalize fixed costs in a MILP?

Why is there a large performance impact when looping over an array over 240 elements?

Chunk + Enumerate a list of digits

How can God warn people of the upcoming rapture without disrupting society?



Cases with long math equation


Bad formating with align + cases and long equationsMath equation with cases and division signsTabs in cases environment in an equationIs there a way to put two labelled equations into one beginequation and align both of them at the beginning?Aligned block misaligned with leading extra white spaceHow can I left-align each cell in an equation containing math symbols?How can I denote column and row names in a matrix and align equations with that matrix?Need help to create a more flexible cancel command that works inside an align environment






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















What would be the best formatting of the following align and cases where the middle case has a very long math equation?



beginalign*
V_ijk& = begincases
dfracy_u+y_l2 - dfracx_u+x_l2,& textif x_u < y_l\[15pt]
dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22+ dfracy_u^2-x_u^22(x_u-x_l)& - (y_u-x_u)dfracx_u^2-x_l^22 bigg],
\[12pt]& textif x_uinleft[y_l,y_uright]\[15pt]
dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22bigg],& textotherwise
endcases
endalign*




The main default of this current workaround which is nearly ok, is that there is an extra space before -(y_u-x_u) that is annoying. Note that I put the second if text under second equation because it would be too width for my memoir otherwise. Please favour simpliest solutions if possible :)










share|improve this question
































    4















    What would be the best formatting of the following align and cases where the middle case has a very long math equation?



    beginalign*
    V_ijk& = begincases
    dfracy_u+y_l2 - dfracx_u+x_l2,& textif x_u < y_l\[15pt]
    dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22+ dfracy_u^2-x_u^22(x_u-x_l)& - (y_u-x_u)dfracx_u^2-x_l^22 bigg],
    \[12pt]& textif x_uinleft[y_l,y_uright]\[15pt]
    dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22bigg],& textotherwise
    endcases
    endalign*




    The main default of this current workaround which is nearly ok, is that there is an extra space before -(y_u-x_u) that is annoying. Note that I put the second if text under second equation because it would be too width for my memoir otherwise. Please favour simpliest solutions if possible :)










    share|improve this question




























      4












      4








      4


      0






      What would be the best formatting of the following align and cases where the middle case has a very long math equation?



      beginalign*
      V_ijk& = begincases
      dfracy_u+y_l2 - dfracx_u+x_l2,& textif x_u < y_l\[15pt]
      dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22+ dfracy_u^2-x_u^22(x_u-x_l)& - (y_u-x_u)dfracx_u^2-x_l^22 bigg],
      \[12pt]& textif x_uinleft[y_l,y_uright]\[15pt]
      dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22bigg],& textotherwise
      endcases
      endalign*




      The main default of this current workaround which is nearly ok, is that there is an extra space before -(y_u-x_u) that is annoying. Note that I put the second if text under second equation because it would be too width for my memoir otherwise. Please favour simpliest solutions if possible :)










      share|improve this question
















      What would be the best formatting of the following align and cases where the middle case has a very long math equation?



      beginalign*
      V_ijk& = begincases
      dfracy_u+y_l2 - dfracx_u+x_l2,& textif x_u < y_l\[15pt]
      dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22+ dfracy_u^2-x_u^22(x_u-x_l)& - (y_u-x_u)dfracx_u^2-x_l^22 bigg],
      \[12pt]& textif x_uinleft[y_l,y_uright]\[15pt]
      dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22bigg],& textotherwise
      endcases
      endalign*




      The main default of this current workaround which is nearly ok, is that there is an extra space before -(y_u-x_u) that is annoying. Note that I put the second if text under second equation because it would be too width for my memoir otherwise. Please favour simpliest solutions if possible :)







      math-mode align cases






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 8 hours ago







      JKHA

















      asked 8 hours ago









      JKHAJKHA

      1698 bronze badges




      1698 bronze badges























          4 Answers
          4






          active

          oldest

          votes


















          5














          with mfrac from nccmath and multlined from the mathtools package:



          enter image description here



          documentclassarticle
          usepackagemathtools, nccmath

          %---------------- show page layout. don't use in a real document!
          usepackageshowframe
          renewcommandShowFrameLinethickness0.15pt
          renewcommand*ShowFrameColorcolorred
          %---------------------------------------------------------------%

          begindocument

          [
          V_ijk = begincases
          mfracy_u+y_l2 - mfracx_u+x_l2, &textif x_u < y_l \[3ex]
          beginmultlined
          mfrac1C bigg[mfracx_u^3-y_l^36+mfracy_l^2+x_u^22x_l
          + (x_u-y_l)mfracx_l^22\[-2ex]
          + mfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)mfracx_u^2-x_l^22 biggr]
          endmultlined,
          & textif x_uin [y_l,y_u ]
          \[5ex]
          mfrac1x_u-x_lbiggl[mfrac(y_u+y_l)^26 - mfracy_u+y_l2 x_l
          + mfracx_l^22biggr],& textotherwise
          endcases
          ]
          enddocument





          share|improve this answer



























          • Wow impressive! With x_uinleft[y_l,y_uright] that is above what I expected

            – JKHA
            8 hours ago












          • Upvote for to share mfrac and multlined, as these are new to me....

            – MadyYuvi
            8 hours ago











          • @JKHA, oh this automatic replacement of left[ with biggl[ ... corrected now

            – Zarko
            6 hours ago


















          4














          I'm pretty sure it is a duplicate. But it is also easy to solve using aligned



          documentclassarticle

          usepackageamsmath

          begindocument

          beginalign*
          V_ijk& = begincases dfracy_u+y_l2 - dfracx_u+x_l2,&
          textif x_u < y_l
          \[15pt]
          beginaligned[b]
          &dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l
          + (x_u-y_l)dfracx_l^22
          \
          &+ dfracy_u^2-x_u^22(x_u-x_l) -
          (y_u-x_u)dfracx_u^2-x_l^22 bigg]
          endaligned,
          & textif x_uinleft[y_l,y_uright]
          \[15pt]
          dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l
          + dfracx_l^22bigg],& textotherwise
          endcases
          endalign*
          enddocument





          share|improve this answer

























          • I thought it would be less readable wrapping my second equation, but probably I was wrong

            – JKHA
            8 hours ago







          • 1





            @JKHA it is pretty standard and it does fint on the paper. BTW: next time please provide a full minimal example including document class and minimal preamble like I do above. It makes it a lot faster for others to help you.

            – daleif
            8 hours ago











          • All right, I'll do it!

            – JKHA
            8 hours ago



















          3














          My suggestion is not to use cases, because it increases the interline spaces also inside nested alignments.



          Using multlined for the long middle equation does the job.



          documentclassarticle
          usepackageamsmath,mathtools

          begindocument

          beginequation*
          V_ijk = left{
          beginaligned
          & dfracy_u+y_l2 - dfracx_u+x_l2, && textif x_u < y_l
          \[2ex]
          & beginmultlined[b]
          dfrac1C biggl[
          dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22 \
          + dfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)dfracx_u^2-x_l^22
          biggr],
          endmultlined && textif x_uin [y_l,y_u]
          \[2ex]
          & dfrac1x_u-x_lbiggl[
          dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22
          biggr], && textotherwise
          endaligned
          right.
          endequation*

          enddocument


          enter image description here



          Avoid code such as frac1C that's hard to read and to maintain. Also note biggl and biggr instead of the unqualified bigg.



          Also avoid align for single equations (which this is an example of).






          share|improve this answer

























          • "because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point: aligned does not care about being inside cases. Am I misunderstanding the statement?

            – campa
            6 hours ago











          • @campa Uhm, that's quite bizarre indeed, but I guess multlined is affected.

            – egreg
            6 hours ago











          • Ah, good point, I missed that you were using multlined.

            – campa
            6 hours ago


















          3














          Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write frac instead of dfrac in order to get "large" fraction terms.



          enter image description here



          Note that I've removed unnecessary left and right directives.



          documentclassarticle
          usepackagemathtools % for 'dcases*' environment

          begindocument
          [
          V_ijk =
          begindcases*
          fracy_u+y_l2 - fracx_u+x_l2,,
          &if $x_u < y_l$\[1ex]
          beginaligned[b]
          &frac1C biggl[
          fracx_u^3-y_l^36+fracy_l^2+x_u^22x_l
          + (x_u-y_l)fracx_l^22\
          &quad + fracy_u^2-x_u^22(x_u-x_l)
          - (y_u-x_u)fracx_u^2-x_l^22 ,biggr],,
          endaligned
          &if $x_uin[y_l,y_u]$ \[1ex]
          frac1x_u-x_l biggl[
          frac(y_u+y_l)^26
          - fracy_u+y_l2 x_l
          + fracx_l^22 ,biggr],,
          & otherwise
          enddcases*
          ]
          enddocument





          share|improve this answer





























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "85"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f504188%2fcases-with-long-math-equation%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            with mfrac from nccmath and multlined from the mathtools package:



            enter image description here



            documentclassarticle
            usepackagemathtools, nccmath

            %---------------- show page layout. don't use in a real document!
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred
            %---------------------------------------------------------------%

            begindocument

            [
            V_ijk = begincases
            mfracy_u+y_l2 - mfracx_u+x_l2, &textif x_u < y_l \[3ex]
            beginmultlined
            mfrac1C bigg[mfracx_u^3-y_l^36+mfracy_l^2+x_u^22x_l
            + (x_u-y_l)mfracx_l^22\[-2ex]
            + mfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)mfracx_u^2-x_l^22 biggr]
            endmultlined,
            & textif x_uin [y_l,y_u ]
            \[5ex]
            mfrac1x_u-x_lbiggl[mfrac(y_u+y_l)^26 - mfracy_u+y_l2 x_l
            + mfracx_l^22biggr],& textotherwise
            endcases
            ]
            enddocument





            share|improve this answer



























            • Wow impressive! With x_uinleft[y_l,y_uright] that is above what I expected

              – JKHA
              8 hours ago












            • Upvote for to share mfrac and multlined, as these are new to me....

              – MadyYuvi
              8 hours ago











            • @JKHA, oh this automatic replacement of left[ with biggl[ ... corrected now

              – Zarko
              6 hours ago















            5














            with mfrac from nccmath and multlined from the mathtools package:



            enter image description here



            documentclassarticle
            usepackagemathtools, nccmath

            %---------------- show page layout. don't use in a real document!
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred
            %---------------------------------------------------------------%

            begindocument

            [
            V_ijk = begincases
            mfracy_u+y_l2 - mfracx_u+x_l2, &textif x_u < y_l \[3ex]
            beginmultlined
            mfrac1C bigg[mfracx_u^3-y_l^36+mfracy_l^2+x_u^22x_l
            + (x_u-y_l)mfracx_l^22\[-2ex]
            + mfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)mfracx_u^2-x_l^22 biggr]
            endmultlined,
            & textif x_uin [y_l,y_u ]
            \[5ex]
            mfrac1x_u-x_lbiggl[mfrac(y_u+y_l)^26 - mfracy_u+y_l2 x_l
            + mfracx_l^22biggr],& textotherwise
            endcases
            ]
            enddocument





            share|improve this answer



























            • Wow impressive! With x_uinleft[y_l,y_uright] that is above what I expected

              – JKHA
              8 hours ago












            • Upvote for to share mfrac and multlined, as these are new to me....

              – MadyYuvi
              8 hours ago











            • @JKHA, oh this automatic replacement of left[ with biggl[ ... corrected now

              – Zarko
              6 hours ago













            5












            5








            5







            with mfrac from nccmath and multlined from the mathtools package:



            enter image description here



            documentclassarticle
            usepackagemathtools, nccmath

            %---------------- show page layout. don't use in a real document!
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred
            %---------------------------------------------------------------%

            begindocument

            [
            V_ijk = begincases
            mfracy_u+y_l2 - mfracx_u+x_l2, &textif x_u < y_l \[3ex]
            beginmultlined
            mfrac1C bigg[mfracx_u^3-y_l^36+mfracy_l^2+x_u^22x_l
            + (x_u-y_l)mfracx_l^22\[-2ex]
            + mfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)mfracx_u^2-x_l^22 biggr]
            endmultlined,
            & textif x_uin [y_l,y_u ]
            \[5ex]
            mfrac1x_u-x_lbiggl[mfrac(y_u+y_l)^26 - mfracy_u+y_l2 x_l
            + mfracx_l^22biggr],& textotherwise
            endcases
            ]
            enddocument





            share|improve this answer















            with mfrac from nccmath and multlined from the mathtools package:



            enter image description here



            documentclassarticle
            usepackagemathtools, nccmath

            %---------------- show page layout. don't use in a real document!
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred
            %---------------------------------------------------------------%

            begindocument

            [
            V_ijk = begincases
            mfracy_u+y_l2 - mfracx_u+x_l2, &textif x_u < y_l \[3ex]
            beginmultlined
            mfrac1C bigg[mfracx_u^3-y_l^36+mfracy_l^2+x_u^22x_l
            + (x_u-y_l)mfracx_l^22\[-2ex]
            + mfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)mfracx_u^2-x_l^22 biggr]
            endmultlined,
            & textif x_uin [y_l,y_u ]
            \[5ex]
            mfrac1x_u-x_lbiggl[mfrac(y_u+y_l)^26 - mfracy_u+y_l2 x_l
            + mfracx_l^22biggr],& textotherwise
            endcases
            ]
            enddocument






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 6 hours ago

























            answered 8 hours ago









            ZarkoZarko

            143k8 gold badges80 silver badges192 bronze badges




            143k8 gold badges80 silver badges192 bronze badges















            • Wow impressive! With x_uinleft[y_l,y_uright] that is above what I expected

              – JKHA
              8 hours ago












            • Upvote for to share mfrac and multlined, as these are new to me....

              – MadyYuvi
              8 hours ago











            • @JKHA, oh this automatic replacement of left[ with biggl[ ... corrected now

              – Zarko
              6 hours ago

















            • Wow impressive! With x_uinleft[y_l,y_uright] that is above what I expected

              – JKHA
              8 hours ago












            • Upvote for to share mfrac and multlined, as these are new to me....

              – MadyYuvi
              8 hours ago











            • @JKHA, oh this automatic replacement of left[ with biggl[ ... corrected now

              – Zarko
              6 hours ago
















            Wow impressive! With x_uinleft[y_l,y_uright] that is above what I expected

            – JKHA
            8 hours ago






            Wow impressive! With x_uinleft[y_l,y_uright] that is above what I expected

            – JKHA
            8 hours ago














            Upvote for to share mfrac and multlined, as these are new to me....

            – MadyYuvi
            8 hours ago





            Upvote for to share mfrac and multlined, as these are new to me....

            – MadyYuvi
            8 hours ago













            @JKHA, oh this automatic replacement of left[ with biggl[ ... corrected now

            – Zarko
            6 hours ago





            @JKHA, oh this automatic replacement of left[ with biggl[ ... corrected now

            – Zarko
            6 hours ago













            4














            I'm pretty sure it is a duplicate. But it is also easy to solve using aligned



            documentclassarticle

            usepackageamsmath

            begindocument

            beginalign*
            V_ijk& = begincases dfracy_u+y_l2 - dfracx_u+x_l2,&
            textif x_u < y_l
            \[15pt]
            beginaligned[b]
            &dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l
            + (x_u-y_l)dfracx_l^22
            \
            &+ dfracy_u^2-x_u^22(x_u-x_l) -
            (y_u-x_u)dfracx_u^2-x_l^22 bigg]
            endaligned,
            & textif x_uinleft[y_l,y_uright]
            \[15pt]
            dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l
            + dfracx_l^22bigg],& textotherwise
            endcases
            endalign*
            enddocument





            share|improve this answer

























            • I thought it would be less readable wrapping my second equation, but probably I was wrong

              – JKHA
              8 hours ago







            • 1





              @JKHA it is pretty standard and it does fint on the paper. BTW: next time please provide a full minimal example including document class and minimal preamble like I do above. It makes it a lot faster for others to help you.

              – daleif
              8 hours ago











            • All right, I'll do it!

              – JKHA
              8 hours ago
















            4














            I'm pretty sure it is a duplicate. But it is also easy to solve using aligned



            documentclassarticle

            usepackageamsmath

            begindocument

            beginalign*
            V_ijk& = begincases dfracy_u+y_l2 - dfracx_u+x_l2,&
            textif x_u < y_l
            \[15pt]
            beginaligned[b]
            &dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l
            + (x_u-y_l)dfracx_l^22
            \
            &+ dfracy_u^2-x_u^22(x_u-x_l) -
            (y_u-x_u)dfracx_u^2-x_l^22 bigg]
            endaligned,
            & textif x_uinleft[y_l,y_uright]
            \[15pt]
            dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l
            + dfracx_l^22bigg],& textotherwise
            endcases
            endalign*
            enddocument





            share|improve this answer

























            • I thought it would be less readable wrapping my second equation, but probably I was wrong

              – JKHA
              8 hours ago







            • 1





              @JKHA it is pretty standard and it does fint on the paper. BTW: next time please provide a full minimal example including document class and minimal preamble like I do above. It makes it a lot faster for others to help you.

              – daleif
              8 hours ago











            • All right, I'll do it!

              – JKHA
              8 hours ago














            4












            4








            4







            I'm pretty sure it is a duplicate. But it is also easy to solve using aligned



            documentclassarticle

            usepackageamsmath

            begindocument

            beginalign*
            V_ijk& = begincases dfracy_u+y_l2 - dfracx_u+x_l2,&
            textif x_u < y_l
            \[15pt]
            beginaligned[b]
            &dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l
            + (x_u-y_l)dfracx_l^22
            \
            &+ dfracy_u^2-x_u^22(x_u-x_l) -
            (y_u-x_u)dfracx_u^2-x_l^22 bigg]
            endaligned,
            & textif x_uinleft[y_l,y_uright]
            \[15pt]
            dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l
            + dfracx_l^22bigg],& textotherwise
            endcases
            endalign*
            enddocument





            share|improve this answer













            I'm pretty sure it is a duplicate. But it is also easy to solve using aligned



            documentclassarticle

            usepackageamsmath

            begindocument

            beginalign*
            V_ijk& = begincases dfracy_u+y_l2 - dfracx_u+x_l2,&
            textif x_u < y_l
            \[15pt]
            beginaligned[b]
            &dfrac1C bigg[dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l
            + (x_u-y_l)dfracx_l^22
            \
            &+ dfracy_u^2-x_u^22(x_u-x_l) -
            (y_u-x_u)dfracx_u^2-x_l^22 bigg]
            endaligned,
            & textif x_uinleft[y_l,y_uright]
            \[15pt]
            dfrac1x_u-x_lbigg[dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l
            + dfracx_l^22bigg],& textotherwise
            endcases
            endalign*
            enddocument






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 8 hours ago









            daleifdaleif

            35.4k2 gold badges57 silver badges122 bronze badges




            35.4k2 gold badges57 silver badges122 bronze badges















            • I thought it would be less readable wrapping my second equation, but probably I was wrong

              – JKHA
              8 hours ago







            • 1





              @JKHA it is pretty standard and it does fint on the paper. BTW: next time please provide a full minimal example including document class and minimal preamble like I do above. It makes it a lot faster for others to help you.

              – daleif
              8 hours ago











            • All right, I'll do it!

              – JKHA
              8 hours ago


















            • I thought it would be less readable wrapping my second equation, but probably I was wrong

              – JKHA
              8 hours ago







            • 1





              @JKHA it is pretty standard and it does fint on the paper. BTW: next time please provide a full minimal example including document class and minimal preamble like I do above. It makes it a lot faster for others to help you.

              – daleif
              8 hours ago











            • All right, I'll do it!

              – JKHA
              8 hours ago

















            I thought it would be less readable wrapping my second equation, but probably I was wrong

            – JKHA
            8 hours ago






            I thought it would be less readable wrapping my second equation, but probably I was wrong

            – JKHA
            8 hours ago





            1




            1





            @JKHA it is pretty standard and it does fint on the paper. BTW: next time please provide a full minimal example including document class and minimal preamble like I do above. It makes it a lot faster for others to help you.

            – daleif
            8 hours ago





            @JKHA it is pretty standard and it does fint on the paper. BTW: next time please provide a full minimal example including document class and minimal preamble like I do above. It makes it a lot faster for others to help you.

            – daleif
            8 hours ago













            All right, I'll do it!

            – JKHA
            8 hours ago






            All right, I'll do it!

            – JKHA
            8 hours ago












            3














            My suggestion is not to use cases, because it increases the interline spaces also inside nested alignments.



            Using multlined for the long middle equation does the job.



            documentclassarticle
            usepackageamsmath,mathtools

            begindocument

            beginequation*
            V_ijk = left{
            beginaligned
            & dfracy_u+y_l2 - dfracx_u+x_l2, && textif x_u < y_l
            \[2ex]
            & beginmultlined[b]
            dfrac1C biggl[
            dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22 \
            + dfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)dfracx_u^2-x_l^22
            biggr],
            endmultlined && textif x_uin [y_l,y_u]
            \[2ex]
            & dfrac1x_u-x_lbiggl[
            dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22
            biggr], && textotherwise
            endaligned
            right.
            endequation*

            enddocument


            enter image description here



            Avoid code such as frac1C that's hard to read and to maintain. Also note biggl and biggr instead of the unqualified bigg.



            Also avoid align for single equations (which this is an example of).






            share|improve this answer

























            • "because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point: aligned does not care about being inside cases. Am I misunderstanding the statement?

              – campa
              6 hours ago











            • @campa Uhm, that's quite bizarre indeed, but I guess multlined is affected.

              – egreg
              6 hours ago











            • Ah, good point, I missed that you were using multlined.

              – campa
              6 hours ago















            3














            My suggestion is not to use cases, because it increases the interline spaces also inside nested alignments.



            Using multlined for the long middle equation does the job.



            documentclassarticle
            usepackageamsmath,mathtools

            begindocument

            beginequation*
            V_ijk = left{
            beginaligned
            & dfracy_u+y_l2 - dfracx_u+x_l2, && textif x_u < y_l
            \[2ex]
            & beginmultlined[b]
            dfrac1C biggl[
            dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22 \
            + dfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)dfracx_u^2-x_l^22
            biggr],
            endmultlined && textif x_uin [y_l,y_u]
            \[2ex]
            & dfrac1x_u-x_lbiggl[
            dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22
            biggr], && textotherwise
            endaligned
            right.
            endequation*

            enddocument


            enter image description here



            Avoid code such as frac1C that's hard to read and to maintain. Also note biggl and biggr instead of the unqualified bigg.



            Also avoid align for single equations (which this is an example of).






            share|improve this answer

























            • "because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point: aligned does not care about being inside cases. Am I misunderstanding the statement?

              – campa
              6 hours ago











            • @campa Uhm, that's quite bizarre indeed, but I guess multlined is affected.

              – egreg
              6 hours ago











            • Ah, good point, I missed that you were using multlined.

              – campa
              6 hours ago













            3












            3








            3







            My suggestion is not to use cases, because it increases the interline spaces also inside nested alignments.



            Using multlined for the long middle equation does the job.



            documentclassarticle
            usepackageamsmath,mathtools

            begindocument

            beginequation*
            V_ijk = left{
            beginaligned
            & dfracy_u+y_l2 - dfracx_u+x_l2, && textif x_u < y_l
            \[2ex]
            & beginmultlined[b]
            dfrac1C biggl[
            dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22 \
            + dfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)dfracx_u^2-x_l^22
            biggr],
            endmultlined && textif x_uin [y_l,y_u]
            \[2ex]
            & dfrac1x_u-x_lbiggl[
            dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22
            biggr], && textotherwise
            endaligned
            right.
            endequation*

            enddocument


            enter image description here



            Avoid code such as frac1C that's hard to read and to maintain. Also note biggl and biggr instead of the unqualified bigg.



            Also avoid align for single equations (which this is an example of).






            share|improve this answer













            My suggestion is not to use cases, because it increases the interline spaces also inside nested alignments.



            Using multlined for the long middle equation does the job.



            documentclassarticle
            usepackageamsmath,mathtools

            begindocument

            beginequation*
            V_ijk = left{
            beginaligned
            & dfracy_u+y_l2 - dfracx_u+x_l2, && textif x_u < y_l
            \[2ex]
            & beginmultlined[b]
            dfrac1C biggl[
            dfracx_u^3-y_l^36+dfracy_l^2+x_u^22x_l + (x_u-y_l)dfracx_l^22 \
            + dfracy_u^2-x_u^22(x_u-x_l) - (y_u-x_u)dfracx_u^2-x_l^22
            biggr],
            endmultlined && textif x_uin [y_l,y_u]
            \[2ex]
            & dfrac1x_u-x_lbiggl[
            dfrac(y_u+y_l)^26 - dfracy_u+y_l2 x_l + dfracx_l^22
            biggr], && textotherwise
            endaligned
            right.
            endequation*

            enddocument


            enter image description here



            Avoid code such as frac1C that's hard to read and to maintain. Also note biggl and biggr instead of the unqualified bigg.



            Also avoid align for single equations (which this is an example of).







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 6 hours ago









            egregegreg

            762k90 gold badges1990 silver badges3338 bronze badges




            762k90 gold badges1990 silver badges3338 bronze badges















            • "because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point: aligned does not care about being inside cases. Am I misunderstanding the statement?

              – campa
              6 hours ago











            • @campa Uhm, that's quite bizarre indeed, but I guess multlined is affected.

              – egreg
              6 hours ago











            • Ah, good point, I missed that you were using multlined.

              – campa
              6 hours ago

















            • "because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point: aligned does not care about being inside cases. Am I misunderstanding the statement?

              – campa
              6 hours ago











            • @campa Uhm, that's quite bizarre indeed, but I guess multlined is affected.

              – egreg
              6 hours ago











            • Ah, good point, I missed that you were using multlined.

              – campa
              6 hours ago
















            "because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point: aligned does not care about being inside cases. Am I misunderstanding the statement?

            – campa
            6 hours ago





            "because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point: aligned does not care about being inside cases. Am I misunderstanding the statement?

            – campa
            6 hours ago













            @campa Uhm, that's quite bizarre indeed, but I guess multlined is affected.

            – egreg
            6 hours ago





            @campa Uhm, that's quite bizarre indeed, but I guess multlined is affected.

            – egreg
            6 hours ago













            Ah, good point, I missed that you were using multlined.

            – campa
            6 hours ago





            Ah, good point, I missed that you were using multlined.

            – campa
            6 hours ago











            3














            Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write frac instead of dfrac in order to get "large" fraction terms.



            enter image description here



            Note that I've removed unnecessary left and right directives.



            documentclassarticle
            usepackagemathtools % for 'dcases*' environment

            begindocument
            [
            V_ijk =
            begindcases*
            fracy_u+y_l2 - fracx_u+x_l2,,
            &if $x_u < y_l$\[1ex]
            beginaligned[b]
            &frac1C biggl[
            fracx_u^3-y_l^36+fracy_l^2+x_u^22x_l
            + (x_u-y_l)fracx_l^22\
            &quad + fracy_u^2-x_u^22(x_u-x_l)
            - (y_u-x_u)fracx_u^2-x_l^22 ,biggr],,
            endaligned
            &if $x_uin[y_l,y_u]$ \[1ex]
            frac1x_u-x_l biggl[
            frac(y_u+y_l)^26
            - fracy_u+y_l2 x_l
            + fracx_l^22 ,biggr],,
            & otherwise
            enddcases*
            ]
            enddocument





            share|improve this answer































              3














              Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write frac instead of dfrac in order to get "large" fraction terms.



              enter image description here



              Note that I've removed unnecessary left and right directives.



              documentclassarticle
              usepackagemathtools % for 'dcases*' environment

              begindocument
              [
              V_ijk =
              begindcases*
              fracy_u+y_l2 - fracx_u+x_l2,,
              &if $x_u < y_l$\[1ex]
              beginaligned[b]
              &frac1C biggl[
              fracx_u^3-y_l^36+fracy_l^2+x_u^22x_l
              + (x_u-y_l)fracx_l^22\
              &quad + fracy_u^2-x_u^22(x_u-x_l)
              - (y_u-x_u)fracx_u^2-x_l^22 ,biggr],,
              endaligned
              &if $x_uin[y_l,y_u]$ \[1ex]
              frac1x_u-x_l biggl[
              frac(y_u+y_l)^26
              - fracy_u+y_l2 x_l
              + fracx_l^22 ,biggr],,
              & otherwise
              enddcases*
              ]
              enddocument





              share|improve this answer





























                3












                3








                3







                Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write frac instead of dfrac in order to get "large" fraction terms.



                enter image description here



                Note that I've removed unnecessary left and right directives.



                documentclassarticle
                usepackagemathtools % for 'dcases*' environment

                begindocument
                [
                V_ijk =
                begindcases*
                fracy_u+y_l2 - fracx_u+x_l2,,
                &if $x_u < y_l$\[1ex]
                beginaligned[b]
                &frac1C biggl[
                fracx_u^3-y_l^36+fracy_l^2+x_u^22x_l
                + (x_u-y_l)fracx_l^22\
                &quad + fracy_u^2-x_u^22(x_u-x_l)
                - (y_u-x_u)fracx_u^2-x_l^22 ,biggr],,
                endaligned
                &if $x_uin[y_l,y_u]$ \[1ex]
                frac1x_u-x_l biggl[
                frac(y_u+y_l)^26
                - fracy_u+y_l2 x_l
                + fracx_l^22 ,biggr],,
                & otherwise
                enddcases*
                ]
                enddocument





                share|improve this answer















                Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write frac instead of dfrac in order to get "large" fraction terms.



                enter image description here



                Note that I've removed unnecessary left and right directives.



                documentclassarticle
                usepackagemathtools % for 'dcases*' environment

                begindocument
                [
                V_ijk =
                begindcases*
                fracy_u+y_l2 - fracx_u+x_l2,,
                &if $x_u < y_l$\[1ex]
                beginaligned[b]
                &frac1C biggl[
                fracx_u^3-y_l^36+fracy_l^2+x_u^22x_l
                + (x_u-y_l)fracx_l^22\
                &quad + fracy_u^2-x_u^22(x_u-x_l)
                - (y_u-x_u)fracx_u^2-x_l^22 ,biggr],,
                endaligned
                &if $x_uin[y_l,y_u]$ \[1ex]
                frac1x_u-x_l biggl[
                frac(y_u+y_l)^26
                - fracy_u+y_l2 x_l
                + fracx_l^22 ,biggr],,
                & otherwise
                enddcases*
                ]
                enddocument






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 5 hours ago

























                answered 7 hours ago









                MicoMico

                301k33 gold badges412 silver badges820 bronze badges




                301k33 gold badges412 silver badges820 bronze badges






























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f504188%2fcases-with-long-math-equation%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480