The optimum resource allocation in relay networks has been treated as an important problem to improve the error performance and increase the energy efficiency. In this paper, a two-dimensional resource allocation, i.e., the energy optimization and location optimization, is carried out based on the average symbol error rate (SER) for the system with and without a direct link. Differential modulation which bypasses the channel estimation at the transceiver is investigated using amplify-and-forward protocol for the system with multiple relays. The benefits of optimization are validated by the analytical and simulated comparisons. We also show that the minimum error rate can be achieved via the joint energy-location optimization.