____________________________________________________________________________________
Added March 13, 2019.
Solve for
Where
Mathematica ✗
ClearAll[a, b, A, B, theta, x, y, u]; pde = D[u[x, y], {x, 2}]/A + D[u[x, y], {y, 2}]/B == -2*theta; bc = {u[x, -b] == 0, u[x, b] == 0, u[-a, y] == 0, u[a, y] == 0}; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}], 60*10]];
Maple ✗
x:='x'; y:='y'; u:='u';A:='A';B:='B';theta:='theta';a:='a';b:='b'; pde:=diff(u(x,y),x$2)/A+diff(u(x,y),y$2)/B=-2*theta; bc:=u(x,-b)=0, u(x,b)=0, u(-a,y)=0, u(a,y)=0; cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y))),output='realtime'));
Hand solution
solve
Where
To simplify solution, shift the rectangle so its lower left corner on the origin. Let
And the pde becomes
Hence the PDE to solve is
Using eigenfunction expansion method. Let
Substituting (1) into the PDE
But
Hence (1A) becomes
Case
When
Case
When
Therefore the final solution from (1A) becomes
Where
____________________________________________________________________________________
Taken from Mathematica DSolve help pages.
Solve for
Boundary conditions
Mathematica ✓
ClearAll[u, x, y]; pde = Laplacian[u[x, y], {x, y}] == 6*x - 6*y; bc = {u[x, 0] == 1 + 11*x + x^3, u[x, 2] == -7 + 11*x + x^3, u[0, y] == 1 - y^3, u[4, y] == 109 - y^3}; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}], 60*10]];