For studies of biped walking robots, energy-efficiency is an important issue. We have proposed an optimal-trajectory planning method based on a function approximation method, and applied it to a 2D biped walking model. With this method, we obtained the solution of minimal square integration value of the input torque. Previously in the literature, this method included only an equality state constraint. However, in this paper, we include an inequality state constraint to restrict the joint-angle range. In addition, walking experiments were performed to verify the effectiveness of this method. Results showed that stable walking of a 0.6 s period and 0.3 m/s speed was realized. Finally, we evaluated the robot's energy-efficiency using Specific Cost analysis.