Question: Boundary value problem for the heat equation

Hello!! Please help me,I need to solve a system of linear algebraic equations by running, and I solved the built-in command solve

restart;
with(plots):
f:=unapply(-x^2+1,x);
mu[1]:=unapply(1/(t^2+1),t);
mu[2]:=unapply(1/(t-5),t); 
g:=unapply(t^3-7*x,[t,x]);
l:=2; T:=3;
n:=10: m:=n: 
h:=evalf(l/n); 
tau:=evalf(T/m);
for k from 0 to n do 
x[k]:=h*k:
end do: 
for j from 0 to m do 
t[j]:=tau*j: 
end do:
ss:=evalf({seq(seq((y[k,j+1]-y[k,j])/tau=(y[k-1,j]-2*y[k,j]+y[k+1,j])/h^2+g(t[j],x[k]),k=1..n-1),j=0..m-1),seq(y[0,j]=mu[1](t[j]),j=1..m),seq(y[k,0]=f(x[k]),k=0..n),seq(y[n,j]=mu[2](t[j]),j=1..m)});
#s:=evalf(solve(ss,{seq(seq(y[k,j],k=0..n),j=0..m)}));

 

Please Wait...