Dynamic soaring improves the endurance of Unmanned Aerial Vehicles (UAVs) by obtaining energy from the horizontal wind shear gradient. The use of dynamic soaring in small solar UAVs can mitigate the trade-off between energy capacity and battery weight to achieve continuous all-day flight. The goal of this study is to determine the optimal energy acquisition methods for small solar UAVs using dynamic soaring and to decrease the battery weight to achieve all-day flight. A dynamic soaring UAV model that considers the influence of the wind shear gradient and a solar power energy model are established. The conditions to obtain a closed-loop energy system during daytime and nighttime flights are discussed, and the minimum mass of the energy system required for these conditions is determined. Simulations of single-cycle circular flights and a 72-h continuous flight of a small solar UAV are performed. The analyses and simulation results show that: (1) the combination of dynamic soaring and solar technology significantly reduces the energy consumption and reduces the required battery weight, (2) the flight speed and flight attitude angles have significant effects on the optimal total energy acquisition and (3) wind fields with a large horizontal gradient and strong solar illumination provide energy and load advantages.