Thank you for the quick reply.
I've been solving with these options:
options.function_tolerance = 1e-12;
options.max_num_iterations = 1000;
options.max_num_line_search_step_size_iterations = 100;
// options.line_search_direction_type = ceres::BFGS;
options.line_search_interpolation_type = ceres::BISECTION;
I've been trying with both BFGS and LBFGS, they seem to give similar results.
Would the second option work though, using nonlinear least squares to solve grad f = 0?