This paper studies admissible state trajectories for an unmanned aerial vehicle(UAV) by performing dynamic soaring technique in the wind gradient. An optimization problem is formulated by employing direct optimal piece wise control. A 3-DOF point mass model system dynamics of UAV is considered. The bank angle and lift co-efficient are identified as control variables. A UAV of mass 5.44kg is considered for this study. Performance measures considered are maximization of specific energy and maximization of specific energy rate extracted by the vehicle, and minimization of the control effort. The effects of linear and parabolic wind gradient on maximizing the specific energy of an autonomous dynamic soaring UAV is also studied and minimum linear gradient required is found. The loop radius of the loiter pattern is maximized for applications like surveillance and patrolling of a localized area along with energy maximization as objective function. Genetic algorithm is used for optimization, since the initial feasible trajectory is difficult to get. The results of this study have a direct impact on the application of UAVs, both military and civilian, as a thrust-off situation could help in saving of fuel and thereby prolong duration of flight, extension of range, and endurance.