A computational method based on Bézier control points is presented to solve optimal control problems governed by time varying linear dynamical systems subject to terminal state equality constraints and state inequality constraints. The method approximates each of the system state variables and each of the control variables by a Bézier curve of unknown control points. The new approximated problems converted to a quadratic programming problem which can be solved more easily than the original problem. Some examples are given to verify the efficiency and reliability of the proposed method. Mathematical subject classification: 49N10.