Maximisation and minimisation of sum of squares, if sum is equal to 15 Find the numbers whose sum is $15$ and sum of squares is minimum
My answer:
Let the numbers be $x$ and $15-x$. Then
$$y=x^2+625-30x+x^2$$
$$=2x^2-30x+625$$
$$dy/dx=0$$
$$4x-30=0$$
$$X=7.5$$
Did I go wrong?

Approach without using calculus:
Geometric viewpoint. This is the same as finding the point on the line $x+y=15$ which is closest to the origin/farthest from the origin. If you draw the picture, you can see that the point with coordinates $x=y=15/2$ is closest to the origin. (It lies on the perpendicular line $x=y$.)  The distance from the origin can be arbitrarily large, so there is no maximum. If you have restriction that $x,y\ge0$, then the maximum is attained for $(x,y)=(0,15)$ and $(x,y)=(15,0)$.
Inequalities. We know from the inequality between quadratic mean and arithmetic mean that for $x,y\ge0$ we have
$$\sqrt{\frac{x^2+y^2}2}\ge\frac{x+y}2$$
which can be simplified to
$$x^2+y^2\ge 2\left(\frac{x+y}2\right)^2.$$
For two variables this can be derived even easier:
$$
\begin{align*}
(x-y)^2&\ge0\\
x^2-2xy+y^2\ge0\\
x^2+y^2&\ge2xy\\
2x^2+2y^2 &\ge x^2+2xy+y^2\\
2x^2+2y^2 &\ge (x+y)^2\\
x^2+y^2 &\ge \frac12(x+y)^2\\
\end{align*}
$$
