The multline environment seems to be behaving very oddly for me in that the spacing between different lines of an equation seems to be off. For example, for the following line of latex code,
\begin{multline*}
p(x) = 3x^6 + 14x^5y + 590x^4y^2 + 19x^3y^3\\
- 12x^2y^4 - 12xy^5 + 2y^6 - a^3b^3
\end{multline*}
I'm getting the following result

What I should be getting is
(which was taken from here).
I don't understand why I'm getting these results. Can someone please explain why? (Note that I've set the margin of my pages to 1 inches on all sides using the geometry package.)
UPDATE (1/1/2021) : Thanks to Mico, it seems that the issue is indeed caused by the custom setting of the page margins. I guess the question is now: is there anyway to fix the output for the multline environment when the margins of the pages are custom set (such as when the margins are set to 1 inch on all sides)?


marginparameter: You setmargin=1in, whereas the Overleaf tutorial uses something closer tomargin=2.5in. Put differently, the\textwidthparameter in the overleaf example is 3" smaller than in your code. – Mico Dec 31 '20 at 18:31\RequirePackage[margin=2.5in]{geometry}and I'm able to reproduce the result exactly the same as the one shown in the Overleaf tutorial. – Tan2525 Dec 31 '20 at 18:37multlineenvironment when the margins of the pages are custom set (such as when the margins are set to 1 inch on all sides)? – Tan2525 Dec 31 '20 at 18:41