 Let's take a look at the one-dimensional wave equation for an electric field. The function we are looking for is the electric field E. This depends on the position x and on the time t. Since the function depends on two variables, and their derivatives appear in the equation, it is a partial differential equation. Here we make a product ansatz for the searched solution E. E is equal to r times u. We assume that the solution E can be split into a product of two functions that we call r and u. One function r depends only on x, and the other function u depends only on t. In the wave equation we have a second derivative of E with respect to location x and a second derivative with respect to time t. Differentiating the product ansatz with respect to x yields u times the second derivative of r with respect to x, since u is independent of x and thus acts like a constant. In contrast, in the derivative of the product with respect to time t, the function r acts like a constant because it does not depend on t. The goal now is to separate everything that depends on x from what depends on t. For this, we divide this equation by r times u. Thus we have achieved that everything that depends on x is on the left side, and everything that depends on t is on the right side. If you manage to separate a partial differential equation this way, then the separation ansatz was successful. Now we can vary x on the left side without changing the right side, because there is no x on the right side. The same is true for the time t. If we vary the time on the right side, the left side remains unchanged because there is no time t. Thus both sides must be constant. So let us set the left side and the right side equal to a constant k. Thus we have transformed a partial differential equation into two ordinary differential equations. And the good thing is that the two differential equations are not coupled. That means you can solve them independently and then multiply the solutions like in the product ansatz to get the general solution for the partial differential equation. You can solve the two ordinary differential equations with the exponential ansatz you learned before.