<s>[INST] Minimum possible sum of squares of two numbers with sum $k$? If the sum of two numbers is k. Find the minimum value of the sum of their squares.
This is my calculations so far.
a + b = k                <-- google says that I should put x + y = k rather than a + b = k
a² + b² = y                  (but I don't know why should I do that)
(k - b)² + b² = y
k² - 2kb + 2b² = y       <-- now I'm stuck here. I don't know which differentiation variable to take. If it is 'b' then why?

So here I am. Kindly show me how to solve the problem and where did I go wrong in my computations :P
 [/INST] I focus on a calculus method given your tags on the question. We are given $a + b = k$. The sum of their squares is given by $a^2 + b^2$. Since $a + b = k$, we hat that $k - b = a$, hence
$$g(b) = a^2 + b^2 = (k-b)^2 + b^2 = k^2-2kb+b^2+b^2 = k^2 - 2kb + 2b^2\text{.}$$
$k$ is a fixed value that is known, so $b$ is the only unknown in the expression above. Differentiating the above expression with respect to $b$ and setting that equal to $0$, we obtain
$$g^{\prime}(b) = -2k + 4b = 0$$
or
$$4b = 2k \implies b = \dfrac{2}{4}k = \dfrac{k}{2} \text{.}$$
Since $b = \dfrac{k}{2}$ and $a + b = k$, it follows that $$a = k - b = k - \dfrac{k}{2} = \dfrac{k}{2}\text{.}$$
Hence from setting the derivative equal to $0$, we obtain $a = b = \dfrac{k}{2}$.
Next, we must demonstrate that this solution is a minimum. We have
$$g^{\prime\prime}(b) = 4 > 0$$
for any $b$, hence by the second derivative test, the solution $a = b = \dfrac{k}{2}$ must be a minimum.
Thus, the desired sum of squares is given by
$$a^2 + b^2 = \left(\dfrac{k}{2}\right)^2 + \left(\dfrac{k}{2}\right)^2 = 2 \cdot \dfrac{k^2}{4} = \dfrac{k^2}{2}\text{.}$$
</s>