Text this: Energy minimization approach for a two-link flexible manipulator