# A Laplace Eq. in Cylindrical coordinates

1. May 22, 2017

### chimay

Hi,
I need to solve Laplace equation:$\nabla ^2 \Phi(x,r)=0$ in cylindrical domain $0<r<r_0$, $0<x<L$ and $0<\phi<2\pi$. The boundary conditions are the following ones:
\left\{ \begin{aligned} &C_{di}\Phi(x,r_0)=\epsilon \frac{\partial \Phi(x,r)}{\partial r}\rvert_{r=r_0} \\ &\Phi(0,r)=f_1(r) \\ &\Phi(L,r)=f_2(r) \end{aligned} \right.
$\epsilon$ being the dielectric constant of the medium and $C_{di}$ a constant capacitance; $f_1$ and $f_2$ are two known function.
Forcing no $\phi$ dependence, and solving the equation by separation of variable:
$\Phi(x,r)=(Ae^{\lambda x/r_0}+Be^{-\lambda x/r_0})J_0(\lambda r/r_0)$
$\lambda$ being the separation constant and $J_0$ the first type Bessel function of 0-order.
By applying the first boundary condition:
$\lambda \frac{J_1(\lambda)}{J_0(\lambda)}=C_r$
$C_r=r_0 C_{di}/\epsilon$
which can be solved to compute all the values of $\lambda$.
By applying the remaining boundary conditions, I obtain the following set of equations:
\left\{ \begin{aligned} &\sum_{m=1}^{\infty} (A_m+B_m)J_0(\lambda_m r/r_0)=f_1(r) \\ &\sum_{m=1}^{\infty} (A_m e^{\lambda_m L/r_0}+B_m e^{-\lambda_m L/r_0})J_0(\lambda_m r/r_0)=f_2(r) \\ \end{aligned} \right.
which allow me to compute the values of all the coefficients, by exploiting the orthogonality between differently scaled Bessel functions:
\left\{ \begin{aligned} &A_i=\frac{1}{(2\sinh{\lambda_i L/r_0})(\frac{1}{2}{J_1(\lambda_i)}^2)}(I_2-I_1 e^{-\lambda_i L/r_0}) \\ &B_i=\frac{1}{(2\sinh{\lambda_i L/r_0})(\frac{1}{2}{J_1(\lambda_i)}^2)}(I_1e^{\lambda_i L/r_0}-I_1) \\ \end{aligned} \right.
$I=\int_0^1 \frac{r}{r_0} f(r) J_0(\lambda_i r/r_0) d(\frac{r}{r_0})$

Now the point that is driving me crazy is the following: how do you expect $A_i$ and $B_i$ to change as a function of the order $i$? I expect them to decrease in modulus; indeed, this is the case for $A_i$, but $B_i$ presents a strange behaviour, oscillating in sign and increasing in modulus. Can you see any mistake? If you want, I can provide you with all the mathematical passages that I omitted for brevity, the trends of $A_i$ and $B_i$ or show you whatever plot you may need. Any suggestion is really appreciated here.

Thank you all.

2. May 23, 2017

I spotted one algebraic mistake I believe: On $B_i$, the last $-I_1$ should be $-I_2$. I didn't check every other detail, but the rest of it looks like it might be correct. $\\$ Editing: A little further reading on the Bessel functions shows that for the functions to be orthogonal, I believe it requires $J_o(\lambda_m)=0$. I'm not sure that your functions meet this condition. $\\$ Additional editing: From what I googled on the subject, you may need to also use $J_n$ of all orders in your series rather than limiting it to $J_o$.

Last edited: May 23, 2017
3. May 24, 2017

### chimay

The algebraic mistake s a transcription error; in my implementation $I_2$ correctly takes the place of $I_1$.

I am not very strong on Bessel equation and I completely forgot the condition you pointed me out!
Can you clarify your second comment? Do you mean:
\left\{ \begin{aligned} &\sum_{m=1}^{\infty} (A_m+B_m)J_m(\lambda_m r/r_0)=f_1(r) \\ &\sum_{m=1}^{\infty} (A_m e^{\lambda_m L/r_0}+B_m e^{-\lambda_m L/r_0})J_m(\lambda_m r/r_0)=f_2(r) \\ \end{aligned} \right.
?

Thank you a lot, your help is really really appreciated.

4. May 24, 2017

### Orodruin

Staff Emeritus
This is not correct. Any homogeneous boundary condition, be it of Dirichlet, Neumann, or Robin type, will do. Each of the choices results in a Sturm-Liouville problem.

This would be true if the problem was not rotationally symmetric. As it stands, the rotational symmetry directly implies that only the $n = 0$ terms are of relevance.

5. May 24, 2017

### chimay

6. May 24, 2017

### Orodruin

Staff Emeritus
7. May 24, 2017

### Orodruin

Staff Emeritus
I did not check your arithmetics, but let me point out that it is significantly simpler to use $C \cosh(\lambda x/r_0) + D \sinh(\lambda x/r_0)$ for the $x$-dependent part, since the boundary condition at $x = 0$ will give you one of the constants directly. You should find that both $C$ and $D$ are decrease sufficiently fast with $m$ as long as $I_1$ and $I_2$ do (which they should if $f_1$ and $f_2$ are in the correct Hilbert space).

8. May 24, 2017

### chimay

I do not get how I can compute both constants if I cannot exploit orthogonality. Could you help me with this too?
Thank you very much.

9. May 24, 2017

### Orodruin

Staff Emeritus
Also note that it is not necessarily a problem that the coefficients increase in modulus. The norm of the basis functions $J_0(\lambda_m r/r_0)$ is not constant.

What do you mean? I just told you you can exploit orthogonality - it is a Sturm-Liouville problem!

10. May 24, 2017

### chimay

As I mentioned before, I am very weak on this topic. Is this correct?

In general
$\int_0^1 x J_0(\lambda_m x)J_0(\lambda_i x)=\frac{{J^{'}_0(\lambda_m)}J_0(\lambda_i)-J_0(\lambda_m){J^{'}_0(\lambda_i)}}{{\lambda_i}^2-{\lambda_m}^2}$
In my case, since
$\lambda \frac{J_1(\lambda)}{J_0(\lambda)}=C_r$
I can write
$J^{'}_0(\lambda_m)=-J_1(\lambda_m)=-J_0(\lambda_m) \frac{C_r}{\lambda_m}$
and
$J^{'}_0(\lambda_i)=-J_1(\lambda_i)=-J_0(\lambda_i) \frac{C_r}{\lambda_m}$
and so
$\int_0^1 x J_0(\lambda_m x)J_0(\lambda_i x)=\frac{{J^{'}_0(\lambda_m)}J_0(\lambda_i)-J_0(\lambda_m){J^{'}_0(\lambda_i)}}{{\lambda_i}^2-{\lambda_m}^2}=0$
So I can exploit orthogonality even if $\lambda$ are not zeros of $J_0$.
If this is true, my calculations are correct, and I cannot explain the strange behaviour of the constants I depicted before...

Last edited: May 24, 2017
11. May 24, 2017

### chimay

I tried to sum numerically the first 16 values of $A_i+B_i$ and I am very far from fitting the boundary condition in $x=0$ and $x=L$.
Also, $\sum_i^n B_i$ seems to increase with $n$.

12. May 24, 2017

### Orodruin

Staff Emeritus
As I said, your basis functions do not have constant norm so there is no a priori reason to expect the coefficients to decrease. Without knowing more of the functions $f_i$, I don't know what more I can say about this.

Yes, this is correct. The orthogonality follows from the $\lambda$ being such that the Robin boundary condition is satisfied.

13. May 24, 2017

### chimay

These are the remaining functions:

$f_1=\Phi_1-\Phi_0(r)$ and $f_2=\Phi_2-\Phi_0(r)$,
$\Phi_0(r)=V-k_a \log(\frac{k_b}{{(4k_b-r^2)}^2}k_c)$
where $V$ and $k_{a,b,c}$ are some constants.

Can you guess any $A_i$ and $B_i$ behaviour?
I am starting to think there is some hidden mistake in my implementation.

Thank you a lot!

14. May 24, 2017

### Orodruin

Staff Emeritus
What are the possible values of $k_b$?

15. May 24, 2017

### chimay

$k_b$ is the solution of another equation.
Do you mean numerical values ?

16. May 24, 2017

### Orodruin

Staff Emeritus
I am just trying to figure out if that function is square integrable or not. Without looking at it in detail I am not sure I can help you. A suggestion would be to try to see what happens with your expressions in some cases (different fs) where you know the solutions to check your implementation.

17. May 24, 2017

### chimay

I will take another look tomorrow in the morning. Anyway, my approach should be correct, and the equations for $A_i$ and $B_i$ in the first post should be valid...right?

18. May 28, 2017

### chimay

Hi,
I may have found one tricky point. Can someone tell me the result of $\int_0^1 x J_0(\lambda_m x)J_0(\lambda_i x)$ when $\lambda_m=\lambda_i$ and $\lambda_i$ is not a zero of the Bessel function?
Edit:
I have finally found the mistake. I used the following relation:
$\int_0^1 x J_0^2(\lambda x) dx=\frac{1}{2}J_1^2(\lambda)$
but when $\lambda$ is not a zero of $J_0$, like in my case, this holds:
$\int_0^1 x J_0^2(\lambda x) dx=\frac{1}{2} (J_0^2(\lambda)+J_1^2(\lambda))$.
By using the correct relation I find $B_i$ to descrease...

Last edited: May 28, 2017
19. Jun 5, 2017

### chimay

Hi,
since you helped me so much in my previous doubt, I would like to make another question about Bessel functions.
Assume that my boudary condition is expressed like this:
$\sum_{m=1}^{\infty} A_m J_0(\lambda_m r/r_0) + B_m Y_0(\lambda_m r/r_0)=C$
$C$ being a certain constant and $Y$ second type Bessel function.
How can I proceed to obtain a relation between $A_m$ and $B_m$ now, following a similar path as before?

Thank you

20. Jun 5, 2017

### Orodruin

Staff Emeritus
The same way as before. First you need to find the appropriate boundary conditions so that you can find what combination of Bessel functions form a complete basis on the domain of interest.

21. Jun 5, 2017