Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 103 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@MAHMOUDHM Yes, I saw your update. Please make as many changes as you can regarding the advice that you've already received here and, as Acer said, post your update in this thread.

I saw that you made changes regarding my first four points, but that you kept the pi. That was disappointing.

@ Your first sentence got cut off because of the stringent length restriction of the titles of Replies.

Anyway, yes, okay, there's a difference when the left operand of := is subscripted, which I mentioned with my y[..]:= example. Subscripting the left operand doesn't really apply with scalars. Okay, you're substituting concatenation for subscripting; I see the analogy, but I think that it's stretched thin: x[1] and x[2] are two objects in the same container, whereas x1 and x2 are separate containers.

Does it seem to you that Maple is different from any other programming language in this regard? It's been a long time since I've used another language extensively.

@hillbilly True zooming can be done with the viewpoint option to plot3d, and any 2d plot can be done in plot3d. See this Question: http://www.mapleprimes.com/questions/201992-Zoom-Animation-With-Time

@Vic For each of the three systems that you've posted, I get equivalent results from all three methods (msolve, Linsolve, and LinearAlgebra:-Modular-LinearSolve) as shown in the worksheet that I've posted below. If you think that you're getting different results, please post a worksheet showing that. You can use my worksheet as a model for the correct usage of the three solution methods.

restart:

macro(LA = LinearAlgebra, LAM = LinearAlgebra:-Modular):

systems:= {
     0 = f[[1, 5]]-f[[1, 3]], 0 = f[[1, 6]]-f[[1, 4]], 0 = f[[2, 4]]-f[[1, 4]], 0 = f[[2, 5]]-f[[1, 3]],
     0 = f[[2, 6]]-f[[1, 3]], 0 = f[[2, 6]]-f[[1, 5]], 0 = f[[2, 6]]-f[[2, 5]], 0 = f[[2, 7]]-f[[1, 4]],
     0 = f[[2, 7]]-f[[1, 6]], 0 = f[[2, 7]]-f[[2, 4]], 0 = f[[3, 1]]-f[[1, 5]], 0 = f[[3, 1]]-f[[2, 5]],
     0 = f[[3, 1]]-f[[2, 6]], 0 = f[[3, 1]]-f[[3, 7]], 0 = f[[3, 5]]-f[[1, 4]], 0 = f[[3, 5]]-f[[2, 4]],
     0 = f[[3, 6]]-f[[1, 5]], 0 = f[[3, 6]]-f[[2, 5]], 0 = f[[3, 7]]-f[[1, 3]], 0 = f[[3, 7]]-f[[1, 5]],
     0 = f[[3, 7]]-f[[2, 5]], 0 = f[[3, 7]]-f[[2, 6]], 0 = f[[4, 1]]-f[[1, 6]], 0 = f[[4, 1]]-f[[2, 4]],
     0 = f[[4, 1]]-f[[2, 7]], 0 = f[[4, 1]]-f[[3, 5]], 0 = f[[4, 1]]-f[[4, 6]], 0 = f[[4, 2]]-f[[2, 7]],
     0 = f[[4, 2]]-f[[3, 5]], 0 = f[[4, 2]]-f[[4, 6]], 0 = f[[4, 2]]-f[[4, 7]], 0 = f[[4, 6]]-f[[1, 4]],
     0 = f[[4, 6]]-f[[2, 4]], 0 = f[[4, 6]]-f[[3, 5]], 0 = f[[4, 7]]-f[[1, 6]], 0 = f[[4, 7]]-f[[2, 4]],
     0 = f[[4, 7]]-f[[2, 7]], 0 = f[[4, 7]]-f[[3, 5]], 0 = f[[4, 7]]-f[[4, 6]], 0 = f[[5, 1]]-f[[2, 6]],
     0 = f[[5, 1]]-f[[3, 6]], 0 = f[[5, 1]]-f[[3, 7]], 0 = f[[5, 1]]-f[[5, 7]], 0 = f[[5, 2]]-f[[2, 6]],
     0 = f[[5, 2]]-f[[3, 6]], 0 = f[[5, 2]]-f[[3, 7]], 0 = f[[5, 3]]-f[[4, 6]], 0 = f[[5, 3]]-f[[4, 7]],
     0 = f[[5, 7]]-f[[1, 5]], 0 = f[[5, 7]]-f[[2, 6]], 0 = f[[5, 7]]-f[[3, 6]], 0 = f[[5, 7]]-f[[3, 7]],
     0 = f[[6, 1]]-f[[2, 7]], 0 = f[[6, 1]]-f[[4, 7]], 0 = f[[6, 2]]-f[[3, 7]], 0 = f[[6, 2]]-f[[5, 7]],
     0 = f[[6, 3]]-f[[5, 7]], 0 = f[[6, 4]]-f[[4, 7]], 0 = f[[7, 2]]-f[[4, 7]], 0 = f[[7, 3]]-f[[5, 7]],
     1 = f[[1, 5]]-f[[1, 4]], 1 = f[[1, 6]]-f[[1, 3]], 1 = f[[1, 6]]-f[[1, 5]], 1 = f[[2, 4]]-f[[1, 3]],
     1 = f[[2, 5]]-f[[1, 4]], 1 = f[[2, 5]]-f[[2, 4]], 1 = f[[2, 6]]-f[[1, 4]], 1 = f[[2, 6]]-f[[1, 6]],
     1 = f[[2, 6]]-f[[2, 4]], 1 = f[[2, 7]]-f[[1, 3]], 1 = f[[2, 7]]-f[[1, 5]], 1 = f[[2, 7]]-f[[2, 5]],
     1 = f[[2, 7]]-f[[2, 6]], 1 = f[[3, 1]]-f[[1, 6]], 1 = f[[3, 1]]-f[[2, 4]], 1 = f[[3, 1]]-f[[2, 7]],
     1 = f[[3, 1]]-f[[3, 5]], 1 = f[[3, 5]]-f[[1, 3]], 1 = f[[3, 5]]-f[[2, 5]], 1 = f[[3, 6]]-f[[1, 4]],
     1 = f[[3, 6]]-f[[2, 4]], 1 = f[[3, 6]]-f[[3, 5]], 1 = f[[3, 7]]-f[[1, 4]], 1 = f[[3, 7]]-f[[1, 6]],
     1 = f[[3, 7]]-f[[2, 4]], 1 = f[[3, 7]]-f[[2, 7]], 1 = f[[4, 1]]-f[[1, 5]], 1 = f[[4, 1]]-f[[2, 5]],
     1 = f[[4, 1]]-f[[2, 6]], 1 = f[[4, 1]]-f[[3, 6]], 1 = f[[4, 1]]-f[[3, 7]], 1 = f[[4, 2]]-f[[2, 5]],
     1 = f[[4, 2]]-f[[2, 6]], 1 = f[[4, 2]]-f[[3, 6]], 1 = f[[4, 2]]-f[[3, 7]], 1 = f[[4, 6]]-f[[1, 5]],
     1 = f[[4, 6]]-f[[2, 5]], 1 = f[[4, 6]]-f[[3, 6]], 1 = f[[4, 7]]-f[[1, 5]], 1 = f[[4, 7]]-f[[2, 5]],
     1 = f[[4, 7]]-f[[2, 6]], 1 = f[[4, 7]]-f[[3, 6]], 1 = f[[4, 7]]-f[[3, 7]], 1 = f[[5, 1]]-f[[1, 6]],
     1 = f[[5, 1]]-f[[2, 7]], 1 = f[[5, 1]]-f[[4, 6]], 1 = f[[5, 1]]-f[[4, 7]], 1 = f[[5, 2]]-f[[2, 7]],
     1 = f[[5, 2]]-f[[3, 5]], 1 = f[[5, 2]]-f[[4, 6]], 1 = f[[5, 2]]-f[[4, 7]], 1 = f[[5, 3]]-f[[3, 6]],
     1 = f[[5, 3]]-f[[5, 7]], 1 = f[[5, 7]]-f[[1, 6]], 1 = f[[5, 7]]-f[[2, 7]], 1 = f[[5, 7]]-f[[3, 5]],
     1 = f[[5, 7]]-f[[4, 6]], 1 = f[[6, 1]]-f[[2, 6]], 1 = f[[6, 1]]-f[[3, 7]], 1 = f[[6, 1]]-f[[5, 7]],
     1 = f[[6, 2]]-f[[2, 7]], 1 = f[[6, 2]]-f[[4, 7]], 1 = f[[6, 3]]-f[[4, 6]], 1 = f[[6, 3]]-f[[4, 7]],
     1 = f[[6, 4]]-f[[5, 7]], 1 = f[[7, 2]]-f[[3, 7]], 1 = f[[7, 2]]-f[[5, 7]], 1 = f[[7, 3]]-f[[4, 7]]
}:
vars:= [indets(systems, name)[]]:
Ab:= LA:-GenerateMatrix(systems, vars, augmented):


SolLAM:= [LAM:-LinearSolve(2, LAM:-Mod(2, Ab, integer[]), 1, inplace= false)]^~%T;

SolLAM := [Vector[row](26, {(1) = 0, (2) = 1, (3) = 0, (4) = 1, (5) = 1, (6) = 0, (7) = 0, (8) = 1, (9) = 0, (10) = 1, (11) = 0, (12) = 0, (13) = 1, (14) = 1, (15) = 1, (16) = 1, (17) = 0, (18) = 0, (19) = 1, (20) = 0, (21) = 1, (22) = 0, (23) = 0, (24) = 1, (25) = 1, (26) = 0}, datatype = integer[8], order = C_order), Vector[row](26, {(1) = 1, (2) = 1, (3) = 1, (4) = 1, (5) = 1, (6) = 1, (7) = 1, (8) = 1, (9) = 1, (10) = 1, (11) = 1, (12) = 1, (13) = 1, (14) = 1, (15) = 1, (16) = 1, (17) = 1, (18) = 1, (19) = 1, (20) = 1, (21) = 1, (22) = 1, (23) = 1, (24) = 1, (25) = 1, (26) = 1}, datatype = integer[8], order = C_order)]

Sol1:= (Linsolve(Ab[..,..-2], Ab[..,-1], 'r') mod 2)^+;

Sol1 := Vector[row](26, {(1) = _t[26], (2) = 1+_t[26], (3) = _t[26], (4) = 1+_t[26], (5) = 1+_t[26], (6) = _t[26], (7) = _t[26], (8) = 1+_t[26], (9) = _t[26], (10) = 1+_t[26], (11) = _t[26], (12) = _t[26], (13) = 1+_t[26], (14) = 1+_t[26], (15) = 1+_t[26], (16) = 1+_t[26], (17) = _t[26], (18) = _t[26], (19) = 1+_t[26], (20) = _t[26], (21) = 1+_t[26], (22) = _t[26], (23) = _t[26], (24) = 1+_t[26], (25) = 1+_t[26], (26) = _t[26]})

Sol2:= SolLAM[1] + indets(Sol1,name)[]*SolLAM[2];

Sol2 := Vector[row](26, {(1) = _t[26], (2) = 1+_t[26], (3) = _t[26], (4) = 1+_t[26], (5) = 1+_t[26], (6) = _t[26], (7) = _t[26], (8) = 1+_t[26], (9) = _t[26], (10) = 1+_t[26], (11) = _t[26], (12) = _t[26], (13) = 1+_t[26], (14) = 1+_t[26], (15) = 1+_t[26], (16) = 1+_t[26], (17) = _t[26], (18) = _t[26], (19) = 1+_t[26], (20) = _t[26], (21) = 1+_t[26], (22) = _t[26], (23) = _t[26], (24) = 1+_t[26], (25) = 1+_t[26], (26) = _t[26]}, order = C_order)

MSol:= msolve(systems, 2);

{f[[1, 3]] = _Z1, f[[1, 4]] = 1+_Z1, f[[1, 5]] = _Z1, f[[1, 6]] = 1+_Z1, f[[2, 4]] = 1+_Z1, f[[2, 5]] = _Z1, f[[2, 6]] = _Z1, f[[2, 7]] = 1+_Z1, f[[3, 1]] = _Z1, f[[3, 5]] = 1+_Z1, f[[3, 6]] = _Z1, f[[3, 7]] = _Z1, f[[4, 1]] = 1+_Z1, f[[4, 2]] = 1+_Z1, f[[4, 6]] = 1+_Z1, f[[4, 7]] = 1+_Z1, f[[5, 1]] = _Z1, f[[5, 2]] = _Z1, f[[5, 3]] = 1+_Z1, f[[5, 7]] = _Z1, f[[6, 1]] = 1+_Z1, f[[6, 2]] = _Z1, f[[6, 3]] = _Z1, f[[6, 4]] = 1+_Z1, f[[7, 2]] = 1+_Z1, f[[7, 3]] = _Z1}

Sol3:= eval(<eval(vars, MSol)>^+, indets(MSol, suffixed(_Z))=~ indets(Sol1, name));

Sol3 := Vector[row](26, {(1) = _t[26], (2) = 1+_t[26], (3) = _t[26], (4) = 1+_t[26], (5) = 1+_t[26], (6) = _t[26], (7) = _t[26], (8) = 1+_t[26], (9) = _t[26], (10) = 1+_t[26], (11) = _t[26], (12) = _t[26], (13) = 1+_t[26], (14) = 1+_t[26], (15) = 1+_t[26], (16) = 1+_t[26], (17) = _t[26], (18) = _t[26], (19) = 1+_t[26], (20) = _t[26], (21) = 1+_t[26], (22) = _t[26], (23) = _t[26], (24) = 1+_t[26], (25) = 1+_t[26], (26) = _t[26]})

LA:-Equal(Sol1,Sol2);

true

LA:-Equal(Sol1,Sol3);

true

 


Download mod2_sys.mw

@ I don't see any inconsistency. You can do the same thing with Matrices:

x:= <2>:  y:= x:  y:= <3>:  x;

and x will still be <2>. Compare with

x:= <2>:  y:= x:  y[..]:= <3>:  x;

Now x will be <3>.

@Vic What did you do to confirm that this system has a solution? For me, neither msolve nor Linsolve return a solution.

There is no way to send the evaluation procedures to Excel, which couldn't interpret the Maple code anyway. But if you want to send four lists or vectors of y values to Excel, that can be done. In that case, I need to know the ending value of t and the step value of t.

Dr. Subramanian: Your comment makes absolutely no sense to me unless I suppose that you meant to say 2D input rather than 1D input.

@artfin To avoid extra-space errors (and for many other reasons), use 1D input (aka Maple Input). In 1D input, f(x) and f (x) mean exactly the same thing; in 2D input, f(x) means function application and f (x) means multiplication.

This is how I found the error. In the error message that you posted, I can see a "naked" sin. By naked, I mean that it has no argument. To find which equation has the naked sin, do

for k to 8 do indets(eq[k], name) end do:

(The only return from these commands should be {t}.) This shows that there's a naked sin in eq[5]. So I look at f5. I know that naked function errors are often caused by extra spaces in 2D input. So I look (just by eye) for an extra space after a sin in f5.

@max125 

root[8](x) is identical to x^(1/8). Since your problem says x^(1/8), why didn't you just use that?

@asa12 Since you're by far the most prolific Question asker of all time on MaplePrimes, you of all people should know that nobody's going to try to answer your Question based on a screenshot, especially one as complicated as this. And it's not even a proper screenshot! You took a photo of your screen with a camera, which you didn't even hold parallel to the screen.

This isn't to excuse solve's poor performance, but why are you trying to solve this rather than the reduced form surd(x,2), which solve handles correctly?

In the animation on the left, I don't understand the significance of the gold circle---the middle one of the three stationary circles.

@ThU Automatic simplification of equations doesn't move anything from one side to the other. Automatic simplification of inequalities with unknowns collects the constants on one side.

@MortenZdk It's true that save will produce a readable .mpl file. However, the code will be formatted the way that Maple wants it, and all your comments will be stripped. One crude way around the latter is to put comments in string literals, like

C:= "This is my comment":

First 394 395 396 397 398 399 400 Last Page 396 of 709