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;
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
add a comment |
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
add a comment |
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
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
math-mode align cases
edited 8 hours ago
JKHA
asked 8 hours ago
JKHAJKHA
1698 bronze badges
1698 bronze badges
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
with mfrac from nccmath and multlined from the mathtools package:

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
Wow impressive! Withx_uinleft[y_l,y_uright]that is above what I expected
– JKHA
8 hours ago
Upvote for to sharemfracandmultlined, as these are new to me....
– MadyYuvi
8 hours ago
@JKHA, oh this automatic replacement ofleft[withbiggl[... corrected now
– Zarko
6 hours ago
add a comment |
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
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
add a comment |
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

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).
"because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point:aligneddoes not care about being insidecases. Am I misunderstanding the statement?
– campa
6 hours ago
@campa Uhm, that's quite bizarre indeed, but I guessmultlinedis affected.
– egreg
6 hours ago
Ah, good point, I missed that you were usingmultlined.
– campa
6 hours ago
add a comment |
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.

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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
with mfrac from nccmath and multlined from the mathtools package:

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
Wow impressive! Withx_uinleft[y_l,y_uright]that is above what I expected
– JKHA
8 hours ago
Upvote for to sharemfracandmultlined, as these are new to me....
– MadyYuvi
8 hours ago
@JKHA, oh this automatic replacement ofleft[withbiggl[... corrected now
– Zarko
6 hours ago
add a comment |
with mfrac from nccmath and multlined from the mathtools package:

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
Wow impressive! Withx_uinleft[y_l,y_uright]that is above what I expected
– JKHA
8 hours ago
Upvote for to sharemfracandmultlined, as these are new to me....
– MadyYuvi
8 hours ago
@JKHA, oh this automatic replacement ofleft[withbiggl[... corrected now
– Zarko
6 hours ago
add a comment |
with mfrac from nccmath and multlined from the mathtools package:

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
with mfrac from nccmath and multlined from the mathtools package:

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
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! Withx_uinleft[y_l,y_uright]that is above what I expected
– JKHA
8 hours ago
Upvote for to sharemfracandmultlined, as these are new to me....
– MadyYuvi
8 hours ago
@JKHA, oh this automatic replacement ofleft[withbiggl[... corrected now
– Zarko
6 hours ago
add a comment |
Wow impressive! Withx_uinleft[y_l,y_uright]that is above what I expected
– JKHA
8 hours ago
Upvote for to sharemfracandmultlined, as these are new to me....
– MadyYuvi
8 hours ago
@JKHA, oh this automatic replacement ofleft[withbiggl[... 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
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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

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).
"because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point:aligneddoes not care about being insidecases. Am I misunderstanding the statement?
– campa
6 hours ago
@campa Uhm, that's quite bizarre indeed, but I guessmultlinedis affected.
– egreg
6 hours ago
Ah, good point, I missed that you were usingmultlined.
– campa
6 hours ago
add a comment |
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

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).
"because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point:aligneddoes not care about being insidecases. Am I misunderstanding the statement?
– campa
6 hours ago
@campa Uhm, that's quite bizarre indeed, but I guessmultlinedis affected.
– egreg
6 hours ago
Ah, good point, I missed that you were usingmultlined.
– campa
6 hours ago
add a comment |
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

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).
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

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).
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:aligneddoes not care about being insidecases. Am I misunderstanding the statement?
– campa
6 hours ago
@campa Uhm, that's quite bizarre indeed, but I guessmultlinedis affected.
– egreg
6 hours ago
Ah, good point, I missed that you were usingmultlined.
– campa
6 hours ago
add a comment |
"because it increases the interline spaces also inside nested alignments". Sure? Yesterday's conversation was quite about this point:aligneddoes not care about being insidecases. Am I misunderstanding the statement?
– campa
6 hours ago
@campa Uhm, that's quite bizarre indeed, but I guessmultlinedis affected.
– egreg
6 hours ago
Ah, good point, I missed that you were usingmultlined.
– 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
add a comment |
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.

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
add a comment |
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.

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
add a comment |
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.

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
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.

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
edited 5 hours ago
answered 7 hours ago
MicoMico
301k33 gold badges412 silver badges820 bronze badges
301k33 gold badges412 silver badges820 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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