Question: pdsolve for 2D Laplace's equation

I'm trying to analytically solve for a Laplace's equation in a unit square with the following BCs: u(x,0) = 0, u(y,0) = 0, u(1,y) = 0, u(x,1) = 1

The series solution to this problem is well-known, where u(x,y) is solved with separation of variables to obtain u in terms of sin and sinh series.

I try to recreate the solution with pdsolve but am stuck with it.

My attempt:

 

lap2d := diff(u(x,y), x, x) + diff(u(x,y), y, y) = 0

sol := pdsolve(lap2d, HINT = X(x)*Y(y), build)  % saw this in mapleprimes

With this I managed to get an expression for u(x,y). My trouble is with the coefficients: _C1, _C2, _C3, _C4, _c_1

_C1 .. _C4 are clearly from integrations, but I am not clear about _c_1?

To solve for the constants of integrations, I tried to set up simultaneuous equations with the BCs.

For example,

eq1 := eval( rhs(sol), x=0) = 0

Similarly, repeat for the other 3 BCs to get eq2, eq3, eq4

I tried to solve these simultaneous eqns with:

solve({eq1, eq2, eq3, eq4}, {_C1, _C2, _C3, _C4})

but Maple does not output anyting.

Need your advice if this is the right way and I just goofed up with the syntax, or there are better ways to construct the series solution of the problem. Should I use linearsolve to find the C's?

I use Maple 17.

 

Thanks in advance

 

 

Please Wait...