As James Andreoni in his "Giving with Impure Altruism: Applications to Charities and Ricardian Equivalence," The Journal of Political Economy , 97, Issue 6, December 1989, pp. 1447-1458 and "Impure Altruism and Donations to Public Goods: A Theory of Warm Glow Giving," Economic Journal, 100, June 1990, pp.464-477, articles notes that when people make decisions about giving to charities (privately provided public goods), people are influenced by many factors such as social pressure, sympathy, guilt, desire to earn prestige, friendship, respect or warm glow. Warm glow in this context is defined as an increase in utility resulting from the act of giving in addition to utility generated by increase in the total supply of the public good. The warm glow is experienced by contributors as something along the lines of "having done their thing."
Andreoni  develops a model of charitable giving that includes two motives. First, the individuals simply demand more of a public good. This reason is in the public goods literature referred to as "altruism" [Barro 1974, Becker 1974]. Second, people experience an increase in their utility from giving per se, called a "warm glow". Because the second is considered to be a selfish motive, Androni's model is a model of "impure altruism".
The Model of Impure Altruism
Let's assume that in the economy there are only one private and one public good. The public good can be produced directly from the private good by a linear technology and thus can be measured in dollars. There are n total consumers. Consumer i is endowed with wealth wi that can be spent either on a private good xi, contributions towards the public good gi or on paying taxes i. All collected taxes are entirely used to purchase more of a public good.
Let G = igi be the sum of all private contributions to the public good and let T = ii be the sum of public contributions from taxes. Then the total supply of the public good equals to Y = G + T.
The differences between (1) altruistic consumer, (2) egoistic consumer who gives only because of warm glow, and (3) impurely altruistic consumer are the following:
- Consumer whose utility is described by the standard model of altruism has a utility function of the form Ui = Ui(xi, Y). His utility depends only on the consumption of the private good and the supply of public good.
- Consumer who cares only about the warm glow of giving and is not concerned with the level of public good at all has preferences described by the utility function Ui = Ui(xi, gi). The warm glow is increasing with the amount contributed. Andreoni suggests to call such preferences "egoistic."
- Consumer who is impurely altruistic has preferences that have both altruistic and egoistic component: Ui = Ui(xi, gi, Y), where Ui is assumed to be strictly quasi-concave and increasing in all arguments. Such people care about the public good but receive a warm glow from giving as well. Note that gi enters the utility fuction twice: once as a private good and the second time as a part of the public good.
Let G-i = jigj be the sum of all private contributions except for person i. Given the assumption that all individuals follow Nash equilibrium strategy, they all treat G-i and as exogenous. Each then consumer solves the maximization problem:
maxxi, Y, gi Ui(xi, gi, Y)
subject to xi + gi = wi - i and G-i + gi + T = Y
To find out how to solve this maximization problem, go to Advanced Discussion of The Individual's Public Good Choice Problem in the Market or consult Andreoni .