How to write a long equation without it going over the margin?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












This is my LaTeX code



I'm using these packages



usepackagephysics
usepackageamsmath
usepackageamssymb,latexsym,mathrsfs


And the code is



documentclass[a4paper]article
usepackage[utf8]inputenc
usepackagephysics
usepackageamsmath

usepackageamssymb,latexsym,mathrsfs

begindocument
beginequation
beginaligned
frac14sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
L ^ 2 - tilde E ) underbrace intlimits_0^L qty( cos
frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
prime + m ) z L ) V(s,z) ddz _I_1 , times \
underbrace intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
frac pi qty( n^prime + n ) s s _ f ) dds_I^prime_1
cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1
^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
frac pi left( n ^ prime - n right) s s _ f - cos frac
pi left( n ^ prime + n right) s s _ f )dds times \
int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
right) x L - cos frac pi left( m ^ prime + m right) z
L right] V (s,z) ddzcdot C_n,m=0
endaligned
endequation
enddocument


and I get this



enter image description here



I want that my equation doesn't break in the margins.



Thanks a lot.










share|improve this question























  • What is qty? Please post a full compilable code.
    – Bernard
    1 hour ago










  • It's the same left(..... right), but with a usepackagephysics
    – PCat27
    1 hour ago






  • 1




    What is f? Your code does not compile.
    – Sigur
    1 hour ago






  • 1




    don't make it hard for people to help you, please make the example complete from documentclass to enddocument in particular you ask that it fits the margins without saying what size your page is..
    – David Carlisle
    1 hour ago






  • 1




    why do you have limits everywhere and why ^prime instead of ' ?
    – David Carlisle
    1 hour ago














up vote
1
down vote

favorite












This is my LaTeX code



I'm using these packages



usepackagephysics
usepackageamsmath
usepackageamssymb,latexsym,mathrsfs


And the code is



documentclass[a4paper]article
usepackage[utf8]inputenc
usepackagephysics
usepackageamsmath

usepackageamssymb,latexsym,mathrsfs

begindocument
beginequation
beginaligned
frac14sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
L ^ 2 - tilde E ) underbrace intlimits_0^L qty( cos
frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
prime + m ) z L ) V(s,z) ddz _I_1 , times \
underbrace intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
frac pi qty( n^prime + n ) s s _ f ) dds_I^prime_1
cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1
^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
frac pi left( n ^ prime - n right) s s _ f - cos frac
pi left( n ^ prime + n right) s s _ f )dds times \
int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
right) x L - cos frac pi left( m ^ prime + m right) z
L right] V (s,z) ddzcdot C_n,m=0
endaligned
endequation
enddocument


and I get this



enter image description here



I want that my equation doesn't break in the margins.



Thanks a lot.










share|improve this question























  • What is qty? Please post a full compilable code.
    – Bernard
    1 hour ago










  • It's the same left(..... right), but with a usepackagephysics
    – PCat27
    1 hour ago






  • 1




    What is f? Your code does not compile.
    – Sigur
    1 hour ago






  • 1




    don't make it hard for people to help you, please make the example complete from documentclass to enddocument in particular you ask that it fits the margins without saying what size your page is..
    – David Carlisle
    1 hour ago






  • 1




    why do you have limits everywhere and why ^prime instead of ' ?
    – David Carlisle
    1 hour ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











This is my LaTeX code



I'm using these packages



usepackagephysics
usepackageamsmath
usepackageamssymb,latexsym,mathrsfs


And the code is



documentclass[a4paper]article
usepackage[utf8]inputenc
usepackagephysics
usepackageamsmath

usepackageamssymb,latexsym,mathrsfs

begindocument
beginequation
beginaligned
frac14sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
L ^ 2 - tilde E ) underbrace intlimits_0^L qty( cos
frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
prime + m ) z L ) V(s,z) ddz _I_1 , times \
underbrace intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
frac pi qty( n^prime + n ) s s _ f ) dds_I^prime_1
cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1
^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
frac pi left( n ^ prime - n right) s s _ f - cos frac
pi left( n ^ prime + n right) s s _ f )dds times \
int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
right) x L - cos frac pi left( m ^ prime + m right) z
L right] V (s,z) ddzcdot C_n,m=0
endaligned
endequation
enddocument


and I get this



enter image description here



I want that my equation doesn't break in the margins.



Thanks a lot.










share|improve this question















This is my LaTeX code



I'm using these packages



usepackagephysics
usepackageamsmath
usepackageamssymb,latexsym,mathrsfs


And the code is



documentclass[a4paper]article
usepackage[utf8]inputenc
usepackagephysics
usepackageamsmath

usepackageamssymb,latexsym,mathrsfs

begindocument
beginequation
beginaligned
frac14sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
L ^ 2 - tilde E ) underbrace intlimits_0^L qty( cos
frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
prime + m ) z L ) V(s,z) ddz _I_1 , times \
underbrace intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
frac pi qty( n^prime + n ) s s _ f ) dds_I^prime_1
cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1
^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
frac pi left( n ^ prime - n right) s s _ f - cos frac
pi left( n ^ prime + n right) s s _ f )dds times \
int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
right) x L - cos frac pi left( m ^ prime + m right) z
L right] V (s,z) ddzcdot C_n,m=0
endaligned
endequation
enddocument


and I get this



enter image description here



I want that my equation doesn't break in the margins.



Thanks a lot.







equations align split






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago

























asked 1 hour ago









PCat27

595




595











  • What is qty? Please post a full compilable code.
    – Bernard
    1 hour ago










  • It's the same left(..... right), but with a usepackagephysics
    – PCat27
    1 hour ago






  • 1




    What is f? Your code does not compile.
    – Sigur
    1 hour ago






  • 1




    don't make it hard for people to help you, please make the example complete from documentclass to enddocument in particular you ask that it fits the margins without saying what size your page is..
    – David Carlisle
    1 hour ago






  • 1




    why do you have limits everywhere and why ^prime instead of ' ?
    – David Carlisle
    1 hour ago
















  • What is qty? Please post a full compilable code.
    – Bernard
    1 hour ago










  • It's the same left(..... right), but with a usepackagephysics
    – PCat27
    1 hour ago






  • 1




    What is f? Your code does not compile.
    – Sigur
    1 hour ago






  • 1




    don't make it hard for people to help you, please make the example complete from documentclass to enddocument in particular you ask that it fits the margins without saying what size your page is..
    – David Carlisle
    1 hour ago






  • 1




    why do you have limits everywhere and why ^prime instead of ' ?
    – David Carlisle
    1 hour ago















What is qty? Please post a full compilable code.
– Bernard
1 hour ago




What is qty? Please post a full compilable code.
– Bernard
1 hour ago












It's the same left(..... right), but with a usepackagephysics
– PCat27
1 hour ago




It's the same left(..... right), but with a usepackagephysics
– PCat27
1 hour ago




1




1




What is f? Your code does not compile.
– Sigur
1 hour ago




What is f? Your code does not compile.
– Sigur
1 hour ago




1




1




don't make it hard for people to help you, please make the example complete from documentclass to enddocument in particular you ask that it fits the margins without saying what size your page is..
– David Carlisle
1 hour ago




don't make it hard for people to help you, please make the example complete from documentclass to enddocument in particular you ask that it fits the margins without saying what size your page is..
– David Carlisle
1 hour ago




1




1




why do you have limits everywhere and why ^prime instead of ' ?
– David Carlisle
1 hour ago




why do you have limits everywhere and why ^prime instead of ' ?
– David Carlisle
1 hour ago










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










Well, given that you introduce the two abbreviations, I suspect that you will agree with me that this equation is a bit bulky. I'd hence like to argue that the readers, and even after some months you yourself, will appreciate if you disentangle things a bit, which at the same time solves the issue.



documentclass[a4paper]article
usepackage[utf8]inputenc
usepackagephysics
usepackageamsmath

usepackageamssymb,latexsym,mathrsfs

begindocument
beginalign
frac14&sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
L ^ 2 - tilde E ) I_1
times I^prime_1
cdot C_n,m notag \
+ frac 14& sumlimits_substack n =1 \ m = 1
^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
frac pi left( n ^ prime - n right) s s _ f - cos frac
pi left( n ^ prime + n right) s s _ f )dds & notag \
&times int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
right) x L - cos frac pi left( m ^ prime + m right) z
L right] V (s,z) ddzcdot C_n,m =0;,
endalign
where
beginsubequations
beginalign
I_1&=intlimits_0^L qty( cos
frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
prime + m ) z L ) V(s,z) ddz;, \
I^prime_1&=intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
frac pi qty( n^prime + n ) s s _ f ) dds;.
endalign
endsubequations

enddocument


enter image description here






share|improve this answer




















  • You're a good designer, it looks better, thank you very much.
    – PCat27
    23 mins ago

















up vote
1
down vote













I propose to use the medsize environment from nccmath, and alsp a variant with the multlined environment, instead of aligned. Note you don't have to load latexsym: its symbols are found in amssymb, and it's simpler to type ' rather than ^prime. For the integral with limits, you simply can pass limits as an option to amsmath.



 documentclass[intlimits]article
usepackage[showframe]geometry
usepackagephysics
usepackagemathtools, nccmath
usepackageamssymb,mathrsfs

begindocument

beginequation
beginmedsize
beginaligned
frac14sum_substackn = 1 \ m = 1^N_m, N _m
qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
underbrace int_0^L qty( cos frac pi qty( m' - m )
x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
endaligned
endmedsize
endequation
bigskip

beginequation
beginmedsize
beginmultlined
frac14sum_substackn = 1 \ m = 1^N_m, N _m
qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
underbrace int_0^L qty( cos frac pi qty( m' - m )
x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
endmultlined
endmedsize
endequation

enddocument


enter image description here






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',
    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%2f458263%2fhow-to-write-a-long-equation-without-it-going-over-the-margin%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    Well, given that you introduce the two abbreviations, I suspect that you will agree with me that this equation is a bit bulky. I'd hence like to argue that the readers, and even after some months you yourself, will appreciate if you disentangle things a bit, which at the same time solves the issue.



    documentclass[a4paper]article
    usepackage[utf8]inputenc
    usepackagephysics
    usepackageamsmath

    usepackageamssymb,latexsym,mathrsfs

    begindocument
    beginalign
    frac14&sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
    qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
    L ^ 2 - tilde E ) I_1
    times I^prime_1
    cdot C_n,m notag \
    + frac 14& sumlimits_substack n =1 \ m = 1
    ^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
    frac pi left( n ^ prime - n right) s s _ f - cos frac
    pi left( n ^ prime + n right) s s _ f )dds & notag \
    &times int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
    right) x L - cos frac pi left( m ^ prime + m right) z
    L right] V (s,z) ddzcdot C_n,m =0;,
    endalign
    where
    beginsubequations
    beginalign
    I_1&=intlimits_0^L qty( cos
    frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
    prime + m ) z L ) V(s,z) ddz;, \
    I^prime_1&=intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
    frac pi qty( n^prime + n ) s s _ f ) dds;.
    endalign
    endsubequations

    enddocument


    enter image description here






    share|improve this answer




















    • You're a good designer, it looks better, thank you very much.
      – PCat27
      23 mins ago














    up vote
    2
    down vote



    accepted










    Well, given that you introduce the two abbreviations, I suspect that you will agree with me that this equation is a bit bulky. I'd hence like to argue that the readers, and even after some months you yourself, will appreciate if you disentangle things a bit, which at the same time solves the issue.



    documentclass[a4paper]article
    usepackage[utf8]inputenc
    usepackagephysics
    usepackageamsmath

    usepackageamssymb,latexsym,mathrsfs

    begindocument
    beginalign
    frac14&sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
    qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
    L ^ 2 - tilde E ) I_1
    times I^prime_1
    cdot C_n,m notag \
    + frac 14& sumlimits_substack n =1 \ m = 1
    ^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
    frac pi left( n ^ prime - n right) s s _ f - cos frac
    pi left( n ^ prime + n right) s s _ f )dds & notag \
    &times int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
    right) x L - cos frac pi left( m ^ prime + m right) z
    L right] V (s,z) ddzcdot C_n,m =0;,
    endalign
    where
    beginsubequations
    beginalign
    I_1&=intlimits_0^L qty( cos
    frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
    prime + m ) z L ) V(s,z) ddz;, \
    I^prime_1&=intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
    frac pi qty( n^prime + n ) s s _ f ) dds;.
    endalign
    endsubequations

    enddocument


    enter image description here






    share|improve this answer




















    • You're a good designer, it looks better, thank you very much.
      – PCat27
      23 mins ago












    up vote
    2
    down vote



    accepted







    up vote
    2
    down vote



    accepted






    Well, given that you introduce the two abbreviations, I suspect that you will agree with me that this equation is a bit bulky. I'd hence like to argue that the readers, and even after some months you yourself, will appreciate if you disentangle things a bit, which at the same time solves the issue.



    documentclass[a4paper]article
    usepackage[utf8]inputenc
    usepackagephysics
    usepackageamsmath

    usepackageamssymb,latexsym,mathrsfs

    begindocument
    beginalign
    frac14&sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
    qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
    L ^ 2 - tilde E ) I_1
    times I^prime_1
    cdot C_n,m notag \
    + frac 14& sumlimits_substack n =1 \ m = 1
    ^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
    frac pi left( n ^ prime - n right) s s _ f - cos frac
    pi left( n ^ prime + n right) s s _ f )dds & notag \
    &times int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
    right) x L - cos frac pi left( m ^ prime + m right) z
    L right] V (s,z) ddzcdot C_n,m =0;,
    endalign
    where
    beginsubequations
    beginalign
    I_1&=intlimits_0^L qty( cos
    frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
    prime + m ) z L ) V(s,z) ddz;, \
    I^prime_1&=intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
    frac pi qty( n^prime + n ) s s _ f ) dds;.
    endalign
    endsubequations

    enddocument


    enter image description here






    share|improve this answer












    Well, given that you introduce the two abbreviations, I suspect that you will agree with me that this equation is a bit bulky. I'd hence like to argue that the readers, and even after some months you yourself, will appreciate if you disentangle things a bit, which at the same time solves the issue.



    documentclass[a4paper]article
    usepackage[utf8]inputenc
    usepackagephysics
    usepackageamsmath

    usepackageamssymb,latexsym,mathrsfs

    begindocument
    beginalign
    frac14&sumlimits_substackn = 1 \ m = 1 ^ N_ m , N_ m
    qty( fracpi^2n^ 2 s _ f ^ 2 + fracpi ^ 2 m ^2
    L ^ 2 - tilde E ) I_1
    times I^prime_1
    cdot C_n,m notag \
    + frac 14& sumlimits_substack n =1 \ m = 1
    ^ N _ n , N _ m intlimits _ 0 ^ s _ f qty( cos
    frac pi left( n ^ prime - n right) s s _ f - cos frac
    pi left( n ^ prime + n right) s s _ f )dds & notag \
    &times int _ 0 ^ L left[ cos frac pi left( m ^ prime - m
    right) x L - cos frac pi left( m ^ prime + m right) z
    L right] V (s,z) ddzcdot C_n,m =0;,
    endalign
    where
    beginsubequations
    beginalign
    I_1&=intlimits_0^L qty( cos
    frac pi qty( m ^ prime - m ) x L - cos fracpiqty( m ^
    prime + m ) z L ) V(s,z) ddz;, \
    I^prime_1&=intlimits_0^s_f qty(cos fpi(n^prime -n)ss_f - cos
    frac pi qty( n^prime + n ) s s _ f ) dds;.
    endalign
    endsubequations

    enddocument


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 37 mins ago









    marmot

    71.3k476152




    71.3k476152











    • You're a good designer, it looks better, thank you very much.
      – PCat27
      23 mins ago
















    • You're a good designer, it looks better, thank you very much.
      – PCat27
      23 mins ago















    You're a good designer, it looks better, thank you very much.
    – PCat27
    23 mins ago




    You're a good designer, it looks better, thank you very much.
    – PCat27
    23 mins ago










    up vote
    1
    down vote













    I propose to use the medsize environment from nccmath, and alsp a variant with the multlined environment, instead of aligned. Note you don't have to load latexsym: its symbols are found in amssymb, and it's simpler to type ' rather than ^prime. For the integral with limits, you simply can pass limits as an option to amsmath.



     documentclass[intlimits]article
    usepackage[showframe]geometry
    usepackagephysics
    usepackagemathtools, nccmath
    usepackageamssymb,mathrsfs

    begindocument

    beginequation
    beginmedsize
    beginaligned
    frac14sum_substackn = 1 \ m = 1^N_m, N _m
    qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
    underbrace int_0^L qty( cos frac pi qty( m' - m )
    x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
    underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
    int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
    endaligned
    endmedsize
    endequation
    bigskip

    beginequation
    beginmedsize
    beginmultlined
    frac14sum_substackn = 1 \ m = 1^N_m, N _m
    qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
    underbrace int_0^L qty( cos frac pi qty( m' - m )
    x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
    underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
    int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
    endmultlined
    endmedsize
    endequation

    enddocument


    enter image description here






    share|improve this answer
























      up vote
      1
      down vote













      I propose to use the medsize environment from nccmath, and alsp a variant with the multlined environment, instead of aligned. Note you don't have to load latexsym: its symbols are found in amssymb, and it's simpler to type ' rather than ^prime. For the integral with limits, you simply can pass limits as an option to amsmath.



       documentclass[intlimits]article
      usepackage[showframe]geometry
      usepackagephysics
      usepackagemathtools, nccmath
      usepackageamssymb,mathrsfs

      begindocument

      beginequation
      beginmedsize
      beginaligned
      frac14sum_substackn = 1 \ m = 1^N_m, N _m
      qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
      underbrace int_0^L qty( cos frac pi qty( m' - m )
      x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
      underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
      int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
      endaligned
      endmedsize
      endequation
      bigskip

      beginequation
      beginmedsize
      beginmultlined
      frac14sum_substackn = 1 \ m = 1^N_m, N _m
      qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
      underbrace int_0^L qty( cos frac pi qty( m' - m )
      x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
      underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
      int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
      endmultlined
      endmedsize
      endequation

      enddocument


      enter image description here






      share|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        I propose to use the medsize environment from nccmath, and alsp a variant with the multlined environment, instead of aligned. Note you don't have to load latexsym: its symbols are found in amssymb, and it's simpler to type ' rather than ^prime. For the integral with limits, you simply can pass limits as an option to amsmath.



         documentclass[intlimits]article
        usepackage[showframe]geometry
        usepackagephysics
        usepackagemathtools, nccmath
        usepackageamssymb,mathrsfs

        begindocument

        beginequation
        beginmedsize
        beginaligned
        frac14sum_substackn = 1 \ m = 1^N_m, N _m
        qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
        underbrace int_0^L qty( cos frac pi qty( m' - m )
        x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
        underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
        int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
        endaligned
        endmedsize
        endequation
        bigskip

        beginequation
        beginmedsize
        beginmultlined
        frac14sum_substackn = 1 \ m = 1^N_m, N _m
        qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
        underbrace int_0^L qty( cos frac pi qty( m' - m )
        x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
        underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
        int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
        endmultlined
        endmedsize
        endequation

        enddocument


        enter image description here






        share|improve this answer












        I propose to use the medsize environment from nccmath, and alsp a variant with the multlined environment, instead of aligned. Note you don't have to load latexsym: its symbols are found in amssymb, and it's simpler to type ' rather than ^prime. For the integral with limits, you simply can pass limits as an option to amsmath.



         documentclass[intlimits]article
        usepackage[showframe]geometry
        usepackagephysics
        usepackagemathtools, nccmath
        usepackageamssymb,mathrsfs

        begindocument

        beginequation
        beginmedsize
        beginaligned
        frac14sum_substackn = 1 \ m = 1^N_m, N _m
        qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
        underbrace int_0^L qty( cos frac pi qty( m' - m )
        x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
        underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
        int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
        endaligned
        endmedsize
        endequation
        bigskip

        beginequation
        beginmedsize
        beginmultlined
        frac14sum_substackn = 1 \ m = 1^N_m, N _m
        qty(fracpi^2 n^2 s_f^2 + fracpi^2 m^2 L^2 - tilde E )
        underbrace int_0^L qty( cos frac pi qty( m' - m )
        x L - cos fracpiqty( m' + m ) z L ) V(s,z) ddz _I_1 , times \
        underbrace int_0^s_mkern-2mumathrlap f qty(cos fracpi(n' -n)ss_f - cos fracpi qty( n' + n ) s s_ f ) dds_I'_1 cdot C_n,m + frac 1 4 sumlimits_substack n =1 \ m = 1 ^ N _ n , N _ m int _ 0^ s_mkern-2mumathrlap f qty( cos frac pi left( n' - n right) s s_f - cos fracpi left( n' + n right)s s _f)dds times \
        int_0^L left[cos fracpi left(m' - m right) x L - cos fracpi left( m' + m right)z L right] V (s,z) ddzcdot C_n,m=0
        endmultlined
        endmedsize
        endequation

        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 18 mins ago









        Bernard

        160k766192




        160k766192



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458263%2fhow-to-write-a-long-equation-without-it-going-over-the-margin%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery