Formulation and solution of boundary value problems of polymer mechanics