The linear-quadratic problem of synthesis optimal control of switched systems is considered. Continuous change of state of the system is described by linear differential equations, and instantaneous discrete changes of state (switching) – linear recurrent equations. The moments of switching, and their number is not prespecified. The quality of control is characterized by a quadratic functional, which takes into account the cost of each switch. The considered problem generalizes the classical linear-quadratic problems of optimal control of continuous, discrete and continuous-discrete systems, transferring them to a new class of dynamic systems – switchable (hybrid) control systems. Together with the problem of optimal control synthesis, the problem of minimizing the number of switchings, characteristic of hybrid systems, is relevant. The peculiarity of the synthesis of optimal switchable systems is that the price function in the considered problem is not quadratic. Therefore, it is proposed to build a price function from auxiliary, so-called price moment functions, each of which is defined as the minimum value of the quality functional at fixed switching moments and is quadratic. At the same time, the optimal positional control, linear in state, depends nonlinearly on switching moments. Optimization of these moments becomes the last stage of the synthesis. The proposed computer-aided synthesis technology makes it possible to find the optimal “controlling complex”, including the number of switches, the switching moments, as well as the control of continuous and discrete movements of the system. The application of the developed technology is demonstrated on an academic example of synthesis.