I haven't kept salving but I've kept other cichlids that reach similar sizes in my 75
I've seen a friend keep a large 7" Jack Dempsey in a 30 and the thing looked miserable as hell (although he also didn't know how to take care of it but still)
what are the dimensions of a 40 tall btw?