## 260 Reputation

10 years, 164 days

## Social Networks and Content at Maplesoft.com

PH.D in Applied Mathematics

## Thanks...

Hi. ok...it is completely true and coincide with manual computation...thanks a lot, hope you and all mapleprimes nice times.

## ThanksHi Dear Thanks A Lot For Your Nic...

Hi Dear

Thanks A Lot For Your Nice And Astute Guides. Hope you To Have Healthy And Success In All Of Your Life Periods

Best Wishes

Mahmood

Again Hi;

I have wrote following but it seems erroneous:

Bernestien1.mws

Ph.D Candidate

Applied Mathematics Department

## hint...

hi
thanks a lot

yes. you are right. it is exactly my problem. i will be grateful if you guide me to solve it.

Ok. very thanks

## thanks and another question...

Dear Kitonum

Hi. thanks a lot for your nice, rapid and comprehensive answers. I have another question(sorry for consuming your valuable times)

If we have:

(Tau is a constant number)
then: can we find L and Z matrices using maple? i have found it manualy but for large M and N this procedure is longsome.

Best Wishes

## another question...

@Kitonum
Dears

I have the following segment of program(with the help of Kitonum):

restart;
> with(plots):
> with(LinearAlgebra):
> with(linalg):
>
>
> f1:=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0]:
> f2:=[0,0,1/16,0,0,0,9/100,3/20,1/16,0,0,0,9/25,3/10,1/16,0,0,0,81/100,9/20,1/16,0,0,0]:
> a0:=Transpose(Matrix(1,6,0)):
> a00:=Transpose(Matrix(5,6,0)):
> a1:=Matrix(6,shape=zero):
> a2:=Matrix(6,shape=identity):
> A0:=Matrix(6,shape=zero):
>
> Dtau:=blockmatrix(4,5,[a0,a2,a1,a1,a00,a0,a1,a2,a1,a00,a0,a1,a1,a1,a00,a0,a1,a1,a1,a00]):
> f:=f1+f2:
> I24:=Matrix(24,shape=identity):
> H1:=Matrix(6):
> for i from 1 to 6 do
> for j from 1 to 1 do
> H1[i,j]:=1/i;
> od:
> od:
>
> H:=(1/4).H1:
> E1:=Matrix(6):
>
> for j from 1 to 6 do
> for i from 1 to 6 do
> if j-i=1 and i<j then
> E1[i,j]:=(j-i)/i;
> fi;
> od:
> od:
> E:=E1:
> P:=blockmatrix(4,4,[E,H,H,H,A0,E,H,H,A0,A0,E,H,A0,A0,A0,E]):
> evalm(Dtau.P):
> K1:=linalg['inverse']( I24-Dtau&*P):
> C:=evalm(f.K1);

(\$\$\$\$)  C := vector([1, 0, 9/16, 0, 9/64, 0, 16077/12800, 3/20, 17677/25600, 1/20, 17677/102400, 1/100, 4296787/2457600, 31/100, 1/16, 0, 0, 0, 5408851/2457600, 9/20, 1/16, 0, 0, 0])

> HybrFunc:=proc(N, M, tj)

> local T, n, m;
>
> global b;
>
> for n from 1 to N do
>
> for m from 0 to M-1 do
>
> T[m]:=t->t^m;
>
> b[n,m]:=unapply(piecewise(t>=(n-1)*tj/N and t<n*tj/N, T[m](N*t-(n-1)*tj), 0), t);
>
> od; od;
>
> Array(1..N, 0..M-1, (n,m)->b[n,m](t));
>
> end proc:
>
>
>
> HybrFunc(4,6, 1):
>
> for j from 0 to 5 do
>
> seq('b'[i,j]=b[i,j](t), i=1..4);
>
> od:
> for j from 0 to 5 do
>
> seq('b'[i,j]=b[i,j](t), i=1..4);
>
> od:

now i want to have  "F:=add(add(c[i,j]*b[i,j](t),j=0..5),i=1..4);" where c[i,j] should be the C's component as C=[C1,0,C1,1,C1,2,....,C4,0,C4,1,...,C4,5] ( C is marked with (\$\$\$\$) above)

Note that every b[i,j] corresponds to its private c[i,j] namely we should have: c1,0b[1,0]+c1,1b[1,1]+...+c4,5b[4,5]
thanks a lot for your attentions

## thanks...

@Kitonum
Hi. Ok that is completely right. thanks a lot.

## correction...

Dear Kitonum

unfortunately i have forgotten to mention about t_j. it is a number which indicates final time and for example with N=4 and M=3 we should have:

namely 12 functions in 4 suninterval(Here t_f or final time is 1). your program seems to be alittle wrong???isn't it?

## Question 2...

Hi and thanks again.  a[k]^`*`is  just a notation to indicate something different from a[k] like b[k] or c[k],etc.

furthermore your suggested command gives the following:

which is not like what i need. but i have made it :

G2:= Matrix(r, (i,j)-> `if`(i+j<=r and j<3, z[i+j+r+1], 0)):

and now it works great...

thanks thanks thanks a lot Dear Carl Love

best wishes;

## question...

Hi and thanks a lot for your remark....but how can i do that? i need the following matrix for it:

Hi. ok sorry for mistake

> restart:
> with(LinearAlgebra):
> macro(LA= LinearAlgebra):
> r:=4:
> z:=Vector[row]([seq(a[i],i=0..r),seq(a[i]^`*`,i=1..r)]):
> Z1:=Matrix(r):
> for i from 1 to r do
> for j from i+1 to r do
> Z1[i,j]:=z[j-i+1]:
> end do:
> end do:
>
> M:=Matrix(Z1,shape=symmetric):
> for i from 1 to r
> do
> for j from 1 to r
> do
> M[i,i]:=2*a[0];
> od;
> od;
>
> Z2:=Matrix(r):
> for i from 1 to r do
> for j from i+1 to r do
> Z2[i,j]:=z[j-i+1+r]:
> end do:
> end do:
>
> N:=Matrix(Z2,shape=antisymmetric):
> G1:=Matrix(r):
> for i from 1 to r-1 do
> for j from 1 to 2 do
> G1[i,j]:=z[i+j+1]:
> end do:
> end do:
> G1[r-1,2]:=0:
>
> G2:=Matrix(r):
> for i from 1 to r-1 do
> for j from 1 to 2 do
> G2[i,j]:=z[i+j+r+1]:
> end do:
> end do:
> G2[r-1,2]:=0:
>
Error, Vector index out of range

> Atild00:= < 2*a[0] >:
> Atild01:= Vector[row]([seq(a[i],i=1..r)]):
> Atild02:= Vector[row]([seq(a[i]^`*`,i=1..r)]):
> Atild10:= Transpose(Atild01):
> Atild20:= Transpose(Atild02):
> Atild1:=M:
> Atild2:= N:
> Atild3:= -N:
> Atild4:= copy(M):
>
> ATild1:= < < Atild00 | Atild01 | Atild02 >,
> < Atild10 | Atild1 | Atild2 >,
> < Atild20 | Atild3 | Atild4 > >:
>
> atild00:= < 0 >:
> atild01:= Vector[row]([seq(a[i],i=1..r)]):
> atild02:= Vector[row]([seq(a[i]^`*`,i=1..r)]):
> atild10:= Transpose(Vector[row]([seq(0,i=1..r)])):
> atild20:= Transpose(Vector[row]([seq(0,i=1..r)])):
> atild1:=G1:
> atild2:= G2:
> atild3:= G2:
> atild4:= -G1:
>
> ATild2:= < < atild00 | atild01 | atild02 >,
> < atild10 | atild1 | atild2 >,
> < atild20 | atild3 | atild4 > >:
>
> A:=evalm((1/2)*(ATild1+ATild2)):
>

Nahaee.mws

## Thanks and Question> restart: > with(Lin...

Hi. thanks a lot for your program. I have applied both programs for r=4 but the results are diffrent:

My program:

> restart:
> with(LinearAlgebra):
> macro(LA= LinearAlgebra):
> r:=4:
> z:=Vector[row]([seq(a[i],i=0..r),seq(a[i]^`*`,i=1..r)]):
> Z1:=Matrix(r):
> for i from 1 to r do
> for j from i+1 to r do
> Z1[i,j]:=z[j-i+1]:
> end do:
> end do:
>
> M:=Matrix(Z1,shape=symmetric):
> for i from 1 to r
> do
> for j from 1 to r
> do
> M[i,i]:=2*a[0];
> od;
> od;
>
> Z2:=Matrix(r):
> for i from 1 to r do
> for j from i+1 to r do
> Z2[i,j]:=z[j-i+1+r]:
> end do:
> end do:
>
> N:=Matrix(Z2,shape=antisymmetric):
> G1:=Matrix(r):
> for i from 1 to r-1 do
> for j from 1 to 2 do
> G1[i,j]:=z[i+j+1]:
> end do:
> end do:
> G1[r-1,2]:=0:
>
> G2:=Matrix(r):
> for i from 1 to r-1 do
> for j from 1 to 2 do
> G2[i,j]:=z[i+j+r+1]:
> end do:
> end do:
> G2[r-1,2]:=0:
>
Error, Vector index out of range

> Atild00:= < 2*a[0] >:
> Atild01:= Vector[row]([seq(a[i],i=1..r)]):
> Atild02:= Vector[row]([seq(a[i]^`*`,i=1..r)]):
> Atild10:= Transpose(Atild01):
> Atild20:= Transpose(Atild02):
> Atild1:=M:
> Atild2:= N:
> Atild3:= -N:
> Atild4:= copy(M):
>
> ATild1:= < < Atild00 | Atild01 | Atild02 >,
> < Atild10 | Atild1 | Atild2 >,
> < Atild20 | Atild3 | Atild4 > >:
>
> atild00:= < 0 >:
> atild01:= Vector[row]([seq(a[i],i=1..r)]):
> atild02:= Vector[row]([seq(a[i]^`*`,i=1..r)]):
> atild10:= Transpose(Vector[row]([seq(0,i=1..r)])):
> atild20:= Transpose(Vector[row]([seq(0,i=1..r)])):
> atild1:=G1:
> atild2:= G2:
> atild3:= G2:
> atild4:= -G1:
>
> ATild2:= < < atild00 | atild01 | atild02 >,
> < atild10 | atild1 | atild2 >,
> < atild20 | atild3 | atild4 > >:
>
> A:=evalm((1/2)*(ATild1+ATild2)):

Please execute the lastest line to view the results.

## A solution...

I have wrote the following program. what is your opinion?

Nahaee.mws

## Details...

Dear mehdi;

i only have the following relations:

 1 2 3 4 5 Page 4 of 5
﻿