Hi everybody, I want to find an analytic solution for the 2-D Laplace equation in a rectangular domain. I’ve already found a numeric solution and I want to compare it with this one. I tried unsuccessfully to find a particular solution with DSolve and DSolveValue in the boundary conditions. I can only find the general solution for the PDE in C[1] and C[2]. I tried also to set up a system with boundary conditions and to Solve that in C[1],C[2] with no success. Could someone help me please? Thank you in advance.
Here’s my trial codes:
Clear["Global`*"];
Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"];
DSolveValue[{D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0,
u[x, 0] == 0, u[x, 20] == 2, u[0, y] == 0, u[20, y] == 1}, {u[x, y],
u[x, y]}, {x, y}]
Clear["Global`*"];
Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"];
DSolveValue[{D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0,
u[x, 0] == 0, u[x, 20] == 2, u[0, y] == 0, u[20, y] == 1}, {u[x, y],
u[x, y]}, {x, y}]
Clear["Global`*"];
LaplaceEquation2D = {D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0}
DSolve[LaplaceEquation2D, {u[x, y], u[x, y]}, {x, y}]
Solve[{C[1][I x + 0] + C[2][-I x + 0] == 0,
C[1][I x + 20] + C[2][-I x + 20] == 2,
C[1][I 0 + y] + C[2][-I 0 + y] == 0,
C[1][I 20 + y] + C[2][-I 20 + y] == 1}, {C[1], C[2]}]
Regards,
Filippo

