Variational method (VM) is employed to derive the co-state equations, boundary (transversality) conditions, and functional sensitivity derivatives. The converged solutions of the state equations together with the steady state solution of the co-state equations are integrated along the domain boundary to uniquely determine the functional sensitivity derivatives with respect to the design function. The application of the variational method to aerodynamic shape optimization problems is demonstrated on internal flow problems at supersonic Mach number range of 1.5. Optimization results for flows with and without shock phenomena are presented. The study shows that while maintaining the accuracy of aerodynamical objective function and constraint within the reasonable range for engineering prediction purposes, variational method provides a substantial gain in computational efficiency, i.e., computer time and memory, when compared with the finite difference computations.