OK, I realised the flaw in my argumentation. If I have 1000 GBP to give away, I could either 'walk' 1000 GBP in direction of charity x or 1000 GBP in direction of charity y but only sqrt(x^2 + y^2) in a combination of x and y, e.g. the maximal gradient. The optimal allocation (x, y) of money is what maximises the scalar product of gradient (dU/dx, dU/dy) * (x, y) under the restriction that x + y = 1000. If dU/dx = dU/dy a 50/50 allocation as good as an allocation of all money to the most effective charity. Otherwise giving all money to the most effective charity maximises utility. Sorry for the confusion and thanks for the discussion.
No, I am not trying to account for uncertainty.
But look for instance at this or this picture and assume it shows utility z as function of the budget of two charities x and y. For almost every point (x, y), the steepest slope is in neither in direction (0, 1) nor in direction (1, 0) but in a combination of both direction. In other words, to optimize utility, I should give part of my money to charity x, part to charity y.
Thank you both for your answer. I am really just thinking of marginal utility, as I am just a student with limited budget. I just do not think that the vector the maximizes marginal utility points in the direction of the most efficient charity (which I thought is true a few weeks ago). Now I think it should point in the direction of the gradient of U(x1, ..., xn), the utility as function of the budget of charities x1 to xn. That is, it points in the direction of many charities, and I should split my spendings accordingly between the charities to maximise the benefit (assuming negligible overhead costs of splitting).