# Solving PDEs as ODEs under certain conditions

(Before closing this question, yes, I've read this one, but my question is not about separation of variables). I'm currently studying second order PDEs with variable coefficients, and after reducing them to their canonical form, my professor solves them as if they were ODEs (except, of course, for the elliptical case, which I still don't know how to solve, although I reckon has something to do with Laplace's equation in 2 dimensions).

I don't quite understand why we are allowed to do this. The only difference is the integration constants are now functions of the other variable. For instance, consider the equation:

$$2u_{xx}+5yu_x+2y^2u=y$$

It's already reduced to its canonical parabolic form, and I've been taught to solve it by treating $$y$$ as a constant, which therefore leaves me with a constant coefficient ODE with the general solution being:

$$u(x,y)=\frac{1}{2y}+C_1(y)e^{-xy/2}+C_2(y)e^{-2xy}$$

Again, why are we allowed to solve the PDE this way? Is there any theorem, proposition or some text I can refer to to address my doubt? To the obvious question, "why couldn't we?", I can give a couple of answers (which are all wrong, since we can do this):

1. The coefficients $$C_i$$ could depend, for instance, on $$y+a, \ \ a\in \mathbb{R}$$. This wouldn't affect the derivatives, but it could affect how the coefficients work, unless they are invariant under translation, which should be demonstrated
2. Partial derivatives don't always behave as ordinary derivatives (e.g: the reciprocity relation), so we can't consider it trivial to treat them as such

The key is that $$y$$ does not appear as a partial in the expression. Thus you can imagine plugging in a fixed value of $$y$$, call it $$y_0$$, into the expression. Define $$f(x) = u(x,y_0)$$, then the PDE becomes
$$2f''(x) + 5y_0 f(x) + 2y_0^2 f(x) = y_0.$$
This is the same differential equation that we started with. This would not work if we had $$y$$ appearing as a partial as we would lose some terms (since the $$y$$ partial of $$f$$ would be $$0$$) resulting in an entirely different differential equation. Thus, for all intents and purposes, this is an ODE because you can treat $$y$$ as if it is a fixed parameter.
As for the "constants" of integration: the solution will depend on $$y_0$$ as $$y_0$$ is a parameter in the equation: different values of $$y_0$$ will lead to different solutions (check it yourself by plugging a couple different values in). Keep in mind that $$g(y)$$ and $$g(y+a)$$ are really the same idea: just define a new function $$h(y) = g(y+a)$$ for fixed $$a$$. This realization is useful if you want to employ annihilators to solve nonhomogeneous PDEs.