# Heat PDE, Robin Problem, u(0,t)=0, u_x(1,t)+u(1,t)=0, f(x)=x(1-x) # Example 3.6-3, Asmar 2nd edition # Find the eigenvalues of the Sturm-Liouville BVP h:=mu->tan(mu)+mu; plot({tan(x),-x},x=0..20,y=-20..1,discont=true); d:=0.1;guess:=[seq((2*n+1)*Pi/2+d,n=0..10)]; for j from 1 to nops(guess) do mu[j]:=fsolve(h(mu)=0,mu=guess[j]); od; # Find generalized Fourier coefficients f:=x->x*(1-x); for j from 1 to nops(guess) do c[j]:=int(f(x)*sin(mu[j]*x),x=0..1)/int(sin(mu[j]*x)^2,x=0..1); od;