Using separation of variables to solve Laplace's equation without an ansatz

211 Views Asked by At

I'm trying to go ahead and solve Laplace's equation for a potential $V$ using separation of variables. The usual method is to write $V$ as a function of the three coordinates, so $V(x,y,z) = A(x)B(y)C(z)$. Then, we can rewrite $\triangle V = 0$ as:

$$ \frac{1}{A} \frac{d^2A}{dx^2} + \frac{1}{B} \frac{d^2B}{dy^2} + \frac{1}{C} \frac{d^2C}{dx^2} = 0.$$

This part isn't a problem for me. Furthermore, with the boundary conditions present in the problem I'm dealing with, I know the functions $A$ and $B$ will be sinusoidal in nature. The problem is that I'm not quite sure if I can show this without knowing the answer beforehand. The boundary conditions are $V(0,y,z)=V(a,y,z)=V(x,a,z)=V(x,0,z)=V(x,y,0)=0$, and $V(x,y,a)=V_0$. From the equation above, I know that each term must be equal to a constant such that they add up to zero. As such, I impose:

$$k^2_A + k^2_B + k^2_C = 0.$$

What I have in mind here is that some of these constants will come out to be complex. Indeed, if I just look at the function $A$, solving the differential equation gives:

$$ \frac{1}{A} \frac{d^2A}{dx^2} = k^2_A \rightarrow A = A_1 e^{k_A x} + A_2 e^{-k_A x}.$$

Applying the boundary condition $V(0,y,z)=0$ gives:

$$A_1+A_2=0.$$

This gives us $A=A_1 \left(e^{k_A x} - e^{-k_A x} \right)$. Then, the condition $V(a,y,z)=0$ gives:

$$A_1 \left(e^{k_A a} - e^{-k_A a} \right) = 0 \rightarrow k_A = \frac{\pi n}{a} i, \,\,\,\, n=0,\pm 1, \pm 2, \ldots$$

If I substitute this back into my equation for $A(x)$, I get:

$$A(x) = A_1 \left(e^{\frac{\pi n}{a}x} - e^{-\frac{\pi n}{a}x} \right) = A_1 (2i) \sin{\left( \frac{\pi n}{a}x \right)}.$$

My question is simple enough. Am I able to replace the constant $A_1(2i)$ with a new arbitrary constant? The reason I ask is because many of the solutions that I've seen for such a problem involve an "inspired guess" for the constants $k_A$, $k_B$, and $k_C$ such that the two first ones are negative, giving sinusoidal solutions. I see that my method here works, but I'm a little worried about the complex amplitude I get, specifically since this leads to a potential.

One thing that might make everything work out is that, if I follow the same process for $B(y)$, I get another complex amplitude out. Therefore, the product of these amplitudes (which is what I need to do for the full potential) is real. Is this sound reasoning, or do I really have to make an educated guess beforehand to find the solution?

(This was a homework problem, but I already know the answer. I'm more focused on if my method works fine.)