Problem
ALG-B1-M08-P012 A quadratic extra term
#12
★★★☆☆ Level 3 of 5
Let \(f:\mathbb Z\to\mathbb Z\), \(f(m+n)=f(m)+f(n)+2mn\), \(f(0)=0\), \(f(1)=1\). Find \(f(n)\).
Set \(g(n)=f(n)-n^2\).
Let \(g(n)=f(n)-n^2\). Then \(g(m+n)=f(m+n)-(m+n)^2=f(m)-m^2+f(n)-n^2=g(m)+g(n)\). Thus \(g\) is additive on \(\mathbb Z\).
Also, \(g(1)=f(1)-1=0\). Hence \(g(n)=0\) for all \(n\in\mathbb Z\), and \(f(n)=n^2\).
The key move is subtracting the expected quadratic part.