dharr

Dr. David Harrington

8445 Reputation

22 Badges

21 years, 29 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are answers submitted by dharr

I don't see any way in the general case. But Z2 is simple enough to do. The comments suggest why it will be difficult in the general case. Zp is the cyclic group of order p.

restart

with(GroupTheory); with(GraphTheory)

p := 11

11

Construct direct product Zp x Zp. Goes to Z x Z in limit of large p.

Zp2 := `<|>`(`<,>`(a, b), `<,>`(a^p = 1, b^p = 1, 1/b.(1/a).b.a))

_m2184784207904

cg := CayleyGraph(Zp2)

GRAPHLN(directed, unweighted, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121], Array(1..121, {(1) = {2, 3}, (2) = {5, 6}, (3) = {6, 7}, (4) = {1, 8}, (5) = {10, 11}, (6) = {11, 12}, (7) = {12, 13}, (8) = {2, 14}, (9) = {4, 15}, (10) = {16, 17}, (11) = {17, 18}, (12) = {18, 19}, (13) = {19, 20}, (14) = {5, 21}, (15) = {1, 22}, (16) = {23, 24}, (17) = {24, 25}, (18) = {25, 26}, (19) = {26, 27}, (20) = {27, 28}, (21) = {10, 29}, (22) = {3, 30}, (23) = {31, 32}, (24) = {32, 33}, (25) = {33, 34}, (26) = {34, 35}, (27) = {35, 36}, (28) = {36, 37}, (29) = {16, 38}, (30) = {7, 39}, (31) = {40, 41}, (32) = {41, 42}, (33) = {42, 43}, (34) = {43, 44}, (35) = {44, 45}, (36) = {45, 46}, (37) = {46, 47}, (38) = {23, 48}, (39) = {13, 49}, (40) = {50, 51}, (41) = {51, 52}, (42) = {52, 53}, (43) = {53, 54}, (44) = {54, 55}, (45) = {55, 56}, (46) = {56, 57}, (47) = {57, 58}, (48) = {31, 59}, (49) = {20, 60}, (50) = {61, 62}, (51) = {62, 63}, (52) = {63, 64}, (53) = {64, 65}, (54) = {65, 66}, (55) = {66, 67}, (56) = {67, 68}, (57) = {68, 69}, (58) = {69, 70}, (59) = {40, 71}, (60) = {28, 72}, (61) = {15, 73}, (62) = {73, 74}, (63) = {74, 75}, (64) = {75, 76}, (65) = {76, 77}, (66) = {77, 78}, (67) = {78, 79}, (68) = {79, 80}, (69) = {80, 81}, (70) = {4, 81}, (71) = {50, 83}, (72) = {37, 84}, (73) = {22, 85}, (74) = {85, 86}, (75) = {86, 87}, (76) = {87, 88}, (77) = {88, 89}, (78) = {89, 90}, (79) = {90, 91}, (80) = {91, 92}, (81) = {8, 92}, (82) = {9, 70}, (83) = {9, 61}, (84) = {47, 94}, (85) = {30, 95}, (86) = {95, 96}, (87) = {96, 97}, (88) = {97, 98}, (89) = {98, 99}, (90) = {99, 100}, (91) = {100, 101}, (92) = {14, 101}, (93) = {82, 83}, (94) = {58, 82}, (95) = {39, 102}, (96) = {102, 103}, (97) = {103, 104}, (98) = {104, 105}, (99) = {105, 106}, (100) = {106, 107}, (101) = {21, 107}, (102) = {49, 108}, (103) = {108, 109}, (104) = {109, 110}, (105) = {110, 111}, (106) = {111, 112}, (107) = {29, 112}, (108) = {60, 113}, (109) = {113, 114}, (110) = {114, 115}, (111) = {115, 116}, (112) = {38, 116}, (113) = {72, 117}, (114) = {117, 118}, (115) = {118, 119}, (116) = {48, 119}, (117) = {84, 120}, (118) = {120, 121}, (119) = {59, 121}, (120) = {93, 94}, (121) = {71, 93}}), `GRAPHLN/table/1`, 0)

Torus as expected

DrawGraph(cg, dimension = 3, orientation = [34, 50, 35])

The problem is that the order of the elements is not useful, and the representation is not unique, e.g., b^2 can be b^3.b^-1. So we need some manipulations that are easy here but wont be in the general case.

els := [Elements(Zp2)[]]

Find the orders of a and b

degs := proc (els) local a, b, prods; a, b := indets(els)[]; prods := map(mul, els); map(proc (x) options operator, arrow; [`mod`(degree(x, a), p), `mod`(degree(x, b), p)] end proc, prods) end proc

d := degs(els)

[[0, 0], [1, 0], [0, 1], [0, 10], [2, 0], [1, 1], [0, 2], [1, 10], [10, 10], [3, 0], [2, 1], [1, 2], [0, 3], [2, 10], [10, 0], [4, 0], [3, 1], [2, 2], [1, 3], [0, 4], [3, 10], [10, 1], [5, 0], [4, 1], [3, 2], [2, 3], [1, 4], [0, 5], [4, 10], [10, 2], [6, 0], [5, 1], [4, 2], [3, 3], [2, 4], [1, 5], [0, 6], [5, 10], [10, 3], [7, 0], [6, 1], [5, 2], [4, 3], [3, 4], [2, 5], [1, 6], [0, 7], [6, 10], [10, 4], [8, 0], [7, 1], [6, 2], [5, 3], [4, 4], [3, 5], [2, 6], [1, 7], [0, 8], [7, 10], [10, 5], [9, 0], [8, 1], [7, 2], [6, 3], [5, 4], [4, 5], [3, 6], [2, 7], [1, 8], [0, 9], [8, 10], [10, 6], [9, 1], [8, 2], [7, 3], [6, 4], [5, 5], [4, 6], [3, 7], [2, 8], [1, 9], [10, 9], [9, 10], [10, 7], [9, 2], [8, 3], [7, 4], [6, 5], [5, 6], [4, 7], [3, 8], [2, 9], [9, 9], [10, 8], [9, 3], [8, 4], [7, 5], [6, 6], [5, 7], [4, 8], [3, 9], [9, 4], [8, 5], [7, 6], [6, 7], [5, 8], [4, 9], [9, 5], [8, 6], [7, 7], [6, 8], [5, 9], [9, 6], [8, 7], [7, 8], [6, 9], [9, 7], [8, 8], [7, 9], [9, 8], [8, 9]]

We want to split between degrees 5 and 6. Make an Array of the element numbers indexed by the degrees

M := Array(0 .. p-1, 0 .. p-1, {map(proc (x) options operator, arrow; op(lhs(x)) = rhs(x) end proc, `~`[`=`](d, [`$`(1 .. nops(d))]))[]})

_rtable[36893490332336398692]

Delete arcs between 5 and 6. In this case we know the arc directions, but in the more general case this won't be true.

start := (p-1)*(1/2); fin := start+1

5

6

DeleteArc(cg, {convert(M[() .. (), start .. fin], listlist)[]}); DeleteArc(cg, {convert(M*LinearAlgebra:-Transpose([start .. fin, () .. ()]), listlist)[]})

GRAPHLN(directed, unweighted, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121], Array(1..121, {(1) = {2, 3}, (2) = {5, 6}, (3) = {6, 7}, (4) = {1, 8}, (5) = {10, 11}, (6) = {11, 12}, (7) = {12, 13}, (8) = {2, 14}, (9) = {4, 15}, (10) = {16, 17}, (11) = {17, 18}, (12) = {18, 19}, (13) = {19, 20}, (14) = {5, 21}, (15) = {1, 22}, (16) = {23, 24}, (17) = {24, 25}, (18) = {25, 26}, (19) = {26, 27}, (20) = {27, 28}, (21) = {10, 29}, (22) = {3, 30}, (23) = {31, 32}, (24) = {32, 33}, (25) = {33, 34}, (26) = {34, 35}, (27) = {35, 36}, (28) = {36}, (29) = {16, 38}, (30) = {7, 39}, (31) = {40, 41}, (32) = {41, 42}, (33) = {42, 43}, (34) = {43, 44}, (35) = {44, 45}, (36) = {45}, (37) = {46, 47}, (38) = {23, 48}, (39) = {13, 49}, (40) = {50, 51}, (41) = {51, 52}, (42) = {52, 53}, (43) = {53, 54}, (44) = {54, 55}, (45) = {55}, (46) = {56, 57}, (47) = {57, 58}, (48) = {31, 59}, (49) = {20, 60}, (50) = {61, 62}, (51) = {62, 63}, (52) = {63, 64}, (53) = {64, 65}, (54) = {65, 66}, (55) = {66}, (56) = {67, 68}, (57) = {68, 69}, (58) = {69, 70}, (59) = {40, 71}, (60) = {28}, (61) = {15, 73}, (62) = {73, 74}, (63) = {74, 75}, (64) = {75, 76}, (65) = {76, 77}, (66) = {77}, (67) = {78, 79}, (68) = {79, 80}, (69) = {80, 81}, (70) = {4, 81}, (71) = {50, 83}, (72) = {37, 84}, (73) = {22, 85}, (74) = {85, 86}, (75) = {86, 87}, (76) = {87, 88}, (77) = {88}, (78) = {89, 90}, (79) = {90, 91}, (80) = {91, 92}, (81) = {8, 92}, (82) = {9, 70}, (83) = {9, 61}, (84) = {47, 94}, (85) = {30, 95}, (86) = {95, 96}, (87) = {96, 97}, (88) = {97}, (89) = {98, 99}, (90) = {99, 100}, (91) = {100, 101}, (92) = {14, 101}, (93) = {82, 83}, (94) = {58, 82}, (95) = {39, 102}, (96) = {102, 103}, (97) = {103}, (98) = {104, 105}, (99) = {105, 106}, (100) = {106, 107}, (101) = {21, 107}, (102) = {49, 108}, (103) = {108}, (104) = {109, 110}, (105) = {110, 111}, (106) = {111, 112}, (107) = {29, 112}, (108) = {60}, (109) = {113, 114}, (110) = {114, 115}, (111) = {115, 116}, (112) = {38, 116}, (113) = {72, 117}, (114) = {117, 118}, (115) = {118, 119}, (116) = {48, 119}, (117) = {84, 120}, (118) = {120, 121}, (119) = {59, 121}, (120) = {93, 94}, (121) = {71, 93}}), `GRAPHLN/table/1`, 0)

GRAPHLN(directed, unweighted, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121], Array(1..121, {(1) = {2, 3}, (2) = {5, 6}, (3) = {6, 7}, (4) = {1, 8}, (5) = {10, 11}, (6) = {11, 12}, (7) = {12, 13}, (8) = {2, 14}, (9) = {4, 15}, (10) = {16, 17}, (11) = {17, 18}, (12) = {18, 19}, (13) = {19, 20}, (14) = {5, 21}, (15) = {1, 22}, (16) = {23, 24}, (17) = {24, 25}, (18) = {25, 26}, (19) = {26, 27}, (20) = {27, 28}, (21) = {10, 29}, (22) = {3, 30}, (23) = {32}, (24) = {32, 33}, (25) = {33, 34}, (26) = {34, 35}, (27) = {35, 36}, (28) = {36}, (29) = {16, 38}, (30) = {7, 39}, (31) = {40, 41}, (32) = {42}, (33) = {42, 43}, (34) = {43, 44}, (35) = {44, 45}, (36) = {45}, (37) = {46, 47}, (38) = {23}, (39) = {13, 49}, (40) = {50, 51}, (41) = {51, 52}, (42) = {53}, (43) = {53, 54}, (44) = {54, 55}, (45) = {55}, (46) = {56, 57}, (47) = {57, 58}, (48) = {31, 59}, (49) = {20, 60}, (50) = {61, 62}, (51) = {62, 63}, (52) = {63, 64}, (53) = {65}, (54) = {65, 66}, (55) = {66}, (56) = {67, 68}, (57) = {68, 69}, (58) = {69, 70}, (59) = {40, 71}, (60) = {28}, (61) = {15, 73}, (62) = {73, 74}, (63) = {74, 75}, (64) = {75, 76}, (65) = {77}, (66) = {77}, (67) = {78, 79}, (68) = {79, 80}, (69) = {80, 81}, (70) = {4, 81}, (71) = {50, 83}, (72) = {37, 84}, (73) = {22, 85}, (74) = {85, 86}, (75) = {86, 87}, (76) = {87, 88}, (77) = {}, (78) = {89, 90}, (79) = {90, 91}, (80) = {91, 92}, (81) = {8, 92}, (82) = {9, 70}, (83) = {9, 61}, (84) = {47, 94}, (85) = {30, 95}, (86) = {95, 96}, (87) = {96, 97}, (88) = {97}, (89) = {99}, (90) = {99, 100}, (91) = {100, 101}, (92) = {14, 101}, (93) = {82, 83}, (94) = {58, 82}, (95) = {39, 102}, (96) = {102, 103}, (97) = {103}, (98) = {104, 105}, (99) = {106}, (100) = {106, 107}, (101) = {21, 107}, (102) = {49, 108}, (103) = {108}, (104) = {109, 110}, (105) = {110, 111}, (106) = {112}, (107) = {29, 112}, (108) = {60}, (109) = {113, 114}, (110) = {114, 115}, (111) = {115, 116}, (112) = {38}, (113) = {72, 117}, (114) = {117, 118}, (115) = {118, 119}, (116) = {48, 119}, (117) = {84, 120}, (118) = {120, 121}, (119) = {59, 121}, (120) = {93, 94}, (121) = {71, 93}}), `GRAPHLN/table/1`, 0)

And we get part of an infinite grid, as expected.

DrawGraph(cg, layout = spring)

NULL

Download CayleyGraphZ2.mw

Try

showstat(Units:-TestDimensions);

 

invlaplace very often needs assumptions to make progress. Even though s is complex, assuming everything is positive often seems to work. I just worked out lap3, since I am out of time, but this method is probably enough to get the rest done.

NULL

restart

with(inttrans)

pde := diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = t^2*x+x

diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = t^2*x+x

Work with the three parts separately

pt1, pt2, pt3 := diff(u(x, t), t), u(x, t)*(diff(u(x, t), x)), t^2*x+x

diff(u(x, t), t), u(x, t)*(diff(u(x, t), x)), t^2*x+x

part 1 by hand. L1 is invlaplace of (laplace divided by s^alpha)

L1 := u(x, t)

u(x, t)

L2 := invlaplace(laplace(pt2, t, s)/s^alpha, s, t)

invlaplace(laplace(u(x, t)*(diff(u(x, t), x)), t, s)/s^alpha, s, t)

Part 3 requires some assumptions that work even if they aren't correct

L3 := `assuming`([invlaplace(laplace(pt3, t, s)/s^alpha, s, t)], [positive])

x*t^alpha*(1/GAMMA(1+alpha)+2*t^2/GAMMA(3+alpha))

lap3 := L1 = L3-L2

u(x, t) = x*t^alpha*(1/GAMMA(1+alpha)+2*t^2/GAMMA(3+alpha))-invlaplace(laplace(u(x, t)*(diff(u(x, t), x)), t, s)/s^alpha, s, t)

``

Download lap3.mw

Your proposed solution (9) contains the unknown function R(xi), so I'm not sure what you expect here. You can use

simplify(eval(SO, f))

to see the resulting ode in R(xi). I'm not sure if this is the question you are asking.

Since you are using floating point numbers, an alternative is

Optimization:-Minimize(G(x,y), x = 0..1, y = 0..1)

In principle it might find a local rather than global minimum, but a plot shows it is fine in this case.

@Scot Gould 's solution is nice (Vote up), but it is possible to put the Vectors directly in the Matrix if you first make an Array.

restart

vectors1 := [seq(`<,>`(i, i+1, i+2), i = 1 .. 3)]; vectors2 := [seq(`<,>`(i, 2*i, 3*i), i = 1 .. 3)]

[Vector(3, {(1) = 1, (2) = 2, (3) = 3}), Vector(3, {(1) = 2, (2) = 3, (3) = 4}), Vector(3, {(1) = 3, (2) = 4, (3) = 5})]

[Vector[column](%id = 36893491208837358164), Vector[column](%id = 36893491208837358284), Vector[column](%id = 36893491208837358404)]

Arrays accept Vectors as entries

arrowList := Array(1 .. 3, 1 .. 2, [seq([vectors1[n], vectors2[n]], n = 1 .. 3)])

Array(%id = 36893491208837351772)

And we can convert that to a Matrix

arrowList := Matrix(arrowList)

Matrix(%id = 36893491208837333588)

arrowList[3, 2]

Vector[column](%id = 36893491208837358404)

arrowList[3, 2][1]

3

NULL

Download MaplePrimes_Matrix_of_Vectors.mw

The main error here was that psi(x,t) was already assigned when you did pdetest. I don't know the assumptions about the signs of things, but to make progress you will need to make them explicit. I think the presence of the absolute values in pde is going to get you into trouble if you are using complex functions. You had an earlier ode in U(xi) that you derived from the pde. So I would make sure that odetest on that works before attempting the full pde. 

You had kt which I changed to k*t but in your notes it is just k. Isn't all the time dependence in the exponential?

pde-solve.mw

solve, identity will automatically do all the work for you

solve(identity(E1, xi), {k, lambda, w, A[0], A[1], B[1]})

See the attached worksheet for the results.

solve_identity.mw

The pseudo inverse of A seems to work here, but off-hand I can't justify this.

Groebner.mw

 

Data is in the startup code as a hack since you didn't give the datafile. I used fsolve and directly in p__eng1, but NonlinearFit still doesn't return in reasonable time, though you might want to wait longer than I did. As usual in nonlinearfitting, a good initial guess at the solution is probably needed, and reducing the ranges over which you search, if you know them.

test.mw

 

You can remove the solutions you don't want with

remove(has,{COEFFS},[A[0]=0, A[1]=0, B[1]=0]);

If you want to get rid of the RootOfs, add explicit to solve. But if you know the signs of the other parameters add them after the solve, e.g., solve(...) assuming k>0;

eqns.mw

int(F[1](x,y),[x=0..1.,y=0..1.]);

returns 0.2080471649 (This is Maple 2024, which also has a problem with the nested form)

You eq (5) label refers to length(%), not the collected expression, so delete length(%). Change coeff(.., lambda^0) to coeff(..,lambda,0).

But your collect is on a ratio. If you want to just work with the numerator, that can be done, as on the attached.

coeff.mw

The following works, though it is slow.

plots:-inequal({-1 < lambda1, -1 < lambda2, lambda1 < 1, lambda2 < 1}, v = -5 .. 5, z = -5 .. 5)


The colored regions are where both eigenvalues are between -1 and 1. Depending on the ranges you want for v and z, you can refine this, and there are other options for inequal that might increase resolution or efficiency.

2d_implicit_plot_[v_z].mw

 

For FriendshipGraph in SpecialGraphs in GraphTheory GraphTheory[SpecialGraphs][FriendshipGraph] works.

First 17 18 19 20 21 22 23 Last Page 19 of 83