Cooperative networks enjoy spatial diversity gains by forming virtual antenna arrays. To improve the performance of such cooperative networks, optimum energy (power) allocation has emerged as an important research topic. In our previous work, we have investigated the decode-and-forward (DF) protocol. In this paper, the more challenging amplify-and-forward (AF) scenario is considered. Differential modulation which bypasses channel estimation is adopted to reduce receiver complexity and communication overhead. For the AF relay system with and without a direct link between the source node and destination node, we first derive simple and general expressions of the average symbol error rate (SER), at reasonably high SNR. Based on these, the optimum energy distributions which minimize the average SER are obtained. The advantages of the energy optimization are confirmed by analysis and simulations. Using these results, we compare the systems with and without a direct link as well as systems with different relaying protocols.