This paper presents a novel formulation of Vieta–Pell wavelets functions (VPW) constructed from classical Vieta–Pell polynomials through systematic scaling and translation techniques. The transformation from a global polynomial basis to a localized wavelet basis enables efficient representation of functions on the semi-open interval [0, 1), preserving orthogonality and compact support properties. The proposed wavelet system is employed to develop an operational matrix framework, which converts differential equations into algebraic systems. Based on this formulation, two numerical approaches are adopted for solving optimal control problems. The direct method is applied by transforming the performance index into a quadratic programming problem, which is solved using the Lagrange multiplier technique. This approach is utilized in engineering applications such as solar energy systems and power system protection, where optimal performance and stability are achieved. In addition, an indirect method based on Pontryagin’s Minimum Principle combined with spectral techniques is employed to solve a practical control problem related to dishwasher systems. The spectral formulation enhances the accuracy of the solution while maintaining computational efficiency. Theoretical properties of the proposed wavelets, including orthogonality, convergence, and accuracy, are rigorously established. Numerical results demonstrate that the Vieta–Pell wavelet approach provides high accuracy, flexibility, and efficiency in solving modern optimal control problems across various engineering domains.