> 
restart:with(linalg):with(LinearAlgebra):with(orthopoly):Digits:=40:
M:=3:
N:=2:
l:=2:
for m from 0 to M1 do
L[m]:=unapply(P(m,t),t);
end do:
for n from 1 to N do;
for m from 0 to M1 do;
BB[n,m]:=unapply(piecewise((n1)/N<=t and t<n/N, sqrt(N*(2*m+1))*L[m](2*N*t2*n+1)),t);
end do:
end do:
##############################################
B:=Vector(N*M,1,[seq(seq(BB[n,m](t),m=0..M1),n=1..N)]):
BS:=Vector(N*M,1,[seq(seq(BB[n,m](s),m=0..M1),n=1..N)]):
f[1]:=unapply((23/35)*t,t):
f[2]:=unapply((11/12)*t,t):
P[1]:=evalf(Vector(N*M,1,[seq(seq(int((23/35)*t*BB[n,m](t),t=0..1,t=0..1),m=0..M1),n=1..N)])):
P[2]:=evalf(Vector(N*M,1,[seq(seq(int((11/12)*t*BB[n,m](t),t=0..1,t=0..1),m=0..M1),n=1..N)])):
p[1]:=Transpose(P[1]):P[1]^+:
p[2]:=Transpose(P[2]):P[2]^+:

> 
#############################################
k:=Matrix(2,2,[[t*s^2,t*s^2],[s*t^2,s*t^2]]):

> 
######################################

> 
for i from 1 to 2 do;
for j from 1 to 2 do;
T[i,j]:=Matrix(N*M,N*M):
for n from 1 to M*N do;
for m from 1 to M*N do;
T[i,j](n,m):=evalf(int(int(B[n]*k(i,j)*BS[m],t=0..1),s=0..1)):
end do:
end do:
od:
od:
evalm(T[1,1]):
evalm(T[1,2]):
evalm(T[2,1]):
evalm(T[2,2]):

> 
##########################################
X[1]:=Matrix(M*N,1):
for n from 1 to M*N do;
X[1](n,1):=Y[n,1]:
od:
evalm(X[1]):
#### yadet bashe k dar in mesal majhulat y1,y2
####ba bordarhaye X1, X2 neshun dadi...darvaghe
####dar mesale avale maghale 2ta y dashti k bayad moadele ash ro hal mikardi...

> 
X[2]:=Matrix(M*N,1):
for n from 1 to M*N do;
X[2](n,1):=yY[n,1]:
od:
evalm(X[2]):

> 
U[1,1]:=Matrix(M*N,1):
for n from 1 to M*N do;
U[1,1](n,1):=u[n,1]:
od:
evalm(U[1,1]):

> 
U[1,2]:=Matrix(M*N,1):
for n from 1 to M*N do;
U[1,2](n,1):=uU[n,1]:
od:

> 
evalm(U[1,2]):
Transpose(U[1,2]):

> 
U[2,1]:=Matrix(N*M,1):
for n from 1 to M*N do;
U[2,1](n,1):=w[n,1]:
od:
evalm(U[2,1]):

> 
U[2,2]:=Matrix(M*N,1):
for n from 1 to M*N do;
U[2,2](n,1):=wW[n,1]:
od:
evalm(U[2,2]):

> 
z[1]:=Matrix(1,M*N):
z[2]:=Matrix(1,M*N):
for i from 1 to 2 do;
Z[i]:=Transpose(A)add(Transpose(U[i,j]).T[i,j], j=1..2);
evalm(Z[i]):
z[i]:=Z[i]convert(p[i],Matrix):
od:
evalm(z[1]):
##############
z[1](1,2):

> 
##########################################
for s from 1 to M*N do;
t:=((2*s)1)/(2*M*N);
ff[1,1]:=eval(VectorMatrixMultiply(Transpose(X[1]),eval(B,t=((2*s)1)/(2*M*N))));
F[1,s]:=multiply(ff[1,1],ff[1,1]);
expand(%):
H[1,s]:=VectorMatrixMultiply(Transpose(U[1,1]),eval(B,t=((2*s)1)/(2*M*N)));
hh[1,s]:=F[1,s]H[1,s][1];
od:

> 
for s from 1 to M*N do;
t:=((2*s)1)/(2*M*N);
ff[2,1]:=eval(VectorMatrixMultiply(Transpose(X[1]),eval(B,t=((2*s)1)/(2*M*N))));
G[1,s]:=multiply(ff[2,1],ff[2,1]);
expand(%):
J[1,s]:=VectorMatrixMultiply(Transpose(U[2,1]),eval(B,t=((2*s)1)/(2*M*N)));
JJ[1,s]:=G[1,s]J[1,s][1];
od:
JJ[1,1]:
JJ[1,2]:

> 
for s from 1 to M*N do;
t:=((2*s)1)/(2*M*N);
ff[1,2]:=eval(VectorMatrixMultiply(Transpose(X[2]),eval(B,t=((2*s)1)/(2*M*N))));
GG[1,s]:=multiply(ff[1,2],ff[1,2]);
expand(%):
g[1,s]:=VectorMatrixMultiply(Transpose(U[1,2]),eval(B,t=((2*s)1)/(2*M*N)));
gg[1,s]:=GG[1,s]g[1,s][1];
od:
gg[1,1]:
gg[1,2]:

> 
for s from 1 to M*N do;
t:=((2*s)1)/(2*M*N);
ff[2,2]:=eval(VectorMatrixMultiply(Transpose(X[2]),eval(B,t=((2*s)1)/(2*M*N))));
DD[1,s]:=multiply(ff[2,2],ff[2,2]);
expand(%):
d[1,s]:=VectorMatrixMultiply(Transpose(U[2,2]),eval(B,t=((2*s)1)/(2*M*N)));
dd[1,s]:=DD[1,s]d[1,s][1];
od:
dd[1,1]:
dd[1,2]:

> 
eqq[1]:=seq(hh[1,s],s=1..M*N):

> 
eqq[2]:=seq(gg[1,s],s=1..M*N):

> 
eqq[3]:=seq(JJ[1,s],s=1..M*N):

> 
eqq[4]:=seq(dd[1,s],s=1..M*N):
eqq[5]:=seq(z[1](1,s),s=1..M*N):
eqq[6]:=seq(z[2](1,s),s=1..M*N):

> 
eq:=seq(eqq[s],s=1..M*N):

> 
var[1]:=seq(X[1](s,1),s=1..M*N):
var[2]:=seq(X[2](s,1),s=1..M*N):
var[3]:=seq(U[1,1](s,1),s=1..M*N):
var[4]:=seq(U[1,2](s,1),s=1..M*N):
var[5]:=seq(U[2,1](s,1),s=1..M*N):
var[6]:=seq(U[2,2](s,1),s=1..M*N):

> 
for i to 6 do
EQ(6*i5,1):=hh[1,i];
EQ(6*i4,1):=gg[1,i];
EQ(6*i3,1):=JJ[1,i];
EQ(6*i2,1):=dd[1,i];
EQ(6*i1,1):=z[1](1,i);
EQ(6*i,1):=z[2](1,i);
od:


(1) 
> 

> 

> 
Var:=[seq](var[s],s=1..M*N);


(2) 
> 

> 

> 

> 
for i to 36 do
EQQ[i]:=simplify(expand(subs([seq](indets(EQ)[i]=AA[i],i=1..36),EQ[i][1])=0));
od;


(3) 
> 
fsolve({seq}(EQQ[i],i=1..36),{seq}(AA[i],i=1..36));


(4) 
> 

