Find all functions $f:R \rightarrow R$ such that $$(x+y^2)f(yf(x))=xyf(y^2+f(x))$$, where $x,y \in \mathbb{R}$
Problem
Source: IZHO 2017 Day 1 Problem 2
Tags: functional equation, function, algebra
14.01.2017 12:19
Awesome problem .....!
14.01.2017 12:21
My solution. Let $P(x,y)$ be the assertion of $$(x+y^2)f(yf(x))=xyf(y^2+f(x))$$(1) $P(x,0): f(0)=0$ $P(x,1): (x+1)f(f(x))=x(f(f(x)+1)$. From there, we can see that $f$ is injection. $P(-y^2,y): -y^3f(y^2+f(-y^2))=0=f(0)$. Then, $f(-y^2)=-y^2 or f(x)=x$ $\forall x \leq0$ (2) If $f(x)=0$ $\forall x \in \mathbb{R}$. We can see that $\boxed{f(x)=0}$ is a solution. If exist $x_0 \in \mathbb{R}$ such that $f(x_0)\neq 0$, then $P(x_0,-y)$ and regard $P(x_0,y)$, we have $f(x)=-f(-x)$ $\forall x \in \mathbb{R}$ (3) (2)(3), we have $\boxed{f(x)=x}$ $\forall x \in \mathbb{R}$
14.01.2017 12:23
MMike wrote: $P(x,1): (x+1)f(f(x))=x(f(f(x)+1)$. From there, we can see that $f$ is injection. How? Can you explain?
14.01.2017 12:28
If $f(x_1)=f(x_2)$, then $\frac{f(f(x_1)+1)}{f(f(x_1))}=\frac{f(f(x_2)+1)}{f(f(x_2))}$, then $1+ \frac{1}{x_1}=1+ \frac{1}{x_2} \rightarrow x_1=x_2$
14.01.2017 12:49
If $f(x)=const$ we have $f(x)=0$.Now we handle the case $f(x)\neq const$. We have $f$ is injective,because $f(x_{1})=f(x_{2})$ we have: $\frac{x_{1}+y^{2}}{x_{1}y}=\frac{x_{2}+y^{2}}{x_{2}y}$ so $y^{2}(x_{1}-x_{2})=0$ so $x_{1}=x_{2}$. now $P(\frac{y^{2}}{y-1},y)$ so we have $f(yf(x))=f(y^{2}+f(x))$ so $yf(x)=y^{2}+f(x)$ so $f(\frac{y^{2}}{y-1})=\frac{y^{2}}{y-1}$ now set set $\frac{y^{2}}{y-1}=z$ so setting $y_{1}=\frac{-z+\sqrt{z^{2}+4z}}{2}$ we have $f(z)=z$ for all $z$ except $-4<z<0$.Now we will prove $f(x)=x$ $\forall x\in R$. $P(x,y)$ where $-4<x<0$, we could pick large enough $|y|$ such that both $yf(x)$ and $y^{2}+f(x)$ are not in interval $(-4,0)$ so $f(yf(x))=yf(x)$ and $f(y^{2}+f(x))=y^{2}+f(x)$ so we have: $y^{3}f(x)=y^{3}x$ so $f(x)=x$ $\forall x\in R$.
14.01.2017 12:50
$\text{My Solution}$ Let $P(x,y)$ be the assertion of this equation $P(0,0)$ $\implies$ $f(0)=0$ So there exists $a\in R$ s.t $f(a)=0$ Two cases exist $i)$ $f(y^2)=0$ for all $y$ So $P(4,2)$ $\implies$ $f(4)=4$ $P(4,\frac{x}{4})$ and $P(4,\frac{-x}{4})$ $\implies$ $f$ is odd. So $f(-y^2)=-f(y^2)=0$ So $f(x)=0$ for all $x\in R$ $ii)$ There exist $x_0\neq 0$ such that $f((x_0)^2)\neq 0$ $P(x_0,a)$ $\implies$ $a\cdot x_0\cdot f((x_0)^2)=0$ so $a=0$ We got $f(a)=0$ $\iff$ $a=0$ So $P(-x^2,x)$ $\implies$ $f(-x^2)=-x^2$.So for all nonnegative $x$ $f(x)=x$. Now let's select $y$-positive and $x$-negative $P(x,y)$ $\implies$ $f(y^2+x)=y^2+x$ For all $x$ we can find $y$ such that $y^2+x$ is positive and gets all values in $R^{+}$ $f(x)=x$ for all positive $x$ So the all solutions are $f(x)=x$ and $f(x)=0$.
14.01.2017 13:00
Can somebody please post other problems from day 1?
14.01.2017 13:48
see http://matol.kz/olympiads/499
14.01.2017 13:59
Thanks!!
14.01.2017 14:20
I think some cases are mising.Be carefull.
14.01.2017 14:24
I think that all the solutions are wrong. Edit for the correct one is coming soon. The correct is $f(x)=0$ $f(x)=x$ $f(-x_0)=\sqrt x_0$ for a fixed $x_0>0$ And all other $f(x)=0$ And $f(-x_0)=-\sqrt x_0$ for a fixed $x_0\ge1$ And all other $f(x)=0$
14.01.2017 14:55
MMike wrote: If $f(x_1)=f(x_2)$, then $\frac{f(f(x_1)+1)}{f(f(x_1))}=\frac{f(f(x_2)+1)}{f(f(x_2))}$, then $1+ \frac{1}{x_1}=1+ \frac{1}{x_2} \rightarrow x_1=x_2$ $f(f(x_1))$ could be zero if I am not wrong? Garfield wrote: We have $f$ is injective,because $f(x_{1})=f(x_{2})$ we have: $\frac{x_{1}+y^{2}}{x_{1}y}=\frac{x_{2}+y^{2}}{x_{2}y}$ so $y^{2}(x_{1}-x_{2})=0$ so $x_{1}=x_{2}$. I think this has the same problem, division by zero. Murad.Aghazade wrote: Clearly true that $f$ is injective. Would you mind explaining?
14.01.2017 15:35
So to get $f$ is injective is impossible?
14.01.2017 16:05
MMike wrote: If $f(x_1)=f(x_2)$, then $\frac{f(f(x_1)+1)}{f(f(x_1))}=\frac{f(f(x_2)+1)}{f(f(x_2))}$, then $1+ \frac{1}{x_1}=1+ \frac{1}{x_2} \rightarrow x_1=x_2$ but there is one thing:f(f(x)) can be zero.You need to observe this case(because denominator can be zero)
14.01.2017 17:16
Now I edited My Solution which doesnt use injecitivity.
14.01.2017 17:23
Assuming $f$ is non-constant(it's trivial case...) Let $A(x,y)=(x+y^2)f(yf(x))=xyf(y^2+f(x))$ be assertion of given FE. Now $A(x,0)\Longrightarrow xf(0)=0\Longrightarrow f(0)=0\ . \ . \ . \ \bigstar$. Now let $f(a)=0$ for some real $a$, thus \begin{align*} 0\stackrel{\bigstar}{=}(a+y^2)f(0) &\stackrel{f(a)=0}{=} (a+y^2)f(yf(a)) \\ &\stackrel{A(a,y)}{=}ayf(y^2+f(a)) \\ &\stackrel{f(a)=0}{=}ayf(y^2) \\ &\Longrightarrow f(m)=0 \Longleftrightarrow m=0 \ . \ . \ . \ \spadesuit \\ & \ \ \ \text{ or } f(m)=0,\ \forall \ m\geq 0 \ . \ . \ . \ \blacksquare \end{align*}. Now $1.)$ $f(m)=0\Longleftrightarrow m=0$ \begin{align*} A(-y^2,y)&\Longrightarrow 0=-y^3f(y^2+f(-y^2)) \\ &\stackrel{\spadesuit}{\Longleftrightarrow} f(-y^2)=-y^2\\ &\Longrightarrow f(x)=x,\ \forall\ x<0\ . \ . \ . \ \clubsuit \end{align*}. From \begin{align*} \underbrace{A\left(x<0,\underbrace{y}_{\text{such that }y^2+x>0\text{ and }y>0}\right)}_{\text{call this assertion }\omega} \Longrightarrow (x+y^2)xy &\stackrel{\stackrel{xy<0}{\clubsuit}}{=}\underbrace{(x+y^2)}_{>0}f(yx) \\ &\stackrel{\stackrel{x<0}{\clubsuit}}{=} (x+y^2)f(yf(x)) \\ & \stackrel{\omega}{=} xyf(y^2+f(x)) \\ & \stackrel{\stackrel{x<0}{\clubsuit}}{=} xyf(y^2+x) \\ & \stackrel{xy>0}{\Longleftrightarrow} f(y^2+x)=y^2+x \\ & \stackrel{y^2+x>0}{\Longleftrightarrow} f(x)=x,\ \forall\ x>0 \\ & \stackrel{\clubsuit}{\Longrightarrow} f(x)=x,\ \forall x\in \mathbb{R} \end{align*} $2.$ $f(m)=0,\ \forall \ m\geq 0$ $\exists m\in \mathbb{R}_{<0}$ such that $f(m)\neq 0$ Let's fix this $m$. \begin{align*} A\left(m,\underbrace{y}_{\text{such that }y^2+f(m)\geq 0}\right)&\Longrightarrow (m+y^2)f(yf(m))=myf(y^2+f(m))\stackrel{\blacksquare}{=} 0 \\ & \Longrightarrow (m+y^2)f(yf(m))=0 \\ & \Longrightarrow f(yf(m))=0,\ \forall \ y\neq \pm \sqrt{-m} \\ & \Longrightarrow f(x)=0,\ \forall x\neq m\text{ and } \pm \sqrt{-m}f(m)\ . \ . \ . \ \bigstar \bigstar \end{align*}Note that in following part of solution there are actually $2$ cases, but I'll cover them by changing $\pm$ and $\mp$, depending on case i.e. upper sign is first case always and down sign is for second case... $\pm f(m)<0$ $$\Longrightarrow \mp\sqrt{-m}f(m)<0\stackrel{\blacksquare}{\Longrightarrow} f(\mp\sqrt{-m}f(m))=0$$$A\left( m, \frac{m}{f(m)}\right)\Longrightarrow \left( m+\left( \frac{m}{f(m)}\right)^2\right)f(m)=\frac{m^2}{f(m)}f\left( \left( \frac{m}{f(m)}\right)^2+f(m)\right)\ . \ . \ . \ \square$ which is equal to $0$ if $f(m)>0$ thus $$ m+\left( \frac{m}{f(m)}\right)^2=0\Longrightarrow f(m)=\sqrt{-m}$$or $f(m)<0$ thus \begin{align*} 0\stackrel{\stackrel{-m>0}{\blacksquare}}{=} \left( m+\left( \frac{m}{f(m)}\right)^2\right)f(-m)& \stackrel{A\left( m, -\frac{m}{f(m)}\right)}{=}\frac{-m^2}{f(m)}f\left( \left( \frac{m}{f(m)}\right)^2+f(m)\right) \\ &\stackrel{\square}{=}-\left( m+\left( \frac{m}{f(m)}\right)^2\right)f(m) \\ & \Longleftrightarrow m+\left( \frac{m}{f(m)}\right)^2=0 \\ &\Longrightarrow f(m)=-\sqrt{-m} \end{align*}EDIT: Mistake pointed out by nikolapavlovic
14.01.2017 17:24
Murad.Aghazade wrote: $\text{My Solution}$ $ii)$ There exist $x_0\neq 0$ such that $f((x_0)^2)\neq 0$ and why is that?
14.01.2017 17:29
nikolapavlovic wrote: Murad.Aghazade wrote: $\text{My Solution}$ $ii)$ There exist $x_0\neq 0$ such that $f((x_0)^2)\neq 0$ and why is that? Because if there doesnt exist any $x$ such that $f(x^2)=0$ So we ll get a solution $f=0$ I showed it in first case
14.01.2017 17:30
mihajlon wrote: $$\stackrel{f(a)=0}{=}ayf(y^2) \Longrightarrow a=0$$ why?It could be $f(y)=0$ $\forall y\geq 0$
26.11.2017 14:21
Please friends chek my solution
26.11.2017 15:02
The mistake is that from this part: TRYTOSOLVE wrote: $P(x,1) \rightarrow (x+1)f(f(x))=xf(1+f(x)) \rightarrow \frac{f(f(x))}{f(f(x)+1)}=\frac{x}{x+1}$ Then $f(x)=f(y) \rightarrow \frac {f(f(x))}{f(f(x)+1)}=\frac {f(f(y))}{f(f(y)+1)} \rightarrow \frac {x}{x+1}=\frac {y}{y+1} \rightarrow x=y$ so $f:injective$ so $f(-y^2)=-y^2$ What if $f(f(x))=f(f(x)+1)=0$?
21.02.2018 06:04
Could anyone found third answer ? $f(x)=0, x\ne -a^2;\\ f(x)=a, x=-a^2$ with any $a\in (-\infty, -1]\cup (0, +\infty)$
21.08.2019 06:26
Let $P(x,y)$ be the given FE. Note that \[P(1,0)\implies f(0)=0.\]Now, suppose there was some $a$ such that $f(a)=0$ and $a\ne 0$. Then, \[P(a,y)\implies 0=ayf(y^2),\]so $f(x)=0$ for all $x\ge 0$. Based on this, we'll split into two cases. Case 1: $f(x)=0\iff x=0$. We have \[P(-y^2,y)\implies 0=-y^3f(y^2+f(-y^2))\implies f(-y^2)=-y^2,\]so $f(x)=x$ for all $x\le 0$. Pick $x,y<0$ such that $y^2+x<0$. Then, the FE gives \[(x+y^2)f(yx)=xy(y^2+x)\implies f(xy)=xy.\]For any given $b>0$, we can choose $y=-\epsilon$ and $x=-b/\epsilon$ for small enough $\epsilon$ such that $y^2+x<0$, so $f(b)=b$ for all $b>0$ as well. So in this case, we see that $f\equiv\mathrm{id}$. Case 2: $f(x)=0$ for all $x\ge 0$. Suppose there was an $a<0$ such that $f(a)>0$. Pick $y\ne -\sqrt{-a}$, $y<0$. Then, \[P(a,y)\implies (a+y^2)f(yf(a))=ayf(y^2+f(a))=0,\]so $f(yf(a))=0$. In particular, this means $f$ is $0$ everywhere, except the point $-\sqrt{-a}f(a)$, so we must have \[a=-\sqrt{-a}f(a)\implies f(a)=\sqrt{-a}.\]Thus, we have the solution $f(x)=0$ for all $x\ne a$ and $f(a)=\sqrt{-a}$ for any fixed negative value of $a$. Now, WLOG, suppose that $f(x)\le 0$ for all $x<0$. Pick any $x,y<0$. The FE then gives \[xyf(y^2+f(x))=0\implies f(y^2+f(x))=0.\]This implies $f(n)=0$ for all $n>f(x)$. In particular, we also have $f(y^2+f(a))=0$ for $a<0$ and $y>0$. Thus, the FE gives \[(a+y^2)f(yf(a))=0.\]So if $f(a)<0$, then we get $f(x)=0$ for all $x$ except $x=\sqrt{-a}f(a)$, so again $a=\sqrt{-a}f(a)$, so $f(a)=-\sqrt{-a}$ and $f(x)=0$ for all other $x$. Thus, we see that either $f(x)\equiv x,0$, or $f$ is $0$ at all but one negative point $a$ where the value is $\pm\sqrt{-a}$. We check that the solutions $x$ and $0$ work. We write the other solution as $f(x)=0$ for all $x\ne -a^2$ and $f(-a^2)=a$ for some nonzero value of $a$. Firstly, if we plug in any $x\ne -a^2$, then both sides are $0$, so we only need to verify for the case when $x=-a^2$. In this case, we see that \[(-a^2+y^2)f(ay)=-a^2yf(y^2+a).\]If $y\ne -a$, then the left side is $0$ so we have \[yf(y^2+a)=0.\]If $-a^2-a>0$, then there is a nonzero value of $y$ which makes this fail, so the FE is satisfied if and only if $a^2+a\le 0$, or $a\in(-\infty,-1]\cup[0,\infty)$. So our solutions are $f(x)\equiv x,0$, or $0$ everywhere except $f(-a^2)=a$ for some fixed $a\in(-\infty,-1]\cup[0,\infty)$. We checked that these work, so we're done.
30.12.2019 19:23
I didn't have time to read all the other solutions , but i think this is a new approach : Let p(x,y) indicate the main equation. If f(x) = f(y) ( and not equal to 0 ) : P(x ,$\frac{1}{f(x)}$ ) and p(y , $\frac{1}{f(y)}$) says that our function is injective. Now for every pair that satisfies $y^2 - yx +x =0$ by injectivity we have $y^2 - y f(x) + f(x) = 0 $ and vice versa. Therefore the roots of these equations are equal, therefore is their sum and product , therefore f(x) = x for every real x ≥4 . Now p(x ≥4 , y ) : $f(xy) = xy$ therefore $ f(z) = z $ for every real z and we're done . But in the case that f(X) = f(Y ) =0 at least one of them is not 0 , as example X , now p(X,y) : f($y^2$) =0 So f(z) = 0 for every positivie real z . And that 's where i can't handle it anymore. I'd be glad if anyone could finish it .
30.12.2019 19:38
user01 wrote: Find all functions $f:R \rightarrow R$ such that $$(x+y^2)f(yf(x))=xyf(y^2+f(x))$$, where $x,y \in \mathbb{R}$ Here is the short summary for the key steps to prove this. 1. $f(0)=0$ 2.$f(-x)=-f(x)$(odd function) 3. $f(a)=f(b)\implies a=b$(injectivity) if $f(x)\neq 0\forall x$ 4. $f(y^2-f(y^2))=0\implies f(x)=x\forall x\geq 0$ 5. Using 2, $f(x)=x\forall x$ or $f(x)=0$
13.05.2020 08:05
How did you show injectivity ?
17.08.2020 05:48
17.08.2020 18:37
We insert $x=-y^2$ and we have that: $$f(y^2+f(-y^2))=0$$Now we insert $x=t^2+f(-t^2)$ and we have that: $$(t^2+y^2+f(-t^2))f(0)=(t^2+f(-t^2))yf(y^2)$$we now insert $y=0$ from which we have that: $$(t^2+f(-t^2))f(0)=0$$in either case we have that $f(0)=0$ Now when we return to the original equation, we set $y=1$, from which we get that $f$ is injective. Which means that: $$f(-t^2)=-t^2$$so it follows that for all $x \leq 0$ we have that $f(x)=x$. Thus we set $y > 0$ and we set $x = \epsilon$, where $\epsilon$ is the greatest negative real number. Now we have that: $$f(y^2-\epsilon)=y^2-\epsilon$$so obviously we have that $y^2-\epsilon \geq 0$, and since it is possible to express every $\mathbb{R}^{+}$ in this manner we have that $f(x)=x$ for all $x > 0$. Thus the only answer is $f(x)=x$
17.08.2020 19:04
@above there is no greatest negative real number, because the Supremum of the negative reals is 0, but you can correct this by fixing some $t$ and plug in $y=t+\delta$ and $x=\epsilon<0$ such that $(t+\delta)^2+\epsilon=t$.
29.12.2020 02:27
Let $P(x, y)$ denote the assertion. $P(1, 0)$ yields $f(0) = 0$. Also, $P(-x, \sqrt{x})$ for positive reals $x$ yields $f(x + f(-x)) = 0$. If $f$ is injective at $0$, then we get $f(-x) = -x$ hence $f(x) = x$ for all nonpositive $x$. Next, we will consider $P(-1, \sqrt{x + 1})$ for $x > 0$. This gives\[xf(-\sqrt{x + 1}) = -\sqrt{x+1}f(x) \implies f(x) = x\]since $f(-\sqrt{x+1}) = -\sqrt{x+1}$. Hence, $\boxed{f(x) = x \text{ for all } x \in \mathbb{R}}$ is a solution. If $f$ is not injective at $0$, then suppose $f(c) = 0$ where $c \neq 0$. Then $P(c, y)$ yields $cyf(y^2) = 0$ hence for all $y > 0$, we have $f(y^2) = 0$. Thus, it follows that $f(x) = 0$ for all $x \geq 0$ (clearly $f(0) = 0$). Next we compare $P(x, y)$ with $P(x, -y)$:\begin{align*}(x + y^2)f(yf(x)) &= xyf(y^2 + f(x))\\(x + y^2)f(-yf(x)) &= -xyf(y^2 + f(x))\end{align*}and note that one of $yf(x)$ and $-yf(x)$ is nonnegative, so $xyf(y^2+ f(x))$ is $0$. So for nonzero $x, y$, it follows that $f(y^2 + f(x)) = 0$. Check that if $x = 0$, then clearly $f(y^2 + f(x)) = 0$. Hence,\[(x + y^2)f(yf(x)) = 0\]for all $x, y \in \mathbb{R}$. If there does not exist $d$ for which $f(d) \neq 0$, then we arrive at the solution\[\boxed{f(x) = 0}\]for all real $x$. If there does exist $d$, which must be negative, for which $f(d) \neq 0$, then for any $y \neq \pm \sqrt{-d}$ it follows that $f(yf(d)) = 0.$ Since $f(d)$ is constant, it thus follows that $f(x) = 0$ for all reals $x$ except when $x \in \{-f(d)\sqrt{-d}, f(d)\sqrt{-d}\}$. Since $f(d) \neq 0$, it follows that\[d \in \{-f(d)\sqrt{-d}, f(d)\sqrt{-d}\} \implies f(d) \in \{\sqrt{-d}, -\sqrt{-d}\}.\]This sceneario yield all solutions of the form\[\boxed{f(x)=\begin{cases} 0 &\text{ if } x \neq d \\ \sqrt{-d} &\text{ if } x = d \end{cases}} \text{ and } \boxed{f(x)=\begin{cases} 0 &\text{ if } x \neq d \\ -\sqrt{-d} &\text{ if } x = d \end{cases}}\]for some negative constant $d$. Testing such solutions by plugging them back into the original assertion $P(x, y)$ actually yields necessarily that $\sqrt{-d} \leq {-d}$, so $\boxed{d \leq -1}$ is additionally required. The aforementioned solutions all work upon being plugged back into the original functional equation, so we are done. $\blacksquare$
29.12.2020 13:18
Let the assertion in the given problem be denoted by $P(x,y)$. $P(x,0) \implies xf(0) = 0 \implies f(0)=0$. Let $t$ be such that $f(t) = 0$. Let $s$ be any positive integer. $P(t,\sqrt{s}) \implies \sqrt{s} \cdot t \cdot f(s) = 0 \implies t = 0 \text{ or } f(s) = 0$. Case 1: $t=0$ This implies: $f(x) = 0 \iff x = 0$. $P(x,\sqrt{s}) \implies (x+s)f(\sqrt{s}f(x)) = \sqrt{s}xf(f(x)+s)$ Let $x = -s$ $ \implies \sqrt{s}xf(f(x)+s) = 0 \implies f(x) = -s$. So $f(r) = r$ $\forall r < 0 \in \mathbb{R}$. Let $x,y < 0$ and $y^2 + x < 0$. $P(x,y) \implies \underbrace{(x+y^2)}_{<0}\underbrace{f(xy)}_{xy > 0}=\underbrace{xy}_{>0}\underbrace{(y^2+x)}_{<0}$. $\implies f(xy) = xy$. Now since $xy$ can be made to be any non-negative real even under the condition $y^2 + x < 0$ we have our first Solution which does indeed work. $\boxed{\text{S1:} f(x) = x \text{ } \forall x \in \mathbb{R}}$ Case 2: $f(s) =0$ Hence $\forall$ non-negative numbers $s_1$ we have that $f(s_1) = 0$. Exact Same proof for this case as @above. $\boxed{\text{S2: }f(x) = 0 \text{ } \forall x \in \mathbb{R}}$ $\boxed{\text{S3: }f(x) = \sqrt{-r} \text{ for some negative constant r, and } f(x) = 0 \text{ otherwise.}}$ $\boxed{\text{S4: }f(x) = -\sqrt{-r} \text{ for some negative constant r, and } f(x) = 0 \text{ otherwise.}}$
30.09.2021 22:10
13.12.2021 11:15
very nice problem.
02.06.2024 06:09
Let $P(x,y)$ be the assertion. $P(x,0)$ implies $f(0) = 0.$ Now letting $x = -y^2$ gives \[xyf(y^2+f(x)) = 0 \implies f(-x+f(x)) = 0 \text{ for all $x \le 0$}\]For each $x$, define $a$ to be $f(x) - x$. We take $2$ cases: If all $a = 0$, then $f(x) = x$ for all $x \le 0$. Choose any $(x,y)$ such that $x+y^2 < 0$, so \[f(yf(x)) = xy\]Taking $x \to -\infty$, then $y$ can be anything and still $x+y^2<0$. Thus \[f(xy) = xy \implies f(x) = x \text{ for all $x$}\]by taking any negative $y$. If there's an $a \neq 0$, then $P(a,y)$ implies \[0 = ay \cdot f(y^2+f(a)) \implies f(y) = 0 \text{ for all $y \ge 0$}\]since $f(a) = 0$ by the first line. Now, first assume there's some $k$ such that $f(k) > 0$, so $k<0$. $P(k,y)$ (for $y<0$) implies \[(k+y^2)f(yf(k)) = 0 \implies f(y) = 0 \text{ for all $y \neq -\sqrt{-k} \cdot f(k)$}\]Since $f(k) > 0$, we must have that the one input of $f$ that's gives a non zero $f(x)$ be $k$. So \[f(k) = \frac{k}{-\sqrt{-k}} = \sqrt{-k} \implies f(x) = \begin{cases} 0 & x \neq k \\ \sqrt{-k} & x = k \\ \end{cases}\]for some constant $k<0$. Now assume there's some $k$ such that $f(k)<0$, so we must have $k<0$. Take any $y<0$ to get $P(k,y)$ implies \[0 = ky \cdot f(y^2+f(k)) \implies f(y) =0 \text{ for all $y^2>f(k)$}\]This implies, for any nonzero $y$, \[(k+y^2)f(yf(k)) = ky \cdot f(y^2+f(k)) = 0 \implies f(y) = 0 \text{ for all $y \neq \sqrt{-k} \cdot f(k)$}\]where we take the positive root since that ensures the one ``bump" in $f$ is at a negative $y$ value (since $f(y) = 0$ for any $y \ge 0$). We must have \[f(k) = \frac{k}{\sqrt{-k}} = -\sqrt{-k} \implies f(x) = \begin{cases} 0 & x \neq k \\ -\sqrt{-k} & x = k \\ \end{cases}\]Lastly, if $0> k > -1$, $P(k,\sqrt{k+\sqrt{-k}})$ gives a contradiction, so we must have $k \le -1$. Finally, we can deduce the answer of \[\boxed{f(x) = x, \text{ } f(x) = \begin{cases} 0 & x \neq k \\ \sqrt{-k} & x = k \\ \end{cases}, \text{ and } f(x) = \begin{cases} 0 & x \neq k \\ -\sqrt{-k} & x = k \\ \end{cases}}\]where the middle function is for any real constant $k<0$ and the second one is for any real constant $k \le -1$. It's easy (but painful) to check that these work.