Аннотация:Abstract—This work investigates the time-optimal control of alinear oscillator with switchable frequencies under a constantfrictional torque. We determine the minimum time requiredto steer the system from an initial state to a target zerostate by optimally switching between two bounded frequencyvalues. Unlike the well-established classical case of external forcecontrol, the problem of frequency control remains understudiedand presents a significant research challenge. Furthermore, theproblem is complicated by the presence of Coulomb friction,which is modeled by a discontinuous function, thereby hinderingthe application of classical optimal control theory methods. Weaddress this problem using dynamic programming, decomposingthe original complex problem into a series of simpler, uniformsub-problems with analytical solutions. For these simplified prob-lems we derive necessary optimality conditions using Pontryagin’smaximum principle. Our analysis reveals that optimal solutionstypically involve bang-bang control, though the exact structuredepends critically on the boundary conditions and the frequencybounds. The central challenge here is finding the switchinginstants that satisfy the boundary conditions while minimizing thetransition time. We provide explicit formulas for computing op-timal switching times and characterize parameter regimes wheredifferent control strategies emerge. Using the proposed method,we also construct the set of reachable admissible trajectories.The results can find direct application in mechanical vibrationsuppression and precision positioning systems.Index Terms—harmonic oscillator, optimal control, Pontrya-gin’s maximum principle