What is the best way to write this equation to have a better look?












2















What is the best way to write the following equation:



begin{flalign} 
begin{aligned}
&qquadqquadfrac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=\
&sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}


Following is an image to how it looks like in the way I wrote the code above



enter image description here



I tried also to use multiline but did not get a nice look either.



I change the code using footnotesize, the new code is



{footnotesize
begin{flalign} label{18}
begin{aligned}
frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}&=sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&qquad-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&qquad-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}
}


It looks now as:
enter image description here










share|improve this question




















  • 2





    Please do not post code snippets - create minimal working examples (MWEs) instead.

    – epR8GaYuh
    Dec 18 '18 at 13:29











  • I post it as it is because the equation is splitted in many line. I can't compile the above code here to show how it is very messy

    – N. I. ElZayat
    Dec 18 '18 at 13:33






  • 1





    Please state, in words, what you would like to achieve. Please also state what the main font size is and how wide the text block is.

    – Mico
    Dec 18 '18 at 13:37








  • 1





    Do you use the default layout (with a very large outer margin) or do you customise your layout (say with geometry)?

    – Bernard
    Dec 18 '18 at 13:54








  • 2





    The combination of footnotesize and tfrac makes reading the material quite a chore -- unless a free magnifying glass is handed out...

    – Mico
    Dec 18 '18 at 15:06
















2















What is the best way to write the following equation:



begin{flalign} 
begin{aligned}
&qquadqquadfrac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=\
&sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}


Following is an image to how it looks like in the way I wrote the code above



enter image description here



I tried also to use multiline but did not get a nice look either.



I change the code using footnotesize, the new code is



{footnotesize
begin{flalign} label{18}
begin{aligned}
frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}&=sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&qquad-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&qquad-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}
}


It looks now as:
enter image description here










share|improve this question




















  • 2





    Please do not post code snippets - create minimal working examples (MWEs) instead.

    – epR8GaYuh
    Dec 18 '18 at 13:29











  • I post it as it is because the equation is splitted in many line. I can't compile the above code here to show how it is very messy

    – N. I. ElZayat
    Dec 18 '18 at 13:33






  • 1





    Please state, in words, what you would like to achieve. Please also state what the main font size is and how wide the text block is.

    – Mico
    Dec 18 '18 at 13:37








  • 1





    Do you use the default layout (with a very large outer margin) or do you customise your layout (say with geometry)?

    – Bernard
    Dec 18 '18 at 13:54








  • 2





    The combination of footnotesize and tfrac makes reading the material quite a chore -- unless a free magnifying glass is handed out...

    – Mico
    Dec 18 '18 at 15:06














2












2








2








What is the best way to write the following equation:



begin{flalign} 
begin{aligned}
&qquadqquadfrac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=\
&sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}


Following is an image to how it looks like in the way I wrote the code above



enter image description here



I tried also to use multiline but did not get a nice look either.



I change the code using footnotesize, the new code is



{footnotesize
begin{flalign} label{18}
begin{aligned}
frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}&=sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&qquad-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&qquad-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}
}


It looks now as:
enter image description here










share|improve this question
















What is the best way to write the following equation:



begin{flalign} 
begin{aligned}
&qquadqquadfrac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=\
&sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}


Following is an image to how it looks like in the way I wrote the code above



enter image description here



I tried also to use multiline but did not get a nice look either.



I change the code using footnotesize, the new code is



{footnotesize
begin{flalign} label{18}
begin{aligned}
frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}&=sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]\
&qquad-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&qquad-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}
&&
end{flalign}
}


It looks now as:
enter image description here







equations






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 18 '18 at 14:05







N. I. ElZayat

















asked Dec 18 '18 at 13:25









N. I. ElZayatN. I. ElZayat

515




515








  • 2





    Please do not post code snippets - create minimal working examples (MWEs) instead.

    – epR8GaYuh
    Dec 18 '18 at 13:29











  • I post it as it is because the equation is splitted in many line. I can't compile the above code here to show how it is very messy

    – N. I. ElZayat
    Dec 18 '18 at 13:33






  • 1





    Please state, in words, what you would like to achieve. Please also state what the main font size is and how wide the text block is.

    – Mico
    Dec 18 '18 at 13:37








  • 1





    Do you use the default layout (with a very large outer margin) or do you customise your layout (say with geometry)?

    – Bernard
    Dec 18 '18 at 13:54








  • 2





    The combination of footnotesize and tfrac makes reading the material quite a chore -- unless a free magnifying glass is handed out...

    – Mico
    Dec 18 '18 at 15:06














  • 2





    Please do not post code snippets - create minimal working examples (MWEs) instead.

    – epR8GaYuh
    Dec 18 '18 at 13:29











  • I post it as it is because the equation is splitted in many line. I can't compile the above code here to show how it is very messy

    – N. I. ElZayat
    Dec 18 '18 at 13:33






  • 1





    Please state, in words, what you would like to achieve. Please also state what the main font size is and how wide the text block is.

    – Mico
    Dec 18 '18 at 13:37








  • 1





    Do you use the default layout (with a very large outer margin) or do you customise your layout (say with geometry)?

    – Bernard
    Dec 18 '18 at 13:54








  • 2





    The combination of footnotesize and tfrac makes reading the material quite a chore -- unless a free magnifying glass is handed out...

    – Mico
    Dec 18 '18 at 15:06








2




2





Please do not post code snippets - create minimal working examples (MWEs) instead.

– epR8GaYuh
Dec 18 '18 at 13:29





Please do not post code snippets - create minimal working examples (MWEs) instead.

– epR8GaYuh
Dec 18 '18 at 13:29













I post it as it is because the equation is splitted in many line. I can't compile the above code here to show how it is very messy

– N. I. ElZayat
Dec 18 '18 at 13:33





I post it as it is because the equation is splitted in many line. I can't compile the above code here to show how it is very messy

– N. I. ElZayat
Dec 18 '18 at 13:33




1




1





Please state, in words, what you would like to achieve. Please also state what the main font size is and how wide the text block is.

– Mico
Dec 18 '18 at 13:37







Please state, in words, what you would like to achieve. Please also state what the main font size is and how wide the text block is.

– Mico
Dec 18 '18 at 13:37






1




1





Do you use the default layout (with a very large outer margin) or do you customise your layout (say with geometry)?

– Bernard
Dec 18 '18 at 13:54







Do you use the default layout (with a very large outer margin) or do you customise your layout (say with geometry)?

– Bernard
Dec 18 '18 at 13:54






2




2





The combination of footnotesize and tfrac makes reading the material quite a chore -- unless a free magnifying glass is handed out...

– Mico
Dec 18 '18 at 15:06





The combination of footnotesize and tfrac makes reading the material quite a chore -- unless a free magnifying glass is handed out...

– Mico
Dec 18 '18 at 15:06










4 Answers
4






active

oldest

votes


















8














Do six lines. I changed the position of some of the brackets from before to after the summation sign and reduced the size.



Note that it should be bigl for a left delimiter and bigr for a right one (with the obvious variations for Big, bigg and Bigg).



documentclass{article}
usepackage{amsmath,bm}

begin{document}

begin{flalign}
begin{aligned}
frac{partial^2 ell}{partial bm{phi},partialbm{phi}'}={}&
begin{aligned}[t]
sum_{i=1}^{N-N^*}
biggl(,sum_{j=2}^{d_i-1}Bigl[
& -frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
\
& +frac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}
{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
tilde{mathbf{Y}}_{d_i} tilde{mathbf{Y}}'_{d_i}Bigr]
\
-sum_{j=2}^{d_i-1}Bigl[
& frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_j
\
& +frac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
tilde{mathbf{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) tilde{mathbf{Y}}'_{d_i} Bigr]biggr)
end{aligned}
\
&begin{aligned}[t]
-sum_{i=1}^{N^*} sum_{j=2}^{n_i}Bigl[
& frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
\
& + frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_jBigr]
end{aligned}
end{aligned}
&&
end{flalign}

end{document}


enter image description here



I changed all mathbf{tilde{Y}} to tilde{mathbf{Y}} that's conceptually sounder. You may also want to use widetilde, but I don't recommend so.






share|improve this answer





















  • 2





    I'd be tempted to replace all instances of mathbf{tilde{Y}} with widetilde{mathbf{Y}}.

    – Mico
    Dec 18 '18 at 14:14






  • 3





    @Mico It should be tilde{mathbf{Y}}, much likely.

    – egreg
    Dec 18 '18 at 14:16











  • Nice touch to supply the missing inner brackets, by the way.

    – Mico
    Dec 18 '18 at 14:18











  • @egreg it is really looks very nice

    – N. I. ElZayat
    Dec 18 '18 at 14:32



















3














Reduce the text size or make it spread into several lines.



begin{flalign}
{footnotesize
begin{aligned}
frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
&sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}\&
mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]
-bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
&-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
end{aligned}}
end{flalign}





share|improve this answer



















  • 1





    I just notice your answer, this is exactly what comes to my mind before I saw you answer

    – N. I. ElZayat
    Dec 18 '18 at 14:06






  • 1





    And you remembered to check the log before you posted this? Hint: footnotesize is not allowed in math mode.

    – daleif
    Dec 18 '18 at 14:08






  • 3





    No error is not the same as not being correct. You get LaTeX Font Warning: Command footnotesize invalid in math mode if you look in the log. Never use text font resizing commands in math mode.

    – daleif
    Dec 18 '18 at 14:16








  • 2





    It is still a bad practise that should be avoided in a good document design.

    – daleif
    Dec 18 '18 at 14:47






  • 2





    Shrinking the font to make something fit is a bad idea regardless.

    – JPi
    Dec 18 '18 at 17:04



















3














enter image description here



I've made the code a bit more legible and changed Bigg( to Biggl( etc. Also, I'm using the multline environment from amsmath which is suitable here.



documentclass{article}

usepackage{amsmath}
usepackage{bm}
usepackage[margin=1in]{geometry}

newcommand{bP}{bm{P}}
newcommand{tY}{mathbf{tilde Y}}
begin{document}
begin{multline}
frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
sum_{i=1}^{N-N^*} Biggl(biggl[sum_{j=2}^{d_i-1} -;frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{id_i}'(1-bP_{id_i})'(1-bP_{id_i})}{(1-bP_{id_i})'(1-bP_{id_i})+bP_{id_i}'bP_{id_i}}
tY_{d_i} tY'_{d_i}biggr]\
-biggl[sum_{j=2}^{d_i-1} frac{bP_{ij}}{(1-bP_{ij})'}
tY_j bP_{ij}(1-bP_{ij}) tY'_j+frac{(1-bP_{id_i})}{bP'_{id_i}}
tY_{d_i} bP_{id_i}(1-bP_{id_i}) tY'_{d_i} biggr]Biggr)\
-sum_{i=1}^{N^*} sum_{j=2}^{n_i}biggl[frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{ij}}{(1-bP_{ij})'}
tY_j bP_{ij}(1-bP_{ij}) tY'_jbiggr]
end{multline}

end{document}





share|improve this answer































    2














    I propose this, with package geometry. If you have the default layout with large margins, you can nest the equation contents in a medsize environment from nccmath (~ 80% of previous size):



    documentclass{article}
    usepackage{geometry}
    usepackage{showframe}
    renewcommand{ShowFrameLinethickness}{0.3pt}
    usepackage{amsmath, bm, nccmath}
    usepackage{diffcoeff}

    begin{document}

    begin{equation}
    begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
    sum_{i=1}^{N-N^*} Bigg( & bigg[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
    bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
    mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & bigg]\
    %&
    - bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
    mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
    mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &bigg]Bigg)
    end{aligned}\
    % &
    -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
    mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
    end{aligned}
    end{equation}
    bigskip

    begin{equation}
    begin{medsize}
    begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
    sum_{i=1}^{N-N^*} Biggl( & Biggl[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
    bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
    mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & Biggr]\
    %&
    - Biggl[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
    mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
    mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &Biggr]Biggr)
    end{aligned}\
    % &
    -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & biggl[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
    mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbiggr]
    end{aligned}
    end{medsize}
    end{equation}

    end{document}





    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%2f466363%2fwhat-is-the-best-way-to-write-this-equation-to-have-a-better-look%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









      8














      Do six lines. I changed the position of some of the brackets from before to after the summation sign and reduced the size.



      Note that it should be bigl for a left delimiter and bigr for a right one (with the obvious variations for Big, bigg and Bigg).



      documentclass{article}
      usepackage{amsmath,bm}

      begin{document}

      begin{flalign}
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi},partialbm{phi}'}={}&
      begin{aligned}[t]
      sum_{i=1}^{N-N^*}
      biggl(,sum_{j=2}^{d_i-1}Bigl[
      & -frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & +frac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}
      {(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
      tilde{mathbf{Y}}_{d_i} tilde{mathbf{Y}}'_{d_i}Bigr]
      \
      -sum_{j=2}^{d_i-1}Bigl[
      & frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_j
      \
      & +frac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      tilde{mathbf{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) tilde{mathbf{Y}}'_{d_i} Bigr]biggr)
      end{aligned}
      \
      &begin{aligned}[t]
      -sum_{i=1}^{N^*} sum_{j=2}^{n_i}Bigl[
      & frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & + frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_jBigr]
      end{aligned}
      end{aligned}
      &&
      end{flalign}

      end{document}


      enter image description here



      I changed all mathbf{tilde{Y}} to tilde{mathbf{Y}} that's conceptually sounder. You may also want to use widetilde, but I don't recommend so.






      share|improve this answer





















      • 2





        I'd be tempted to replace all instances of mathbf{tilde{Y}} with widetilde{mathbf{Y}}.

        – Mico
        Dec 18 '18 at 14:14






      • 3





        @Mico It should be tilde{mathbf{Y}}, much likely.

        – egreg
        Dec 18 '18 at 14:16











      • Nice touch to supply the missing inner brackets, by the way.

        – Mico
        Dec 18 '18 at 14:18











      • @egreg it is really looks very nice

        – N. I. ElZayat
        Dec 18 '18 at 14:32
















      8














      Do six lines. I changed the position of some of the brackets from before to after the summation sign and reduced the size.



      Note that it should be bigl for a left delimiter and bigr for a right one (with the obvious variations for Big, bigg and Bigg).



      documentclass{article}
      usepackage{amsmath,bm}

      begin{document}

      begin{flalign}
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi},partialbm{phi}'}={}&
      begin{aligned}[t]
      sum_{i=1}^{N-N^*}
      biggl(,sum_{j=2}^{d_i-1}Bigl[
      & -frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & +frac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}
      {(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
      tilde{mathbf{Y}}_{d_i} tilde{mathbf{Y}}'_{d_i}Bigr]
      \
      -sum_{j=2}^{d_i-1}Bigl[
      & frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_j
      \
      & +frac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      tilde{mathbf{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) tilde{mathbf{Y}}'_{d_i} Bigr]biggr)
      end{aligned}
      \
      &begin{aligned}[t]
      -sum_{i=1}^{N^*} sum_{j=2}^{n_i}Bigl[
      & frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & + frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_jBigr]
      end{aligned}
      end{aligned}
      &&
      end{flalign}

      end{document}


      enter image description here



      I changed all mathbf{tilde{Y}} to tilde{mathbf{Y}} that's conceptually sounder. You may also want to use widetilde, but I don't recommend so.






      share|improve this answer





















      • 2





        I'd be tempted to replace all instances of mathbf{tilde{Y}} with widetilde{mathbf{Y}}.

        – Mico
        Dec 18 '18 at 14:14






      • 3





        @Mico It should be tilde{mathbf{Y}}, much likely.

        – egreg
        Dec 18 '18 at 14:16











      • Nice touch to supply the missing inner brackets, by the way.

        – Mico
        Dec 18 '18 at 14:18











      • @egreg it is really looks very nice

        – N. I. ElZayat
        Dec 18 '18 at 14:32














      8












      8








      8







      Do six lines. I changed the position of some of the brackets from before to after the summation sign and reduced the size.



      Note that it should be bigl for a left delimiter and bigr for a right one (with the obvious variations for Big, bigg and Bigg).



      documentclass{article}
      usepackage{amsmath,bm}

      begin{document}

      begin{flalign}
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi},partialbm{phi}'}={}&
      begin{aligned}[t]
      sum_{i=1}^{N-N^*}
      biggl(,sum_{j=2}^{d_i-1}Bigl[
      & -frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & +frac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}
      {(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
      tilde{mathbf{Y}}_{d_i} tilde{mathbf{Y}}'_{d_i}Bigr]
      \
      -sum_{j=2}^{d_i-1}Bigl[
      & frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_j
      \
      & +frac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      tilde{mathbf{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) tilde{mathbf{Y}}'_{d_i} Bigr]biggr)
      end{aligned}
      \
      &begin{aligned}[t]
      -sum_{i=1}^{N^*} sum_{j=2}^{n_i}Bigl[
      & frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & + frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_jBigr]
      end{aligned}
      end{aligned}
      &&
      end{flalign}

      end{document}


      enter image description here



      I changed all mathbf{tilde{Y}} to tilde{mathbf{Y}} that's conceptually sounder. You may also want to use widetilde, but I don't recommend so.






      share|improve this answer















      Do six lines. I changed the position of some of the brackets from before to after the summation sign and reduced the size.



      Note that it should be bigl for a left delimiter and bigr for a right one (with the obvious variations for Big, bigg and Bigg).



      documentclass{article}
      usepackage{amsmath,bm}

      begin{document}

      begin{flalign}
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi},partialbm{phi}'}={}&
      begin{aligned}[t]
      sum_{i=1}^{N-N^*}
      biggl(,sum_{j=2}^{d_i-1}Bigl[
      & -frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & +frac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}
      {(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
      tilde{mathbf{Y}}_{d_i} tilde{mathbf{Y}}'_{d_i}Bigr]
      \
      -sum_{j=2}^{d_i-1}Bigl[
      & frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_j
      \
      & +frac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      tilde{mathbf{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) tilde{mathbf{Y}}'_{d_i} Bigr]biggr)
      end{aligned}
      \
      &begin{aligned}[t]
      -sum_{i=1}^{N^*} sum_{j=2}^{n_i}Bigl[
      & frac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}
      {(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}
      tilde{mathbf{Y}}_j tilde{mathbf{Y}}'_j
      \
      & + frac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      tilde{mathbf{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) tilde{mathbf{Y}}'_jBigr]
      end{aligned}
      end{aligned}
      &&
      end{flalign}

      end{document}


      enter image description here



      I changed all mathbf{tilde{Y}} to tilde{mathbf{Y}} that's conceptually sounder. You may also want to use widetilde, but I don't recommend so.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Dec 18 '18 at 14:18

























      answered Dec 18 '18 at 14:08









      egregegreg

      721k8719113210




      721k8719113210








      • 2





        I'd be tempted to replace all instances of mathbf{tilde{Y}} with widetilde{mathbf{Y}}.

        – Mico
        Dec 18 '18 at 14:14






      • 3





        @Mico It should be tilde{mathbf{Y}}, much likely.

        – egreg
        Dec 18 '18 at 14:16











      • Nice touch to supply the missing inner brackets, by the way.

        – Mico
        Dec 18 '18 at 14:18











      • @egreg it is really looks very nice

        – N. I. ElZayat
        Dec 18 '18 at 14:32














      • 2





        I'd be tempted to replace all instances of mathbf{tilde{Y}} with widetilde{mathbf{Y}}.

        – Mico
        Dec 18 '18 at 14:14






      • 3





        @Mico It should be tilde{mathbf{Y}}, much likely.

        – egreg
        Dec 18 '18 at 14:16











      • Nice touch to supply the missing inner brackets, by the way.

        – Mico
        Dec 18 '18 at 14:18











      • @egreg it is really looks very nice

        – N. I. ElZayat
        Dec 18 '18 at 14:32








      2




      2





      I'd be tempted to replace all instances of mathbf{tilde{Y}} with widetilde{mathbf{Y}}.

      – Mico
      Dec 18 '18 at 14:14





      I'd be tempted to replace all instances of mathbf{tilde{Y}} with widetilde{mathbf{Y}}.

      – Mico
      Dec 18 '18 at 14:14




      3




      3





      @Mico It should be tilde{mathbf{Y}}, much likely.

      – egreg
      Dec 18 '18 at 14:16





      @Mico It should be tilde{mathbf{Y}}, much likely.

      – egreg
      Dec 18 '18 at 14:16













      Nice touch to supply the missing inner brackets, by the way.

      – Mico
      Dec 18 '18 at 14:18





      Nice touch to supply the missing inner brackets, by the way.

      – Mico
      Dec 18 '18 at 14:18













      @egreg it is really looks very nice

      – N. I. ElZayat
      Dec 18 '18 at 14:32





      @egreg it is really looks very nice

      – N. I. ElZayat
      Dec 18 '18 at 14:32











      3














      Reduce the text size or make it spread into several lines.



      begin{flalign}
      {footnotesize
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
      &sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}\&
      mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]
      -bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
      &-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
      end{aligned}}
      end{flalign}





      share|improve this answer



















      • 1





        I just notice your answer, this is exactly what comes to my mind before I saw you answer

        – N. I. ElZayat
        Dec 18 '18 at 14:06






      • 1





        And you remembered to check the log before you posted this? Hint: footnotesize is not allowed in math mode.

        – daleif
        Dec 18 '18 at 14:08






      • 3





        No error is not the same as not being correct. You get LaTeX Font Warning: Command footnotesize invalid in math mode if you look in the log. Never use text font resizing commands in math mode.

        – daleif
        Dec 18 '18 at 14:16








      • 2





        It is still a bad practise that should be avoided in a good document design.

        – daleif
        Dec 18 '18 at 14:47






      • 2





        Shrinking the font to make something fit is a bad idea regardless.

        – JPi
        Dec 18 '18 at 17:04
















      3














      Reduce the text size or make it spread into several lines.



      begin{flalign}
      {footnotesize
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
      &sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}\&
      mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]
      -bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
      &-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
      end{aligned}}
      end{flalign}





      share|improve this answer



















      • 1





        I just notice your answer, this is exactly what comes to my mind before I saw you answer

        – N. I. ElZayat
        Dec 18 '18 at 14:06






      • 1





        And you remembered to check the log before you posted this? Hint: footnotesize is not allowed in math mode.

        – daleif
        Dec 18 '18 at 14:08






      • 3





        No error is not the same as not being correct. You get LaTeX Font Warning: Command footnotesize invalid in math mode if you look in the log. Never use text font resizing commands in math mode.

        – daleif
        Dec 18 '18 at 14:16








      • 2





        It is still a bad practise that should be avoided in a good document design.

        – daleif
        Dec 18 '18 at 14:47






      • 2





        Shrinking the font to make something fit is a bad idea regardless.

        – JPi
        Dec 18 '18 at 17:04














      3












      3








      3







      Reduce the text size or make it spread into several lines.



      begin{flalign}
      {footnotesize
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
      &sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}\&
      mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]
      -bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
      &-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
      end{aligned}}
      end{flalign}





      share|improve this answer













      Reduce the text size or make it spread into several lines.



      begin{flalign}
      {footnotesize
      begin{aligned}
      frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
      &sum_{i=1}^{N-N^*} Bigg(bigg[sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}\&
      mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i}bigg]
      -bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
      mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} bigg]Bigg)\
      &-sum_{i=1}^{N^*} sum_{j=2}^{n_i}bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
      mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
      end{aligned}}
      end{flalign}






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 18 '18 at 14:04









      Litun JohnLitun John

      1,24841320




      1,24841320








      • 1





        I just notice your answer, this is exactly what comes to my mind before I saw you answer

        – N. I. ElZayat
        Dec 18 '18 at 14:06






      • 1





        And you remembered to check the log before you posted this? Hint: footnotesize is not allowed in math mode.

        – daleif
        Dec 18 '18 at 14:08






      • 3





        No error is not the same as not being correct. You get LaTeX Font Warning: Command footnotesize invalid in math mode if you look in the log. Never use text font resizing commands in math mode.

        – daleif
        Dec 18 '18 at 14:16








      • 2





        It is still a bad practise that should be avoided in a good document design.

        – daleif
        Dec 18 '18 at 14:47






      • 2





        Shrinking the font to make something fit is a bad idea regardless.

        – JPi
        Dec 18 '18 at 17:04














      • 1





        I just notice your answer, this is exactly what comes to my mind before I saw you answer

        – N. I. ElZayat
        Dec 18 '18 at 14:06






      • 1





        And you remembered to check the log before you posted this? Hint: footnotesize is not allowed in math mode.

        – daleif
        Dec 18 '18 at 14:08






      • 3





        No error is not the same as not being correct. You get LaTeX Font Warning: Command footnotesize invalid in math mode if you look in the log. Never use text font resizing commands in math mode.

        – daleif
        Dec 18 '18 at 14:16








      • 2





        It is still a bad practise that should be avoided in a good document design.

        – daleif
        Dec 18 '18 at 14:47






      • 2





        Shrinking the font to make something fit is a bad idea regardless.

        – JPi
        Dec 18 '18 at 17:04








      1




      1





      I just notice your answer, this is exactly what comes to my mind before I saw you answer

      – N. I. ElZayat
      Dec 18 '18 at 14:06





      I just notice your answer, this is exactly what comes to my mind before I saw you answer

      – N. I. ElZayat
      Dec 18 '18 at 14:06




      1




      1





      And you remembered to check the log before you posted this? Hint: footnotesize is not allowed in math mode.

      – daleif
      Dec 18 '18 at 14:08





      And you remembered to check the log before you posted this? Hint: footnotesize is not allowed in math mode.

      – daleif
      Dec 18 '18 at 14:08




      3




      3





      No error is not the same as not being correct. You get LaTeX Font Warning: Command footnotesize invalid in math mode if you look in the log. Never use text font resizing commands in math mode.

      – daleif
      Dec 18 '18 at 14:16







      No error is not the same as not being correct. You get LaTeX Font Warning: Command footnotesize invalid in math mode if you look in the log. Never use text font resizing commands in math mode.

      – daleif
      Dec 18 '18 at 14:16






      2




      2





      It is still a bad practise that should be avoided in a good document design.

      – daleif
      Dec 18 '18 at 14:47





      It is still a bad practise that should be avoided in a good document design.

      – daleif
      Dec 18 '18 at 14:47




      2




      2





      Shrinking the font to make something fit is a bad idea regardless.

      – JPi
      Dec 18 '18 at 17:04





      Shrinking the font to make something fit is a bad idea regardless.

      – JPi
      Dec 18 '18 at 17:04











      3














      enter image description here



      I've made the code a bit more legible and changed Bigg( to Biggl( etc. Also, I'm using the multline environment from amsmath which is suitable here.



      documentclass{article}

      usepackage{amsmath}
      usepackage{bm}
      usepackage[margin=1in]{geometry}

      newcommand{bP}{bm{P}}
      newcommand{tY}{mathbf{tilde Y}}
      begin{document}
      begin{multline}
      frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
      sum_{i=1}^{N-N^*} Biggl(biggl[sum_{j=2}^{d_i-1} -;frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{id_i}'(1-bP_{id_i})'(1-bP_{id_i})}{(1-bP_{id_i})'(1-bP_{id_i})+bP_{id_i}'bP_{id_i}}
      tY_{d_i} tY'_{d_i}biggr]\
      -biggl[sum_{j=2}^{d_i-1} frac{bP_{ij}}{(1-bP_{ij})'}
      tY_j bP_{ij}(1-bP_{ij}) tY'_j+frac{(1-bP_{id_i})}{bP'_{id_i}}
      tY_{d_i} bP_{id_i}(1-bP_{id_i}) tY'_{d_i} biggr]Biggr)\
      -sum_{i=1}^{N^*} sum_{j=2}^{n_i}biggl[frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{ij}}{(1-bP_{ij})'}
      tY_j bP_{ij}(1-bP_{ij}) tY'_jbiggr]
      end{multline}

      end{document}





      share|improve this answer




























        3














        enter image description here



        I've made the code a bit more legible and changed Bigg( to Biggl( etc. Also, I'm using the multline environment from amsmath which is suitable here.



        documentclass{article}

        usepackage{amsmath}
        usepackage{bm}
        usepackage[margin=1in]{geometry}

        newcommand{bP}{bm{P}}
        newcommand{tY}{mathbf{tilde Y}}
        begin{document}
        begin{multline}
        frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
        sum_{i=1}^{N-N^*} Biggl(biggl[sum_{j=2}^{d_i-1} -;frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{id_i}'(1-bP_{id_i})'(1-bP_{id_i})}{(1-bP_{id_i})'(1-bP_{id_i})+bP_{id_i}'bP_{id_i}}
        tY_{d_i} tY'_{d_i}biggr]\
        -biggl[sum_{j=2}^{d_i-1} frac{bP_{ij}}{(1-bP_{ij})'}
        tY_j bP_{ij}(1-bP_{ij}) tY'_j+frac{(1-bP_{id_i})}{bP'_{id_i}}
        tY_{d_i} bP_{id_i}(1-bP_{id_i}) tY'_{d_i} biggr]Biggr)\
        -sum_{i=1}^{N^*} sum_{j=2}^{n_i}biggl[frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{ij}}{(1-bP_{ij})'}
        tY_j bP_{ij}(1-bP_{ij}) tY'_jbiggr]
        end{multline}

        end{document}





        share|improve this answer


























          3












          3








          3







          enter image description here



          I've made the code a bit more legible and changed Bigg( to Biggl( etc. Also, I'm using the multline environment from amsmath which is suitable here.



          documentclass{article}

          usepackage{amsmath}
          usepackage{bm}
          usepackage[margin=1in]{geometry}

          newcommand{bP}{bm{P}}
          newcommand{tY}{mathbf{tilde Y}}
          begin{document}
          begin{multline}
          frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
          sum_{i=1}^{N-N^*} Biggl(biggl[sum_{j=2}^{d_i-1} -;frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{id_i}'(1-bP_{id_i})'(1-bP_{id_i})}{(1-bP_{id_i})'(1-bP_{id_i})+bP_{id_i}'bP_{id_i}}
          tY_{d_i} tY'_{d_i}biggr]\
          -biggl[sum_{j=2}^{d_i-1} frac{bP_{ij}}{(1-bP_{ij})'}
          tY_j bP_{ij}(1-bP_{ij}) tY'_j+frac{(1-bP_{id_i})}{bP'_{id_i}}
          tY_{d_i} bP_{id_i}(1-bP_{id_i}) tY'_{d_i} biggr]Biggr)\
          -sum_{i=1}^{N^*} sum_{j=2}^{n_i}biggl[frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{ij}}{(1-bP_{ij})'}
          tY_j bP_{ij}(1-bP_{ij}) tY'_jbiggr]
          end{multline}

          end{document}





          share|improve this answer













          enter image description here



          I've made the code a bit more legible and changed Bigg( to Biggl( etc. Also, I'm using the multline environment from amsmath which is suitable here.



          documentclass{article}

          usepackage{amsmath}
          usepackage{bm}
          usepackage[margin=1in]{geometry}

          newcommand{bP}{bm{P}}
          newcommand{tY}{mathbf{tilde Y}}
          begin{document}
          begin{multline}
          frac{partial^2 ell}{partial bm{phi}partialbm{phi}'}=
          sum_{i=1}^{N-N^*} Biggl(biggl[sum_{j=2}^{d_i-1} -;frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{id_i}'(1-bP_{id_i})'(1-bP_{id_i})}{(1-bP_{id_i})'(1-bP_{id_i})+bP_{id_i}'bP_{id_i}}
          tY_{d_i} tY'_{d_i}biggr]\
          -biggl[sum_{j=2}^{d_i-1} frac{bP_{ij}}{(1-bP_{ij})'}
          tY_j bP_{ij}(1-bP_{ij}) tY'_j+frac{(1-bP_{id_i})}{bP'_{id_i}}
          tY_{d_i} bP_{id_i}(1-bP_{id_i}) tY'_{d_i} biggr]Biggr)\
          -sum_{i=1}^{N^*} sum_{j=2}^{n_i}biggl[frac{bP_{ij}'bP_{ij} (1-bP_{ij})'}{(1-bP_{ij})'(1-bP_{ij})+bP_{ij}'bP_{ij}}tY_j tY'_j + frac{bP_{ij}}{(1-bP_{ij})'}
          tY_j bP_{ij}(1-bP_{ij}) tY'_jbiggr]
          end{multline}

          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 18 '18 at 14:18









          JPiJPi

          9,64421550




          9,64421550























              2














              I propose this, with package geometry. If you have the default layout with large margins, you can nest the equation contents in a medsize environment from nccmath (~ 80% of previous size):



              documentclass{article}
              usepackage{geometry}
              usepackage{showframe}
              renewcommand{ShowFrameLinethickness}{0.3pt}
              usepackage{amsmath, bm, nccmath}
              usepackage{diffcoeff}

              begin{document}

              begin{equation}
              begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
              sum_{i=1}^{N-N^*} Bigg( & bigg[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
              bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
              mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & bigg]\
              %&
              - bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
              mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
              mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &bigg]Bigg)
              end{aligned}\
              % &
              -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
              mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
              end{aligned}
              end{equation}
              bigskip

              begin{equation}
              begin{medsize}
              begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
              sum_{i=1}^{N-N^*} Biggl( & Biggl[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
              bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
              mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & Biggr]\
              %&
              - Biggl[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
              mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
              mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &Biggr]Biggr)
              end{aligned}\
              % &
              -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & biggl[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
              mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbiggr]
              end{aligned}
              end{medsize}
              end{equation}

              end{document}





              share|improve this answer




























                2














                I propose this, with package geometry. If you have the default layout with large margins, you can nest the equation contents in a medsize environment from nccmath (~ 80% of previous size):



                documentclass{article}
                usepackage{geometry}
                usepackage{showframe}
                renewcommand{ShowFrameLinethickness}{0.3pt}
                usepackage{amsmath, bm, nccmath}
                usepackage{diffcoeff}

                begin{document}

                begin{equation}
                begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
                sum_{i=1}^{N-N^*} Bigg( & bigg[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
                bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
                mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & bigg]\
                %&
                - bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
                mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &bigg]Bigg)
                end{aligned}\
                % &
                -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
                end{aligned}
                end{equation}
                bigskip

                begin{equation}
                begin{medsize}
                begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
                sum_{i=1}^{N-N^*} Biggl( & Biggl[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
                bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
                mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & Biggr]\
                %&
                - Biggl[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
                mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &Biggr]Biggr)
                end{aligned}\
                % &
                -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & biggl[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbiggr]
                end{aligned}
                end{medsize}
                end{equation}

                end{document}





                share|improve this answer


























                  2












                  2








                  2







                  I propose this, with package geometry. If you have the default layout with large margins, you can nest the equation contents in a medsize environment from nccmath (~ 80% of previous size):



                  documentclass{article}
                  usepackage{geometry}
                  usepackage{showframe}
                  renewcommand{ShowFrameLinethickness}{0.3pt}
                  usepackage{amsmath, bm, nccmath}
                  usepackage{diffcoeff}

                  begin{document}

                  begin{equation}
                  begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
                  sum_{i=1}^{N-N^*} Bigg( & bigg[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
                  bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
                  mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & bigg]\
                  %&
                  - bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
                  mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &bigg]Bigg)
                  end{aligned}\
                  % &
                  -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
                  end{aligned}
                  end{equation}
                  bigskip

                  begin{equation}
                  begin{medsize}
                  begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
                  sum_{i=1}^{N-N^*} Biggl( & Biggl[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
                  bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
                  mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & Biggr]\
                  %&
                  - Biggl[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
                  mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &Biggr]Biggr)
                  end{aligned}\
                  % &
                  -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & biggl[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbiggr]
                  end{aligned}
                  end{medsize}
                  end{equation}

                  end{document}





                  share|improve this answer













                  I propose this, with package geometry. If you have the default layout with large margins, you can nest the equation contents in a medsize environment from nccmath (~ 80% of previous size):



                  documentclass{article}
                  usepackage{geometry}
                  usepackage{showframe}
                  renewcommand{ShowFrameLinethickness}{0.3pt}
                  usepackage{amsmath, bm, nccmath}
                  usepackage{diffcoeff}

                  begin{document}

                  begin{equation}
                  begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
                  sum_{i=1}^{N-N^*} Bigg( & bigg[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
                  bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
                  mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & bigg]\
                  %&
                  - bigg[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
                  mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &bigg]Bigg)
                  end{aligned}\
                  % &
                  -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & bigg[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbigg]
                  end{aligned}
                  end{equation}
                  bigskip

                  begin{equation}
                  begin{medsize}
                  begin{aligned}diffp[1,1]{ell}{bm{phi},bm{phi}'} =
                  sum_{i=1}^{N-N^*} Biggl( & Biggl[begin{aligned}[t]sum_{j=2}^{d_i-1} -;tfrac{bm{P}_{ij}'
                  bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{id_i}'(1-bm{P}_{id_i})'(1-bm{P}_{id_i})}{(1-bm{P}_{id_i})'(1-bm{P}_{id_i})+bm{P}_{id_i}'bm{P}_{id_i}}
                  mathbf{tilde{Y}}_{d_i} mathbf{tilde{Y}}'_{d_i} & Biggr]\
                  %&
                  - Biggl[sum_{j=2}^{d_i-1} tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_j+tfrac{(1-bm{P}_{id_i})}{bm{P}'_{id_i}}
                  mathbf{tilde{Y}}_{d_i} bm{P}_{id_i}(1-bm{P}_{id_i}) mathbf{tilde{Y}}'_{d_i} &Biggr]Biggr)
                  end{aligned}\
                  % &
                  -sum_{i=1}^{N^*} sum_{j=2}^{n_i} & biggl[tfrac{bm{P}_{ij}'bm{P}_{ij} (1-bm{P}_{ij})'}{(1-bm{P}_{ij})'(1-bm{P}_{ij})+bm{P}_{ij}'bm{P}_{ij}}mathbf{tilde{Y}}_j mathbf{tilde{Y}}'_j + tfrac{bm{P}_{ij}}{(1-bm{P}_{ij})'}
                  mathbf{tilde{Y}}_j bm{P}_{ij}(1-bm{P}_{ij}) mathbf{tilde{Y}}'_jbiggr]
                  end{aligned}
                  end{medsize}
                  end{equation}

                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 18 '18 at 15:14









                  BernardBernard

                  170k775202




                  170k775202






























                      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%2f466363%2fwhat-is-the-best-way-to-write-this-equation-to-have-a-better-look%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

                      Wiesbaden

                      Marschland

                      Dieringhausen