My textbook is using separation of variables to solve a problem about the propogation of transverse electric waves. We have to solve this equation:
$$\bigg [{\partial^2 \over \partial x^2} +{\partial^2 \over \partial y^2}+(\omega/c)^2-k^2 \bigg ]B_z=0$$
We do it with separation of variables, and letting $B_z(x,y)=X(x)Y(x)$. The next step is creating this equation:
$$Y{d^2X\over dx^2}+X{d^2Y\over dy^2}+\big[(\omega/c)^2-k^2\big]XY=0$$
Dividing both sides by ${1\over XY}$,
$${1\over X}{d^2X\over dx^2}+{1\over Y}{d^2Y\over dy^2}+(\omega/c)^2-k^2=0$$
Then says
$${1\over X}{d^2X\over dx^2}=-k_x^2 \ , {1\over Y}{d^2Y\over dy^2}=-k_y^2$$ with$$-k_x^2-k_y^2+(\omega/c)^2-k^2=0$$
I'm very confused as to where they got $k_x$ and $k_y$. I know there are some tricks to separation of variables but I can't figure out what happened here. It's a physics textbook and this one in particular is known for skipping many steps. Where did $k_x$ and $k_y$ come from, and how was the very last equation determined?
The first term is a function of $x$ and $x$ alone. The second term is a function of $y$ and $y$ alone. The last two terms are constants. Thus, in order for those all to combine to give zero for any $x$ and $y$, it must be that the first term is some constant, let's call it $-k^2_x$ and the second term is some constant, say $-k^2_y$.
Replace that first term with $-k^2_x$ and the second term by $-k^2_y$ and you get your last equation.