Deleted Partitions and Wasted Storage
Under these circumstances - only one main volume - the proper command to expand it to its full size is:

diskutil resizeVolume /dev/disk0s2 R


This command will not work if your main volume is part of a CoreStorage Volume Group.