Someone expressed amusement with my economistic definition of love as a mathematical function. Let me expand on it, for it's an interesting idea.
Suppose there are n persons in the world. Define C1, C2, ..., Cn as the consumption, or if you prefer, condition (+ = good, - = bad) of persons 1 through n. Utility is a function of consumption/condition: U1=U(C1), U2=U(C2), etc. (A small deviation from standard utility theory must be noted: persons have the same U function, implying that utility is interpersonally comparable. This is a strong assumption and not well-grounded.)
Let each person i possess an objective or "value" function Vi(U1,U2,...Un)=a1U1+a2U2+...+anUn. The "1" and "2" in this expression are meant to be subscripts (the blog font doesn't have that feature) and there should really be another subscript i; the coefficients indicate altruism, and the subscripts indicate who feels altruism towards whom.
Now let us imagine the ramifications of different values of the altruism coefficients. First, imagine a person for whom all the coefficients are zero. This person is absolutely indifferent to the welfare of any other human being in itself. Though that sounds bad, it is not obvious that this person would be a moral monster in any ordinary sense. He might do favors for friends and family members, calculating that the odds of the favor being returned would make the short-run sacrifice a worthwhile risk. He might be honest and obey the law, to avoid getting caught in a lie or a crime. He might, if he is an explorer in darkest Africa, kill the natives at will like Henry Morton Stanley, but also, he might not. There's no accounting for tastes. Possibly he would see benefits in being thought to care for others, and if he is a good enough mimic of altruism, who is to know? He might also be a serial killer if he finds the pastime sufficiently amusing to compensate for the risks involved.
A normal person probably feels genuine altruism towards a few people. Normalizing self-love to 1 (only the relative values of the coefficients matter so this is just a mathematical convenience), a person might have a1=0.5, a2=0.5, a3=0.2, a4=0.1, a5=0.1, a6=0.01, a7=0.01, a8=a9=...=an=0, where persons 1 and 2 are family members of i, persons 3, 4, and 5 are friends, persons 6 and 7 acquaintances, and everyone else is a stranger. In addition to altruism, a person might have moral side-constraints. A person might feel constrained by prohibitions against murder and cruelty, even towards people who mean nothing to him.
But here's where the question gets interesting. Using the functional form described above, we can define a universal altruist as someone for whom a1=a2=...=an. That is, a universal altruist values the welfare of every single person exactly equally with his own. At any given time, he does whatever will benefit someone the most, regardless of whom. If he can save a stranger's life with 50% probability by risking his own by 40% he will do it. If he has a piece of food he will give it to the hungriest person in the room, and will eat it only if that person happens to be him. (These are crude illustrations: actually, he would compare the expected future value of lives, the prospects of others' liking his lunch, and other factors. But you get the point.)
If we understand what a universal altruist is, three questions follow. First, how would the universal altruist, if we start him out as, say, a typical bourgeois suburbanite in modern America, behave? Second, how far do "ordinary" people differ (if at all!) from the universal altruist? Third, is universal altruism satisfactory as an ethical ideal, or is it part of an ethical ideal but not enough, or is it an ethical error?
One reason universal altruism might seem to be an ethical error is that favoritism towards those physically or biologically close to oneself might seem like a good thing which universal altruism excludes. But I think it does not. I know that millions in Ethiopia are far worse off than any of my friends, family, and neighbors, but I don't know how to help them, whereas opportunities to help my friends, family, and neighbors sometimes do come along. Also, even in a world of universal altruists a certain division of labor might be called for, which would justify telling, say, person 1 to worry about persons 2, 3, and 4, and never mind about person 157. Person 1 might value person 157's well-being equally with his own and everyone else's, but, knowing nothing nothing of person 157's needs, he makes no effort to act on that altruism. I think it's plausible that universal altruism could be consistent with a certain degree of preferential treatment for one's friends and family. At the same time, it would put a sensible limit on it. A rich man who spoils his children in an economic environment of prevailing poverty and squalor would definitely be in the wrong by this standard.
I guess I think universal altruism isn't enough, because one needs many other virtues in order actually to be of any use to one's fellow man, or to experience joy for oneself. But it's a good place to start.