___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Taken from Mathematica DSolve help pages.
Solve for \(u\left ( x,y\right ) \)
Boundary conditions
Mathematica ✓
ClearAll["Global`*"]; pde = {Laplacian[u[x, y], {x, y}] + 5*u[x, y] == 0}; bc = {u[x, 0] == Piecewise[{{-1 + x, x > 1 && x < 2}, {3 - x, x > 2 && x < 3}}], u[x, 2] == 0, u[0, y] == 0, u[4, y] == 0}; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}], 60*10]]; sol = sol /. K[1] -> n
Maple ✓
restart; pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)+5*u(x,y)=0; bc := u(x,0)=piecewise( x>1 and x<2, -1+x,x>2 and x<3 ,3-x), u(x,2)=0, u(0,y)=0, u(4,y)=0; cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y))),output='realtime'));
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Added December 27, 2018.
Solve for \(u\left ( x,y\right ) \)
Mathematica ✓
ClearAll["Global`*"]; pde = {Laplacian[u[x, y], {x, y}] + 5*u[x, y] == 0}; sol = AbsoluteTiming[TimeConstrained[DSolve[pde, u[x, y], {x, y}], 60*10]];
Maple ✓
restart; pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)+5*u(x,y)=0; cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,u(x,y),'build')),output='realtime'));
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Added December 20, 2018.
Example 24, taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018
Solve for \(u\left ( x,y\right ) \)
With \(k>0\). It is called reduced Helmholtz, because of the minus sign above. Otherwise, standard Helmholtz has a positive sign.
Boundary conditions
Mathematica ✓
ClearAll["Global`*"]; pde = Laplacian[u[x, y], {x, y}] - k*u[x, y] == 0; bc = {u[x, 0] == 0, u[x, Pi] == 0, u[0, y] == 1, u[Pi, y] == 0}; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> k > 0], 60*10]];
Maple ✓
restart; pde := diff(u(x, y), x$2)+diff(u(x, y), y$2)-k*u(x, y) = 0; bc_left_edge:=u(0, y) = 1; bc_lower_edge:=u(x, 0) = 0; bc_top_edge:=u(x,Pi)=0; bc_right_edge:=u(Pi,y)=0; bc:=bc_left_edge,bc_lower_edge,bc_top_edge,bc_right_edge; cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc ], u(x, y)) assuming k>0),output='realtime'));