Emerson Electric said it will buy all the remaining shares of Aspen Technology it doesn't already own for about $7.2 billion in an all-cash deal.