# vector – Resolution of the Laplace equation in spherical coordinates

I was trying to solve Laplace's equation for a spherical capacitor, which is not difficult to hand, just to understand the controls so that I could possibly try something more complicated. Then I got in trouble.

I've tried using spherical coordinates, and I've had a non-real, or sometimes nil, response error.

``````leqn = (laplacian[V[r,[Theta][Phi]], {r, [Theta][Phi]}, "Spherical"]== 0 // Simplify)
a = 1; b = 10;
NDSolveValue[{LeqnV[a[{LeqnV[at[{leqnV[une[{leqnV[a[Theta][Phi]]== 1, V[B[B[b[b[Theta][Phi]]== 0}, V, {r, a, b}, {[Theta], 0, [Pi]}, {[Phi], 0.2 *[Pi]}]
``````

So I thought I would try Cartesian coordinates to understand my mistake; it worked:

``````a = 1; b = 5
NDSolveValue[{Laplacian[u[x,y], {x, y}]== 0,
DirichletCondition[u[x,y] == 1, Sqrt[x^2+y^2] == a],
DirichletCondition[u[x,y] == 0, Sqrt[x^2+y^2] == b]}, u, {x, y} [Element]annulus[{0,0},{a,b}]]Plot3D[%[x, y], {x, y} [Element] annulus[{0,0},{a,b}]]
``````

But if I try to be a little more explicit about the boundary conditions, it stops working:

``````a = 1; b = 5
NDSolveValue[{Laplacian[u[x,y], {x, y}]== 0,
you[x,y] == Si[Norm[{x,y}]== a, 1],
DirichletCondition[u[x,y] == 0, Sqrt[x^2+y^2] == b]}, u, {x, y} [Element]annulus[{0,0},{a,b}]]Plot3D[%[x, y], {x, y} [Element] annulus[{0,0},{a,b}]]
``````

Whatever it is, I still do not understand why the explicit form of the boundary condition does not work.

Moreover, I do not see why the polar version did not work.

Posted on