Assuming that is a constant, you have and if we let , since the first term is only a function of and the second is only a function of , then evaluating derivatives gives and , and substituting gives

Since the left hand side is only a function of and the right hand side is only a function of , the only way they can be equal is if they are both equal to some constant value . This gives

which are two ordinary differential equations