Control theory gives very few examples of control systems for which the closed-form solution to the Linear-Quadratic (LQ) optimization problem exists. This paper describes two such systems of 2nd and 4th order concerning magnetic bearings and gives the closed-form solutions to the LQ-problems. The controller obtained provides the LQ-optimal bearing forces and minimizes copper losses in coils. The closed-loop system has a variable structure. Stability of the system is analyzed by using the Van der Pol method. Theoretical results are verified by simulations and experiments. The problems of controller simplification are also discussed.