Steady-State Heat Equation
> lap_pde:=diff(u(x,y),x$2) = - diff(u(x,y), y$2);
We try to solve this by separating the variables:
> eval(subs(u(x,y)=F(x)*G(y),lap_pde));
> separated:=simplify(%/(F(x)*G(y)));
The equation above yields two ordinary differential equations:
>
> xeq:=lhs(separated)=p^2;
> yeq:=rhs(separated)=p^2;
> FDE:=lhs(xeq)*F(x)=rhs(xeq)*F(x);
> GDE:=lhs(yeq)*G(y)=rhs(yeq)*G(y);
Their solutions are:
> ff:=rhs(dsolve(FDE,F(x)));
> gg:=rhs(dsolve(GDE,G(y)));
Initial values for G are: G(0) = G(12) = 0. These yield C2 = 0 (in gg) and p = n Pi / 12.
Initial value for F: F(0) = 0, which implies that C2 = 0 (in ff).
The solution of the whole equation is therefore of the form:
> uu:=subs(_C1=B[n],_C2=0,p=n*Pi/12,ff)*subs(_C1=1,_C2=0,p=n*Pi/12,gg);
> u:=sum(uu,n=1..infinity);
The coefficients B_n are obtained from the last initial condition u(x,12)=100, formally by multiplying the condition by sin(n Pi x / 12)
and integrating that from 0 to 12. This results in:
> B[n]:=2/(12*sinh(n*Pi)) * Int(100*sin(n*Pi*x/12),x=0..12);
> value(B[n]);
>