We study the solution of two-point boundary-value problems for second order ODEs with boundary conditions imposed on the first derivative of the solution. The right-hand side function g is assumed to be r times (r >= 1) continuously differentiable with the rth derivative being a Holder function with exponent rho is an element of (0, 1]. The boundary conditions are defined through a continuously differentiable function f. We define an algorithm for solving the problem with error of order m(-(r+rho)) and cost of order m log m evaluations of g and f and arithmetic operations, where m is an element of N. We prove that this algorithm is optimal up to the logarithmic factor in the cost. This yields that the worst-case epsilon-complexity of the problem (i.e., the minimal cost of solving the problem with the worst-case error at most epsilon > 0) is essentially Theta((1/epsilon)(1/(r+rho))), up to a log 1/epsilon factor in the upper bound. The same bounds hold for r Q > 2 even if we additionally assume convexity of g. For r = 1, rho is an element of (0, 1] and convex functions g, the information s-complexity is shown to be Theta((1/epsilon)(1/2)). (C) 2016 Elsevier Inc. All rights reserved.