Solving the Laplace Equation in 2D with NDSolve

Dear community members,

I am trying to solve the Laplace equation in cylindrical coordinates using NDSolve. (By the way, I am aware that there is an analytical solution for this problem in terms of Fourier-Bessel series, but I thought this is a good opportunity to see how Mathematica handles such problems.) In the attached file you can see how I tried to do it. I checked and double-checked my code but I cannot find the source of my error. Neither of the two error messages make any sense to me.
(Error message #1: “the system is overdetermined”… I don’t see why.)
(Error message #2: “NDSolve is not a replacement rule etc”… That is probably because this line was not executed in the first place.)

Can anybody tell me where I go astray?

Thanks in advance,
René Samson

I am not expert in PDE, but I wonder if Mathematica can handle numerical PDEs on unbounded domains.

I would rewrite the deffinition of the function c0 with Piecewise, instead of If.

Have you tried solving a simpler version of your problem?

Dear Gianluca, dear Frank, gents,

You were both “spot-on”.

  1. The unboundedness of the domain was the problem.
  2. And I would quickly have found that out if I had simplified the problem.
    For your entertainment I enclose the “corrected” Notebook, which shows that if I replace the upper limit by a large number, Mathematica finds the solution without any problems.

Thanks for your swift reactions,
René Samson