# Separation of Variables when one variable depends on another.

Say I have the following PDE ignoring boundary data for the moment $$\frac{\partial^2u(x,y)}{\partial x\partial y}=-u(x,y)\tag1$$ which is similar to the question asked here. Say $u$ is sufficiently smooth and the derivatives could be interchanged.

This equation can be easily solved assuming a separable solution, i.e. $u(x,y)=X(x)Y(y)$. However, what if it is known that $y$ is a function of $x$, $y=y(x)$? Is the equation still separable? Meaning is $u(x,y(x))=X(x)Y(y(x))$ a solution? Could the derivatives still be interchanged?

I have tried various "test functions" that solve the PDE or similar PDEs but have not come to a definitive conclusion. I figured that interchanging the order of the derivatives would lead to different results. For example, integrating out $y$ first would introduce terms with $x$ for the second integration, while integrating along $x$ first would avoid those terms.

Moreover, since $y$ is a function of $x$, heuristically the PDE should be reducible to an ODE. I have attempted this through chain rule. $$\frac{\partial^2u}{\partial x\partial y} =\frac{\partial}{\partial x}\left(\frac{\partial u}{\partial x}\frac{\partial x}{\partial y}\right) = \frac{\partial}{\partial x}\left(\frac{\partial u}{\partial x}\frac{1}{y'}\right) = \frac{\partial^2u}{\partial x^2}\frac{1}{y'}-\frac{y''}{(y')^2}\frac{\partial u}{\partial x}\tag2$$ This would make a second order ODE for $u$. However, when I test this hypothesis nothing seems to be in agreement. For example, let's try $u=x(1-y^2)$ with $y=x^2$ to solve the simpler PDE $$\frac{\partial^2u(x,y)}{\partial x\partial y}=-2y\tag3$$ This $u$ certainly solves $(3)$. Yet when applying the chain rule from $(2)$, it leads to nonsensical results.

This was kind of all over the place. I hope I made my questions clear.

$\boldsymbol{1.}$ Does separation of variables still apply when one variable is dependent on the other?

$\boldsymbol{2.}$ Is smoothness moot in the case that one variable is dependent on the other?

$\boldsymbol{3.}$ What is wrong with my chain rule?

I feel like I am misunderstanding something very fundamental here.