Question 7
Denote by $\mathbb{R}$ the set of all real numbers. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(0) \neq 0$ and
$$
f(x+y)^{2}=2 f(x) f(y)+\max \left\{f\left(x^{2}\right)+f\left(y^{2}\right), f\left(x^{2}+y^{2}\right)\right\}
$$
for all real numbers $x$ and $y$.
$$
f(x+y)^{2}=2 f(x) f(y)+\max \left\{f\left(x^{2}\right)+f\left(y^{2}\right), f\left(x^{2}+y^{2}\right)\right\}
$$
for all real numbers $x$ and $y$.