I came across this image relating calculus to happiness.
It's obviously not meant to be particularly serious, but I was nevertheless inclined to give it some thought. The integral concept in mathematics essentially defines the net accumulation of a changing quantity, and (act) utilitarianism in ethics holds that the action that maximizes the net utility is the (relatively) moral one. It seems natural to me therefore to relate integral calculus to utilitarianism.
For example, define a set of functions to be the "happiness" of different living sentient beings (with each function corresponding to each being) which can be directly (or indirectly[ 1 ]--I don't know how these things are dealt with in utilitarian ethics) attributed to some action at some time t as a function of time. The sign distinguishes pleasure from suffering. The "bounds" of the integral for each function can be from zero--which we can define to be when the action starts--to the death of the sentient being. Sum up the integrals for each sentient being, and you have essentially quantified the "morality" of a particular action. One action can be said to be "relatively moral" to another if it has the greater integral. In fact, that set can include all sentient beings--unaffected ones would simply have an integral of zero.
Does any of this make sense? Has it been studied? Of course, the niceties of my argument may be incorrect, but I was just curious in general whether or not mathematics, in particular integral calculus, can be used to model utilitarianism theoretically. Again, it seems natural, even though it can't really be applied.
[ 1 ]: As a side note, I would say that the "direct" and "indirect" affect issue is related to the Year and a Day rule in law. There is also the butterfly effect and "randomness". These, however, are more general issues I would reckon.