It is an NP-hard problem. The best you can hope for is an approximation algorithm. To find the actual maximum, maybe by restricting the family of graphs that you use, with some extra conditions.