If an author has published a second edition of a book and he is in his earlier career stage as a mathematician, how do you recommend to include this second edition into the list of publications appearing e.g. in the CV? For example, should it be mentioned at all? Should it replace the first edition? Should both editions be listed, in particular when the second edition is a massive revision and 20 pages longer?
Normally you would just give the bibliographic information for the most recent edition. If you feel it's important to say when you first wrote it, you could add a parenthetical like (First edition published in 1987).
If the book was originally written by someone else, and you joined as a co-author on a later edition, then include a note like (Co-author for editions 5 and later).
This would be the same regardless of what stage of your career you are at, and as far as I know it would be the same in any field.