Problem: Let \(k\) be a fixed odd positive integer. Find the minimum value of \(x^2 + y^2\), where \(x,y\) are non-negative integers and \(x+y=k\).
Solution: We have \(y=k-x\). Therefore we get an equation in \(x\) where \(k\) is a constant, precisely \(f(x) = x^2 + (k-x)^2\).
To minimise, we differentiate \(f(x)\) w.r.t \(x\).