How can I achieve different margins on different pages? The reason I want to do this is that I have an align environment that I don't want to break in two. So the first page is a little crowded at the bottom but I want all the math together. Right now I use the following code. Sorry I don't know how to fill the page with math like the lipsum package does for text.
The geometry package has the \newgeometry command which allow you to define a new page layout in the middle of your document then go back to your initial layout with the \restoregeometry command
There is also \savegeometry, and \loadgeometry if you intend to reuse your new page layout.
This is a very complete package, you can find a lot in the geometry documentation.
If I understand, you just want to add a bit of vertical space at the bottom of a page, so that the align environment fits on just one page. You can achieve that with \enlargethispage . For example, to add 2cm to the page height, put something like