MaplePrimes Questions

  here my loop; after  8 iteration maple couldnt solve the equations and give me this error .
Is there any method to garentee that fsolve could work intire the 1000 iteration 
 

 
 
 

Download exp_new_for_alpha_more_than_22.mw
 

with(LinearAlgebra):

f[1] := VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(n, 1/R), sum(x[i], i = 1 .. n)), VectorCalculus:-`-`(sum(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`+`(2, a[i]), x[i]), exp(VectorCalculus:-`*`(R, x[i]))), 1/VectorCalculus:-`+`(VectorCalculus:-`+`(exp(VectorCalculus:-`*`(R, x[i])), -1), Q)), i = 1 .. n))):

f[2] := VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(m, 1/S), sum(y[j], j = 1 .. m)), VectorCalculus:-`-`(sum(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`+`(2, b[j]), y[j]), exp(VectorCalculus:-`*`(y[j], S))), 1/VectorCalculus:-`+`(VectorCalculus:-`+`(exp(VectorCalculus:-`*`(y[j], S)), -1), Q)), j = 1 .. m))):

f[3] := VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`+`(n, m), sum(a[i], i = 1 .. n)), sum(b[j], j = 1 .. m)), 1/Q), VectorCalculus:-`-`(sum(VectorCalculus:-`*`(VectorCalculus:-`+`(2, a[i]), 1/VectorCalculus:-`+`(VectorCalculus:-`+`(exp(VectorCalculus:-`*`(R, x[i])), -1), Q)), i = 1 .. n))), VectorCalculus:-`-`(sum(VectorCalculus:-`*`(VectorCalculus:-`+`(2, b[j]), 1/VectorCalculus:-`+`(VectorCalculus:-`+`(exp(VectorCalculus:-`*`(y[j], S)), -1), Q)), j = 1 .. m))):

NULL

E1[1] := 0.5e-1:

E2[1] := 0.5e-1:

E3[1] := 0.5e-1:

n := 45:

n := 45:

a := [seq(0, i = 1 .. 21), 2, 2, 1, seq(0, i = 1 .. 21)]:

NULL

K := 1000:

for so from 0 to K do W := GenerateUniform(n, 0, 1); for iii to n do vv[iii] := W[iii]^(1/(iii+sum(a[jjj], jjj = n-iii+1 .. n))) end do; for sss to n do uu[sss] := 1-product(vv[n-jjj+1], jjj = 1 .. sss); x[sss] := fsolve(1-3/(exp(.3*t)-(1-3)) = uu[sss], t = 0 .. infinity) end do; U := GenerateUniform(m, 0, 1); for ii to m do v[ii] := U[ii]^(1/(ii+sum(b[jj], jj = m-ii+1 .. m))) end do; for ss to m do u[ss] := 1-product(v[m-jj+1], jj = 1 .. ss); y[ss] := fsolve(1-3/(exp(.1*t)-(1-3)) = u[ss], t = 0 .. infinity) end do; c := describe[quartile[1]]([seq(x[i], i = 1 .. n)]); cc := describe[quartile[3]]([seq(x[i], i = 1 .. n)]); L := describe[quartile[1]]([seq(y[i], i = 1 .. m)]); LL := describe[quartile[3]]([seq(y[i], i = 1 .. m)]); R[1] := fsolve(9*exp(R*c)-exp(R*cc) = 8, R = 0 .. infinity); S[1] := fsolve(9*exp(S*L)-exp(S*LL) = 8, S = 0 .. infinity); Q[1] := 3*(exp(R[1]*c)-1+(exp(S[1]*L)-1))*(1/2); for h to 40 while `and`(`and`(`and`(`and`(`and`(abs(E1[h]) > 0.5e-3, abs(E2[h]) > 0.5e-3), abs(E3[h]) > 0.5e-3), Q[h] > 2), S[h] > 0), R[h] > 0) do Q[h+1] := fsolve(eval(f[3], {R = R[h], S = S[h]}) = 0, Q = 2 .. infinity); R[h+1] := fsolve(eval(f[1], Q = Q[h+1]) = 0, R = 0 .. infinity); S[h+1] := fsolve(eval(f[2], Q = Q[h+1]) = 0, S = 0 .. infinity); KK := Matrix([[R[h]], [S[h]], [Q[h]]]); E1[h+1] := abs(R[h+1]-R[h]); E2[h+1] := abs(S[h+1]-S[h]); E3[h+1] := abs(Q[h+1]-Q[h]) end do; A[so] := Determinant(KK[1]); B[so] := Determinant(KK[2]); C[so] := Determinant(KK[3]); P[so] := simplify(int(A[so]*C[so]^2*exp(A[so]*x)/((exp(A[so]*x)-1+C[so])^2*(exp(B[so]*x)-1+C[so])), x = 0 .. infinity, numeric)) end do

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 2.251942600

 

cc := 6.413093396

 

L := 8.631577783

 

LL := 25.39584518

 

R[1] := .4287243564

 

S[1] := .1043333848

 

Q[1] := 4.630481096

 

A[0] := .4247642181

 

B[0] := .1149899971

 

C[0] := 6.627593396

 

P[0] := .8815279215

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 2.918917328

 

cc := 5.547621812

 

L := 3.857225847

 

LL := 21.10240063

 

R[1] := .8018219086

 

S[1] := 0.5213484487e-1

 

Q[1] := 14.41300577

 

A[1] := .3666457947

 

B[1] := .1191082759

 

C[1] := 3.847329446

 

P[1] := .8226338823

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 2.442365249

 

cc := 7.394009487

 

L := 4.713824874

 

LL := 24.79260797

 

R[1] := .3468711931

 

S[1] := 0.4792653690e-1

 

Q[1] := 2.379817029

 

A[2] := .2337020019

 

B[2] := 0.7824619488e-1

 

C[2] := 2.252708122

 

P[2] := .7880876611

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 1.950620121

 

cc := 7.490968154

 

L := 7.989340649

 

LL := 22.40840798

 

R[1] := .2570696142

 

S[1] := .1248268277

 

Q[1] := 3.543022180

 

A[3] := .3254617069

 

B[3] := .1177911768

 

C[3] := 4.708933240

 

P[3] := .8124474245

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 1.973241013

 

cc := 7.005418646

 

L := 6.495611086

 

LL := 22.94839275

 

R[1] := .3034319432

 

S[1] := 0.9318350072e-1

 

Q[1] := 2.477406387

 

A[4] := .3446953632

 

B[4] := .1065224704

 

C[4] := 4.241185270

 

P[4] := .8370643415

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 1.839457984

 

cc := 7.186959772

 

L := 6.911480924

 

LL := 24.15316459

 

R[1] := .2619901249

 

S[1] := 0.8971740871e-1

 

Q[1] := 2.217385534

 

A[5] := .2889717346

 

B[5] := 0.8838227764e-1

 

C[5] := 2.965514897

 

P[5] := .8196572233

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 2.075842156

 

cc := 6.451509594

 

L := 7.355551514

 

LL := 22.57154486

 

R[1] := .3857437868

 

S[1] := .1118795995

 

Q[1] := 3.756557664

 

A[6] := .3672067772

 

B[6] := .1169243938

 

C[6] := 4.269406267

 

P[6] := .8320277948

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

c := 2.052084434

 

cc := 5.954773664

 

L := 7.287571569

 

LL := 19.13650694

 

R[1] := .4519986760

 

S[1] := .1574582015

 

Q[1] := 5.517824640

 

A[7] := .3834726657

 

B[7] := .1300598692

 

C[7] := 4.443377611

 

P[7] := .8222904412

 

W := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

U := Vector(4, {(1) = ` 1 .. 45 `*Array, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*C_order})

 

1.288903514

 

6.337860209

 

6.623173031

 

20.57453160

 

.2114575385

 

.1210220497

 

2.313450170

 

Error, (in fsolve) Q is in the equation, and is not solved for

 

a := [seq(A[i], i = 1 .. 1000)]:

for i to 1000 do aa_[i] := `if`(0 < P[i] and P[i] < 1, a[i], 0); bb_[i] := `if`(0 < P[i] and P[i] < 1, b[i], 0); cc_[i] := `if`(0 < P[i] and P[i] < 1, c[i], 0); gg_[i] := `if`(0 < P[i] and P[i] < 1, p[i], 0) end do:

NULL

Tau := [seq(aa_[i], i = 1 .. 1000)]:

rr := [seq(`if`(Tau[i] = 0, NULL, i), i = 1 .. 1000)]:

r := Tau[rr]:

1000

 

1000

 

1000

 

1000

(1)

lambda[1] := Mean([seq(r[i], i = 1 .. nops(r))]); lambda[2] := Mean([seq(s[i], i = 1 .. nops(s))]); alpha := Mean([seq(q[i], i = 1 .. nops(q))]); Pro := Mean([seq(w[i], i = 1 .. nops(w))]); Bi_ := .647737-Pro; ME_ := Bi_^2

Error, (in Statistics:-Mean) unable to evaluate `if`(0 < P[8] and P[8] < 1, a[i], 0) to floating-point

 

Error, (in Statistics:-Mean) unable to evaluate `if`(0 < P[8] and P[8] < 1, b[i], 0) to floating-point

 

Error, (in Statistics:-Mean) unable to evaluate `if`(0 < P[8] and P[8] < 1, c[i], 0) to floating-point

 

Error, (in Statistics:-Mean) unable to evaluate `if`(0 < P[8] and P[8] < 1, p[i], 0) to floating-point

 

.647737-Pro

 

(.647737-Pro)^2

(2)

NULL


 

Download exp_new_for_alpha_more_than_22.mw

 

I am calling a function (GTS2) multiple times with varying inputs, using the curry function, and i want to record how long/how much RAM the function takes with each input, and put those in seperate matrices that i can plot later
 

Sols3 := proc (H::algebraic, F::(list(algebraic)), i::posint, j::posint) options operator, arrow; GTS2(H, F, i, j) end proc;
n, m := 5, 4;
M=Matrix(n, m, curry(Sols3, H, F))


You can find all the functions required in this worksheet. The curried call to this function is in section 4.

MHD_cchf_2.mw
 

NULL

NULL

NULL

NULL

w := .572433:

NULL

for j to nops(N, m) do sol1 := dsolve([diff(diff(diff(f(eta), eta), eta), eta)+w*x(f(eta)*(diff(diff(f(eta), eta), eta))-(m[j]*m[j])*(diff(f(eta), eta))-(diff(f(eta), eta))^2) = 0, y*(diff(diff(theta(eta), eta), eta))/(pr*z)-b*f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta))-b*f(eta)^2*(diff(diff(theta(eta), eta), eta))+f(eta)*(diff(theta(eta), eta)) = 0, f(0) = N[j], (D(f))(0) = 1, (D(f))(20) = 0, theta(0) = 1, theta(20) = 0], numeric, method = bvp); plots[odeplot](sol1, [eta, ((D@@2)(f))(eta)], color = red); plots[odeplot](sol1, color = red); plots[odeplot](sol1, [eta, theta(eta)], color = K[j], linestyle = L[j]); fplt[j] := plots[odeplot](sol1, [eta, f(eta)], color = K[j], axes = boxed, linestyle = L[j]); tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], color = K[j], axes = box, linestyle = L[j]) end do; plots:-display([seq(fplt[j], j = 1 .. nops(N, m))]); plots:-display([seq(tplt[j], j = 1 .. nops(N, m))])

Error, invalid input: nops expects 1 argument, but received 2

 

Error, invalid input: nops expects 1 argument, but received 2

 

Error, invalid input: nops expects 1 argument, but received 2

 

``

``


 

Download MHD_cchf_2.mw

 

Respected sir, I try to plot graphs using two parameters once. But it showing the error as

Error, invalid input: nops expects 1 argument, but received 2
Error, invalid input: nops expects 1 argument, but received 2
Error, invalid input: nops expects 1 argument, but received 2

can anybody do help in this regard?

I have a problem writing a program for the numerical solution of nonlinear volterra integral equation using the method of reproducing kernel space. I have my algorithm as well as the program I tried to write, though they are full of error messages. Please could anyone give me a clue on how to go about my challenges. The algorithm is as follows:

Step 1. Fix 𝑎 ≤ 𝑥 and 𝑡 ≤ 𝑏.
If 𝑡 ≤ 𝑥, set 𝑅𝑥(𝑡) = 1 − 𝑎 + 𝑡.
Else set 𝑅𝑥(𝑡) = 1 − 𝑎 + 𝑥.
Step 2. For 𝑖 = 1, 2, . . . , 𝑚 set 𝑥i = (𝑖 − 1)/(𝑚 − 1).

Set 𝜓i(𝑥) = 𝐿t𝑅𝑥(𝑡)|𝑡=𝑥i .
Step 3. Set 𝑢0(𝑥1) = 𝑢(𝑥1).
Step 4. For 𝑖 = 1, 2, . . . , 𝑚 set 𝛾ij = [𝜓-1]ij.
Step 5. 𝑛 = 1.
Step 6. Set Sn = Σ𝑛
𝑘=1 𝛾nk𝑢k-1(𝑥k).
Step 7. Set 𝑢n(𝑥) = Σ𝑛
𝑖=1 Si𝜓i(𝑥).
Step 8. If 𝑛 < 𝑚then set 𝑛 = 𝑛 + 1 and go to step 6.
Else stop.

how can i plot outside of an sphere? for example x^2+y^2+z^2>1 ? tnx for help

So I have this system of equations with which I am not sure if the result is the same or not using "series" and "limit" or what is going on here.

I hope it is clear what I mean.


 

restart; with(MathematicalFunctions); Assume(k__2H2O > 0, `k__HA+OH` > 0, `k__A+H2O` > 0, `k__H3O+OH` > 0, `k__HA+H2O` > 0, `k__H3O+A` > 0, HA__0 > 0, H2O > 0); sys := k__2H2O*H2O^2+`k__A+H2O`*H2O*(HA__0-HA)-(H3O*`k__H3O+OH`+HA*`k__HA+OH`)*OH = 0, k__2H2O*H2O^2+`k__HA+H2O`*H2O*HA-(`k__H3O+A`*(HA__0-HA)+`k__H3O+OH`*OH)*H3O = 0, (H2O*`k__HA+H2O`+OH*`k__HA+OH`)*HA-(H2O*`k__A+H2O`+H3O*`k__H3O+A`)*(HA__0-HA) = 0; sys := `~`[simplify]([eval(eval(sys, HA = HA__0+OH-H3O), HA__0 = x__HA0*H2O)]); sol := solve(sys, [OH, H3O]); sol := sol[1]; OH__sol := simplify(rhs(sol[1])); H3O__sol := simplify(rhs(sol[2])); simplify(OH__sol*H3O__sol); OHH3O := simplify(limit(%, `k__HA+OH` = 0)); series(OHH3O, x__HA0 = 0, 2); collect(convert(%, polynom), x__HA0, simplify, factor); r1 := limit(%, x__HA0 = 0); r2 := radnormal(limit(OHH3O, x__HA0 = 0)); simplify(r1-r2)

[`&Intersect`, `&Minus`, `&Union`, Assume, Coulditbe, Evalf, Get, Is, SearchFunction, Sequences, Series]

 

{H2O::(RealRange(Open(0), infinity))}, {HA__0::(RealRange(Open(0), infinity))}, {k__2H2O::(RealRange(Open(0), infinity))}, {`k__A+H2O`::(RealRange(Open(0), infinity))}, {`k__H3O+A`::(RealRange(Open(0), infinity))}, {`k__H3O+OH`::(RealRange(Open(0), infinity))}, {`k__HA+H2O`::(RealRange(Open(0), infinity))}, {`k__HA+OH`::(RealRange(Open(0), infinity))}

 

k__2H2O*H2O^2+`k__A+H2O`*H2O*(HA__0-HA)-(H3O*`k__H3O+OH`+HA*`k__HA+OH`)*OH = 0, k__2H2O*H2O^2+`k__HA+H2O`*H2O*HA-(`k__H3O+A`*(HA__0-HA)+`k__H3O+OH`*OH)*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OH`-`k__H3O+OH`*`k__HA+H2O`)*(k__2H2O*`k__H3O+A`^2-`k__A+H2O`^2*`k__H3O+OH`-2*`k__A+H2O`*`k__H3O+OH`*`k__HA+H2O`-`k__H3O+OH`*`k__HA+H2O`^2))-(k__2H2O*`k__H3O+A`-`k__A+H2O`^2-`k__A+H2O`*`k__HA+H2O`)*H2O^2*(`k__A+H2O`+`k__HA+H2O`)/(`k__H3O+A`*(`k__A+H2O`*`k__H3O+A`-`k__A+H2O`*`k__H3O+OH`-`k__H3O+OH`*`k__HA+H2O`))

 

-(k__2H2O*`k__H3O+A`-`k__A+H2O`^2-`k__A+H2O`*`k__HA+H2O`)*H2O^2*(`k__A+H2O`+`k__HA+H2O`)/(`k__H3O+A`*(`k__A+H2O`*`k__H3O+A`-`k__A+H2O`*`k__H3O+OH`-`k__H3O+OH`*`k__HA+H2O`))

 

k__2H2O*H2O^2/`k__H3O+OH`

 

-`k__A+H2O`*(-(`k__A+H2O`+`k__HA+H2O`)^2*`k__H3O+OH`+k__2H2O*`k__H3O+A`^2)*H2O^2/(`k__H3O+OH`*`k__H3O+A`*((-`k__A+H2O`-`k__HA+H2O`)*`k__H3O+OH`+`k__A+H2O`*`k__H3O+A`))

(1)

``


 

Download Mapleprimes_-_Ionproduct.mw

restart;
N:=4;alpha:=5*3.14/180;r:=10;Ha:=5;H:=1;
dsolve(diff(f(x),x,x,x));
Rf:=diff(f[m-1](x),x,x,x)+2*alpha*r*sum*(f[m-1-n](x)*diff(f[n](x),x),n=0..m-1)
+(4-Ha)*(alpha)^2*diff(f[m-1](x),x);
dsolve(diff(f[m](x),x,x,x)-CHI[m]*(diff(f[m-1](x),x,x,x))=h*H*Rf,f[m](x));
f[0](x):=1-x^2;
for m from 1 by 1 to N do
CHI[m]:='if'(m>1,1,0);
f[m](x):=int(int(int(CHI[m]*(diff(f[m-1](x),x,x,x))+h*H(diff(f[m-1](x),x,x,x))
+2*h*H*alpha*r*(sum(f[m-1-n](x)*(diff(f[n](x),x)),n=0..m-1))+4*h*H*alpha^2*
(diff(f[m-1](x),x))-h*H*alpha^2*(diff(f[m-1](x),x))*Ha,x),x)+_C1*x,x)+_C2*x+_C3;
s1:=evalf(subs(x=0,f[m](x)))=0;
s2:=evalf(subs(x=0,diff(f[m](x),x)))=0;
s1:=evalf(subs(x=1,f[m](x)))=0;
s:={s1,s2,s3}:
f[m](x):=simplify(subs(solve(s,{_C1,_C2,_C3}),f[m](x)));
end do;
f(x):=sum(f[1](x),1=0..N);
hh:=evalf(subs(x=1,diff(f(x),x))):
plot(hh,h=-1.5..-0.2);
A(x):=subs(h=-0.9,f(x));
plot(A(x),x=0..1);

A parameterization of the function i am studying this morning produced what seems to be not single valued on the domain i choose,

 


plot(floor((x+1)^2/x^2)-(x+1)^2, x = -10 .. 10, coords = logarithmic);

plot(floor((x+1)^2/x^2)-(x+1)^2, x = -10 .. 10, coords = logcosh);


 

but the cartesian is fine:


Dear Users!

I am facing problem to compare the coefficient of x^i*y^j for i, j =1..,Equations. Please my effort and fix the problem.

H1 := 3*y^4*a[1]^5*b[1]+6*y^4*a[1]^3*b[1]^3+3*y^4*a[1]*b[1]^5+6*x*y^3*a[1]^5+6*x*y^3*a[1]^4*b[1]+12*x*y^3*a[1]^3*b[1]^2+12*x*y^3*a[1]^2*b[1]^3+6*x*y^3*a[1]*b[1]^4+6*x*y^3*b[1]^5+6*y^3*a[1]^5*b[2]+6*y^3*a[1]^4*a[2]*b[1]+12*y^3*a[1]^3*b[1]^2*b[2]+12*y^3*a[1]^2*a[2]*b[1]^3+6*y^3*a[1]*b[1]^4*b[2]+6*y^3*a[2]*b[1]^5+18*x^2*y^2*a[1]^4+36*x^2*y^2*a[1]^2*b[1]^2+18*x^2*y^2*b[1]^4+18*x*y^2*a[1]^4*a[2]+18*x*y^2*a[1]^4*b[2]+36*x*y^2*a[1]^2*a[2]*b[1]^2+36*x*y^2*a[1]^2*b[1]^2*b[2]+18*x*y^2*a[2]*b[1]^4+18*x*y^2*b[1]^4*b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ta^2*a[1]^2+delta^2*a[1]*b[1]+delta^2*b[1]^2+16*y^2*a[1]^2+48*y^2*a[1]*b[1]+16*y^2*b[1]^2+80*x*y*a[1]+80*x*y*b[1]+32*y*a[1]*a[2]+48*y*a[1]*b[2]+48*y*a[2]*b[1]+32*y*b[1]*b[2]+80*x^2+80*x*a[2]+80*x*b[2]+16*a[2]^2+48*a[2]*b[2]+16*b[2]^2-8*delta;

Equation := 12;

for i from 0 to Equation do;

for j from 0 to Equation do;

C[i, j] := coeff(H1, x^i*y^j) = 0;

end do;

end do;

I got this error
Error, invalid input: coeff received 1, which is not valid for its 2nd argument, x
 

As an example, the two-dimensional Array created by

A := Array(triangular[upper], 1..100, 1..100);

has both indexing function and storage "triangular[upper]", which is fine. However, the attempt

B := Array(triangular[upper], 1..100, 1..100, 1..100);

to make a three-dimensional analogue did not work: It returns "Error, triangular[upper] indexing is only valid with 2 dimensions". A similar error message is returned when I replace "triangular[upper]" by "symmetric".

(For definiteness, by a higher-dimensional symmetric Array I would like to understand an Array with entries that are invariant under every permutation of their indices. Similarly, I would call the Array upper-triangular if only its entries with non-decreasing indices can be non-zero.)

For a first solution attempt, I mimic a higher dimensional upper-triangular Array by instead creating a multiply nested one-dimensional Array, where the one-dimensional subarrays become shorter and shorter. I did some preliminary testing with CodeTools[Usage] and the memory and timing results seem to compare favorably to naively using standard rectangular Arrays.

It seems more natural to write my own indexing function. However, I am not sure how to write a suitable corresponding storage function, as the documentation on that latter subject mentions only Vectors and Matrices. Is it possible and advisable to write my own storage function, or is there yet another more natural and memory-efficient way to store higher-dimensional structured Arrays (with symbolic data) in Maple? 

Thank you very much for any insights, particularly documentation pointers.

Sebastiaan Janssens.

 

Dear Users!

Hope you would be fine. I want to write an expression in sigma notation which control ny n (any constant >0);
for n =1 expression expand as

E[1]+1

for n =2 expression expand as
E[1]*E[2]*a[12]+E[1]+E[2]+1;

for n =3 expression expand as

E[1]*E[2]*E[3]*a[123]+E[1]*E[2]*a[12]+E[1]*E[3]*a[13]+E[2]*E[3]*a[23]+E[1]+E[2]+E[3]+1;

for n =4 expression expand as

E[1]*E[2]*E[3]*E[4]*c[1234]+E[1]*E[2]*E[3]*a[123]+E[1]*E[2]*E[4]*a[124]+E[1]*E[3]*E[4]*a[134]+E[2]*E[3]*E[4]*a[234]+E[1]*E[2]*a[12]+E[1]*E[3]*a[13]+E[1]*E[4]*a[14]+E[2]*E[3]*a[23]+E[2]*E[4]*a[24]+E[3]*E[4]*a[34]+E[1]+E[2]+E[3]+E[4]+1;

and so on.

I am waiting your kind respons. Thanks

Hello,

how to calculate the laplace transform for the following equations?

L1:=laplace(psi1(t)*(diff(z1(t), t)), t, s):
L2:=laplace((diff(psi1(t), t))^2, t, s):

 

I can't final an equivalent to Mathematica's Flatten for sets. I know Maple has ListTools:-Flatten for lists.   

For example, given set r:={a,{b,c},d,{e,f,{g,h}}}; How to convert it to  {a,b,c,d,e,f,g,h}; 

does one have to convert each set and all the inner sets to lists, then apply ListTools:-Flatten to the result? How to map convert(z,list) for all levels?

     map(z->convert(z,list),r);

does not work, since it only maps at top level, giving {[a], [d], [b, c], [e, f, {g, h}]}

So doing

   ListTools:-Flatten(convert(map(z->convert(z,list),r),list));

Gives [a, d, b, c, e, f, {g, h}] 

 

     

Hey there, I'm trying to count how many letter arrangements are possible by using the algorithm below (for Maple TA). It's a bit crude but the console tells me countcharacteroccurences second argument must be a string, but it works for the earlier letters. Can someone please give me a bit of guidance?

 

$temp = maple("
randomize();
with(MathML):
with(StringTools):
with(combinat):

rintS := rand(1..27);
word := ARITHMETIC,ALGORITHM,ASYMPTOTE,AVERAGE,CARTESIAN,CALCULUS,COEFFICIENT,COORDINATE,NUMERATOR,
DENOMINATOR,DIFFERENTIATE,DERIVATIVE,DIAMETER,DYNAMICS,EXTRAPOLATION,FACTORIALS,GEOMETRIC,
HYPOTENUSE,INTEGRATION,IRRATIONAL,INVERSE,ITERATION,POLYNOMIAL,COMBINATIONS,PERMUTATIONS,POLYGON;

disp := word[rintS()];
n := length(disp);

n1 := CountCharacterOccurrences(disp,A);
n2 := CountCharacterOccurrences(disp,B);
n3 := CountCharacterOccurrences(disp,C);
n4 := CountCharacterOccurrences(disp,D);
n5 := CountCharacterOccurrences(disp,E);
n6 := CountCharacterOccurrences(disp,F);
n7 := CountCharacterOccurrences(disp,G);
n8 := CountCharacterOccurrences(disp,H);
n9 := CountCharacterOccurrences(disp,I);
a1 := CountCharacterOccurrences(disp,J);
a2 := CountCharacterOccurrences(disp,K);
a3 := CountCharacterOccurrences(disp,L);
a4 := CountCharacterOccurrences(disp,M);
a5 := CountCharacterOccurrences(disp,N);
a6 := CountCharacterOccurrences(disp,O);
a7 := CountCharacterOccurrences(disp,P);
a8 := CountCharacterOccurrences(disp,Q);
a9 := CountCharacterOccurrences(disp,R);
b1 := CountCharacterOccurrences(disp,S);
b2 := CountCharacterOccurrences(disp,T);
b3 := CountCharacterOccurrences(disp,U);
b4 := CountCharacterOccurrences(disp,V);
b5 := CountCharacterOccurrences(disp,W);
b6 := CountCharacterOccurrences(disp,X);
b7 := CountCharacterOccurrences(disp,Y);
b8 := CountCharacterOccurrences(disp,Z);

z1 := n1!*n2!*n3!*n4!*n5!*n6!*n7!*n8!*n9!;
z2 := a1!*a2!*a3!*a4!*a5!*a6!*a7!*a8!*a9!;
z3 := b1!*b2!*b3!*b4!*b5!*b6!*b7!*b8!;
ans := n!/(z1*z2*z3);

Export(disp),convert(ans,string),convert(z1,string),convert(z2,string),convert(z3,string);
");

$ans = switch(1,$temp);
$disp = switch(0,$temp);

First 804 805 806 807 808 809 810 Last Page 806 of 2433