Finding a function from the given functional equation .

The question asks us to find the function $f(x)$ with the given information

Let $f:\mathbb R \rightarrow \mathbb R$ such that $f'(0)=1$ and $f(x+y)=f(x) + f(y) + (e^{x+y})(x+y)-xe^x-ye^y+2xy$ where $x,y ∈\mathbb R$. Then determine $f(x)$.

Also,It will be great if someone could explain the general approach used in such questions.

• Why was m0nhawk's edit suggestion rejected? – Git Gud Jul 30 '13 at 10:32
• Whats is (e^x .e^y ) ? – Eli Elizirov Jul 30 '13 at 10:45
• I could not somehow write e to the power x+y . So just wrote it in another way. – Simar Jul 30 '13 at 10:46
• What class would give something like this for homework? – Gerry Myerson Jul 30 '13 at 11:03
• Just before starting with Differential equations , functional equations were taught. This was one of the tougher questions as there is no symmetry involved or cannot be solved graphically either. So I wanted to know if there is a general approach to these questions? – Simar Jul 30 '13 at 11:10

Put $x = y = 0$: $$f(0) = 2f(0)$$ so $f(0) = 0$.
Next, differentiate the original equation with respect to $y$ alone: $$f'(x + y) = f'(y) + e^{x+y} + (x+y)e^{x+y} - e^y - ye^y + 2x.$$ Put $y = 0$: $$f'(x) = f'(0) + e^x + xe^x - 1 + 2x = e^x + xe^x + 2x$$ Therefore $$f(x) = \int_0^x \left(e^z + ze^z + 2z\right) dz.$$
Rewrite the equation as $f(x+y)-f(x)-f(y)=e^{x+y}(x+y)-xe^x-ye^y-2xy$ then simply note that $f(x)=x e^x-x^2$ does the trick.