The article is devoted to the shape optimization of one of the most famous ruled surfaces – a cylindrical shell with three types of directrix curves: circle, ellipse, and parabola. Moreover, the test shell is taken with three length dimensions: short, middle, and long. The computational experiment is provided in Comsol Multiphysics with the use of three gradient-based methods: IPOPT, SNOPT, and MMA. The specifics of the task are based on minimizing the total elastic strain energy. Quite important for the study to investigate and choose the most effective method based on the convergence rate and the obtained values of the extremum of the function. The results can be summarized as follows, firstly, for the cylindrical shell, the type of the directrix curve and the size of the shell have a significant impact on the final optimization results. Secondly, the most optimal value of the optimized function is achieved by the IPOPT method. © 2024 Institution of Structural Engineers