MaplePrimes Questions

In the calculation below, A and B both simplify to 1.  Why doesn't A*B simplify to 1?  Tested on Maple 2017 and 2018.

restart;

A := (1 - cos(s)^2)/sin(s)^2;

(1-cos(s)^2)/sin(s)^2

B := (1 - cos(t)^2)/sin(t)^2;

(1-cos(t)^2)/sin(t)^2

simplify(A);
simplify(B);

1

1

Why doesn't this simplify to 1?

simplify(A*B);

((cos(t)^2-1)*cos(s)^2-cos(t)^2+1)/(sin(s)^2*sin(t)^2)

Can someone please explain in simple terms, why when I do

 r:=foo(r), where "r" is a Record, then the returned  "r" is not what is returned from foo()?  I want to write a proc foo() which takes in a Record variable, update some of its fields, and then return the updated Record to the caller

r:=Record('a','b');
foo:=proc(r)
    r:-b:=5;
    return(r);
end proc;

But now when I call the above as follows

r:-b:=99;
print(r);
r:=foo(r):
print(r);

The last print above just prints "r" and not the Record. It seems to have erased the Record.

 

But it works, if I change the name of the variable to return the result into, as 

r:-b:=99;
print(r);
r0:=foo(r):
print(r0);

When I do the same on say a Matrix, there is no problem

restart;
r:=<<1,1>>:
foo:=proc(r)
    r[1]:=5;
    return(r);
end proc;

And now

r;
r:=foo(r):
print(r);

 

Why it worked with a Matrix but not with Record? Why can't one overwrite the Record on the call return?

What would be the correct way to pass in a Record to a function, and have the function update some of its fields, and then return back the updated copy of the Record without having to make a new variable "r0" as above?

Ball_Maple.mwsBall_Maple.txt

Attached is code in Maple 7 and a text file.There is a for loop in which I want the plots to be output, and the printf command - but I am not getting a plot at all.  Any advice most appreciated.  David

Hello everyone. Really need help here. How am i going to do a loop with different values of x and y. 

For example this are the values,

I wish to do looping since the derivation is way too long and i have like 21 values of x and y each. i have no idea how to modify the coding for looping. Thank u in advanced :)

I really like Maple Record. I think it is one of the hidden gems in Maple. Very useful.

But I have basic questions on it. I just started to learn how to use it. It is very similar to Pascal Record.

1)

r:=Record(a,b);
                       r := Record(a, b)
type(r,'record');
                              true
whattype(r);
                             symbol

Why  type(r,'record') says true, but whattype(r) says symbol?

2)
Why Maple displays the record content to the screen automatically only first time, after it is created, but second time, it only echos the name? So one has to use print() each time to display the content of the record.  Not a big deal, but it is little annoying

r:=Record(a,b);
                       r := Record(a, b)
r;
                               r

print(r);
                          Record(a, b)

r:-a:=5;
                             a := 5
r
                               r

print(r);
                        Record(a = 5, b)

 

Compare this to say a set type, where it displays the content each time

r:={1,2,3};
                         r := {1, 2, 3}
r
                           {1, 2, 3}

I tried changing max_record_depth but I must be doing something wrong. It still does not display the content

interface(max_record_depth=10)
                               10
r:=Record(a,b);
                       r := Record(a, b)
r;
                               r

3) Why are these two behave the same way

r:=Record("y");
r:-y:=4;

r:=Record('y');
r:-y:=4;

Giving the name of the field as string worked the same way as second example which is a name.  I thought the first one above will not work as field name should be a name according to help.

Hello,

I'm currently wondering about the "real" difference.

is() or type() can be used both for true/false checks. However when should what be used preferably?

For example I do not see what is better over the other when doing simple checks such as

is(2,'integer')

type(2,'integer')

 

Thanks for clarifying.


I can't workout the syntax to plot a sequence of arrow. See last line of document.

accel := plottools:-arrow(seq([M[j, 1][1], M[j, 1][2]], [M[j, 3][1], M[j, 3][2]], j = 1 .. i), colour = red)  Doesn't work and tried various things.

Would also appreciate an explination for how the lines are plotted. I found this line on Maple Primes. It works but I don't realy understant it.

orb := plot(([seq])([M[j, 1][1], M[j, 1][2]], j = 1 .. i), colour = blue)

Why is seq in square brackets?

restart

with(plots)

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(1)

with(plottools)

[annulus, arc, arrow, circle, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, exportplot, extrude, getdata, hemisphere, hexahedron, homothety, hyperbola, icosahedron, importplot, line, octahedron, parallelepiped, pieslice, point, polygon, prism, project, rectangle, reflect, rotate, scale, sector, semitorus, sphere, stellate, tetrahedron, torus, transform, translate]

(2)

M := Matrix(60, 3, {(1, 1) = Vector(2, {(1) = -3, (2) = 5}), (1, 2) = Vector(2, {(1) = -2, (2) = -2}), (1, 3) = Vector(2, {(1) = 0, (2) = 0}), (2, 1) = Vector(2, {(1) = -5, (2) = 3}), (2, 2) = Vector(2, {(1) = -1, (2) = -3}), (2, 3) = Vector(2, {(1) = 1, (2) = -1}), (3, 1) = Vector(2, {(1) = -6, (2) = 0}), (3, 2) = Vector(2, {(1) = 0, (2) = -3}), (3, 3) = Vector(2, {(1) = 1, (2) = 0}), (4, 1) = Vector(2, {(1) = -6, (2) = -3}), (4, 2) = Vector(2, {(1) = 1, (2) = -2}), (4, 3) = Vector(2, {(1) = 1, (2) = 1}), (5, 1) = Vector(2, {(1) = -5, (2) = -5}), (5, 2) = Vector(2, {(1) = 2, (2) = -1}), (5, 3) = Vector(2, {(1) = 1, (2) = 1}), (6, 1) = Vector(2, {(1) = -3, (2) = -6}), (6, 2) = Vector(2, {(1) = 3, (2) = 0}), (6, 3) = Vector(2, {(1) = 1, (2) = 1}), (7, 1) = Vector(2, {(1) = 0, (2) = -6}), (7, 2) = Vector(2, {(1) = 3, (2) = 1}), (7, 3) = Vector(2, {(1) = 0, (2) = 1}), (8, 1) = Vector(2, {(1) = 3, (2) = -5}), (8, 2) = Vector(2, {(1) = 2, (2) = 2}), (8, 3) = Vector(2, {(1) = -1, (2) = 1}), (9, 1) = Vector(2, {(1) = 5, (2) = -3}), (9, 2) = Vector(2, {(1) = 1, (2) = 3}), (9, 3) = Vector(2, {(1) = -1, (2) = 1}), (10, 1) = Vector(2, {(1) = 6, (2) = 0}), (10, 2) = Vector(2, {(1) = 0, (2) = 3}), (10, 3) = Vector(2, {(1) = -1, (2) = 0}), (11, 1) = Vector(2, {(1) = 6, (2) = 3}), (11, 2) = Vector(2, {(1) = -1, (2) = 2}), (11, 3) = Vector(2, {(1) = -1, (2) = -1}), (12, 1) = Vector(2, {(1) = 5, (2) = 5}), (12, 2) = Vector(2, {(1) = -2, (2) = 1}), (12, 3) = Vector(2, {(1) = -1, (2) = -1}), (13, 1) = Vector(2, {(1) = 3, (2) = 6}), (13, 2) = Vector(2, {(1) = -3, (2) = 0}), (13, 3) = Vector(2, {(1) = -1, (2) = -1}), (14, 1) = Vector(2, {(1) = 0, (2) = 6}), (14, 2) = Vector(2, {(1) = -3, (2) = -1}), (14, 3) = Vector(2, {(1) = 0, (2) = -1}), (15, 1) = Vector(2, {(1) = -3, (2) = 5}), (15, 2) = Vector(2, {(1) = -2, (2) = -2}), (15, 3) = Vector(2, {(1) = 1, (2) = -1}), (16, 1) = Vector(2, {(1) = -5, (2) = 3}), (16, 2) = Vector(2, {(1) = -1, (2) = -3}), (16, 3) = Vector(2, {(1) = 1, (2) = -1}), (17, 1) = Vector(2, {(1) = -6, (2) = 0}), (17, 2) = Vector(2, {(1) = 0, (2) = -3}), (17, 3) = Vector(2, {(1) = 1, (2) = 0}), (18, 1) = Vector(2, {(1) = -6, (2) = -3}), (18, 2) = Vector(2, {(1) = 1, (2) = -2}), (18, 3) = Vector(2, {(1) = 1, (2) = 1}), (19, 1) = Vector(2, {(1) = -5, (2) = -5}), (19, 2) = Vector(2, {(1) = 2, (2) = -1}), (19, 3) = Vector(2, {(1) = 1, (2) = 1}), (20, 1) = Vector(2, {(1) = -3, (2) = -6}), (20, 2) = Vector(2, {(1) = 3, (2) = 0}), (20, 3) = Vector(2, {(1) = 1, (2) = 1}), (21, 1) = Vector(2, {(1) = 0, (2) = -6}), (21, 2) = Vector(2, {(1) = 3, (2) = 1}), (21, 3) = Vector(2, {(1) = 0, (2) = 1}), (22, 1) = Vector(2, {(1) = 3, (2) = -5}), (22, 2) = Vector(2, {(1) = 2, (2) = 2}), (22, 3) = Vector(2, {(1) = -1, (2) = 1}), (23, 1) = Vector(2, {(1) = 5, (2) = -3}), (23, 2) = Vector(2, {(1) = 1, (2) = 3}), (23, 3) = Vector(2, {(1) = -1, (2) = 1}), (24, 1) = Vector(2, {(1) = 6, (2) = 0}), (24, 2) = Vector(2, {(1) = 0, (2) = 3}), (24, 3) = Vector(2, {(1) = -1, (2) = 0}), (25, 1) = Vector(2, {(1) = 6, (2) = 3}), (25, 2) = Vector(2, {(1) = -1, (2) = 2}), (25, 3) = Vector(2, {(1) = -1, (2) = -1}), (26, 1) = Vector(2, {(1) = 5, (2) = 5}), (26, 2) = Vector(2, {(1) = -2, (2) = 1}), (26, 3) = Vector(2, {(1) = -1, (2) = -1}), (27, 1) = Vector(2, {(1) = 3, (2) = 6}), (27, 2) = Vector(2, {(1) = -3, (2) = 0}), (27, 3) = Vector(2, {(1) = -1, (2) = -1}), (28, 1) = Vector(2, {(1) = 0, (2) = 6}), (28, 2) = Vector(2, {(1) = -3, (2) = -1}), (28, 3) = Vector(2, {(1) = 0, (2) = -1}), (29, 1) = Vector(2, {(1) = -3, (2) = 5}), (29, 2) = Vector(2, {(1) = -2, (2) = -2}), (29, 3) = Vector(2, {(1) = 1, (2) = -1}), (30, 1) = Vector(2, {(1) = -5, (2) = 3}), (30, 2) = Vector(2, {(1) = -1, (2) = -3}), (30, 3) = Vector(2, {(1) = 1, (2) = -1}), (31, 1) = Vector(2, {(1) = -6, (2) = 0}), (31, 2) = Vector(2, {(1) = 0, (2) = -3}), (31, 3) = Vector(2, {(1) = 1, (2) = 0}), (32, 1) = Vector(2, {(1) = -6, (2) = -3}), (32, 2) = Vector(2, {(1) = 1, (2) = -2}), (32, 3) = Vector(2, {(1) = 1, (2) = 1}), (33, 1) = Vector(2, {(1) = -5, (2) = -5}), (33, 2) = Vector(2, {(1) = 2, (2) = -1}), (33, 3) = Vector(2, {(1) = 1, (2) = 1}), (34, 1) = Vector(2, {(1) = -3, (2) = -6}), (34, 2) = Vector(2, {(1) = 3, (2) = 0}), (34, 3) = Vector(2, {(1) = 1, (2) = 1}), (35, 1) = Vector(2, {(1) = 0, (2) = -6}), (35, 2) = Vector(2, {(1) = 3, (2) = 1}), (35, 3) = Vector(2, {(1) = 0, (2) = 1}), (36, 1) = Vector(2, {(1) = 3, (2) = -5}), (36, 2) = Vector(2, {(1) = 2, (2) = 2}), (36, 3) = Vector(2, {(1) = -1, (2) = 1}), (37, 1) = Vector(2, {(1) = 5, (2) = -3}), (37, 2) = Vector(2, {(1) = 1, (2) = 3}), (37, 3) = Vector(2, {(1) = -1, (2) = 1}), (38, 1) = Vector(2, {(1) = 6, (2) = 0}), (38, 2) = Vector(2, {(1) = 0, (2) = 3}), (38, 3) = Vector(2, {(1) = -1, (2) = 0}), (39, 1) = Vector(2, {(1) = 6, (2) = 3}), (39, 2) = Vector(2, {(1) = -1, (2) = 2}), (39, 3) = Vector(2, {(1) = -1, (2) = -1}), (40, 1) = Vector(2, {(1) = 5, (2) = 5}), (40, 2) = Vector(2, {(1) = -2, (2) = 1}), (40, 3) = Vector(2, {(1) = -1, (2) = -1}), (41, 1) = Vector(2, {(1) = 3, (2) = 6}), (41, 2) = Vector(2, {(1) = -3, (2) = 0}), (41, 3) = Vector(2, {(1) = -1, (2) = -1}), (42, 1) = Vector(2, {(1) = 0, (2) = 6}), (42, 2) = Vector(2, {(1) = -3, (2) = -1}), (42, 3) = Vector(2, {(1) = 0, (2) = -1}), (43, 1) = Vector(2, {(1) = -3, (2) = 5}), (43, 2) = Vector(2, {(1) = -2, (2) = -2}), (43, 3) = Vector(2, {(1) = 1, (2) = -1}), (44, 1) = Vector(2, {(1) = -5, (2) = 3}), (44, 2) = Vector(2, {(1) = -1, (2) = -3}), (44, 3) = Vector(2, {(1) = 1, (2) = -1}), (45, 1) = Vector(2, {(1) = -6, (2) = 0}), (45, 2) = Vector(2, {(1) = 0, (2) = -3}), (45, 3) = Vector(2, {(1) = 1, (2) = 0}), (46, 1) = Vector(2, {(1) = -6, (2) = -3}), (46, 2) = Vector(2, {(1) = 1, (2) = -2}), (46, 3) = Vector(2, {(1) = 1, (2) = 1}), (47, 1) = Vector(2, {(1) = -5, (2) = -5}), (47, 2) = Vector(2, {(1) = 2, (2) = -1}), (47, 3) = Vector(2, {(1) = 1, (2) = 1}), (48, 1) = Vector(2, {(1) = -3, (2) = -6}), (48, 2) = Vector(2, {(1) = 3, (2) = 0}), (48, 3) = Vector(2, {(1) = 1, (2) = 1}), (49, 1) = Vector(2, {(1) = 0, (2) = -6}), (49, 2) = Vector(2, {(1) = 3, (2) = 1}), (49, 3) = Vector(2, {(1) = 0, (2) = 1}), (50, 1) = Vector(2, {(1) = 3, (2) = -5}), (50, 2) = Vector(2, {(1) = 2, (2) = 2}), (50, 3) = Vector(2, {(1) = -1, (2) = 1}), (51, 1) = Vector(2, {(1) = 5, (2) = -3}), (51, 2) = Vector(2, {(1) = 1, (2) = 3}), (51, 3) = Vector(2, {(1) = -1, (2) = 1}), (52, 1) = Vector(2, {(1) = 6, (2) = 0}), (52, 2) = Vector(2, {(1) = 0, (2) = 3}), (52, 3) = Vector(2, {(1) = -1, (2) = 0}), (53, 1) = Vector(2, {(1) = 6, (2) = 3}), (53, 2) = Vector(2, {(1) = -1, (2) = 2}), (53, 3) = Vector(2, {(1) = -1, (2) = -1}), (54, 1) = Vector(2, {(1) = 5, (2) = 5}), (54, 2) = Vector(2, {(1) = -2, (2) = 1}), (54, 3) = Vector(2, {(1) = -1, (2) = -1}), (55, 1) = Vector(2, {(1) = 3, (2) = 6}), (55, 2) = Vector(2, {(1) = -3, (2) = 0}), (55, 3) = Vector(2, {(1) = -1, (2) = -1}), (56, 1) = Vector(2, {(1) = 0, (2) = 6}), (56, 2) = Vector(2, {(1) = -3, (2) = -1}), (56, 3) = Vector(2, {(1) = 0, (2) = -1}), (57, 1) = Vector(2, {(1) = -3, (2) = 5}), (57, 2) = Vector(2, {(1) = -2, (2) = -2}), (57, 3) = Vector(2, {(1) = 1, (2) = -1}), (58, 1) = Vector(2, {(1) = -5, (2) = 3}), (58, 2) = Vector(2, {(1) = -1, (2) = -3}), (58, 3) = Vector(2, {(1) = 1, (2) = -1}), (59, 1) = Vector(2, {(1) = -6, (2) = 0}), (59, 2) = Vector(2, {(1) = 0, (2) = -3}), (59, 3) = Vector(2, {(1) = 1, (2) = 0}), (60, 1) = Vector(2, {(1) = -6, (2) = -3}), (60, 2) = Vector(2, {(1) = 1, (2) = -2}), (60, 3) = Vector(2, {(1) = 1, (2) = 1})})

M := Matrix(60, 3, {(1, 1) = Vector(2, {(1) = -3, (2) = 5}), (1, 2) = Vector(2, {(1) = -2, (2) = -2}), (1, 3) = Vector(2, {(1) = 0, (2) = 0}), (2, 1) = Vector(2, {(1) = -5, (2) = 3}), (2, 2) = Vector(2, {(1) = -1, (2) = -3}), (2, 3) = Vector(2, {(1) = 1, (2) = -1}), (3, 1) = Vector(2, {(1) = -6, (2) = 0}), (3, 2) = Vector(2, {(1) = 0, (2) = -3}), (3, 3) = Vector(2, {(1) = 1, (2) = 0}), (4, 1) = Vector(2, {(1) = -6, (2) = -3}), (4, 2) = Vector(2, {(1) = 1, (2) = -2}), (4, 3) = Vector(2, {(1) = 1, (2) = 1}), (5, 1) = Vector(2, {(1) = -5, (2) = -5}), (5, 2) = Vector(2, {(1) = 2, (2) = -1}), (5, 3) = Vector(2, {(1) = 1, (2) = 1}), (6, 1) = Vector(2, {(1) = -3, (2) = -6}), (6, 2) = Vector(2, {(1) = 3, (2) = 0}), (6, 3) = Vector(2, {(1) = 1, (2) = 1}), (7, 1) = Vector(2, {(1) = 0, (2) = -6}), (7, 2) = Vector(2, {(1) = 3, (2) = 1}), (7, 3) = Vector(2, {(1) = 0, (2) = 1}), (8, 1) = Vector(2, {(1) = 3, (2) = -5}), (8, 2) = Vector(2, {(1) = 2, (2) = 2}), (8, 3) = Vector(2, {(1) = -1, (2) = 1}), (9, 1) = Vector(2, {(1) = 5, (2) = -3}), (9, 2) = Vector(2, {(1) = 1, (2) = 3}), (9, 3) = Vector(2, {(1) = -1, (2) = 1}), (10, 1) = Vector(2, {(1) = 6, (2) = 0}), (10, 2) = Vector(2, {(1) = 0, (2) = 3}), (10, 3) = Vector(2, {(1) = -1, (2) = 0}), (11, 1) = Vector(2, {(1) = 6, (2) = 3}), (11, 2) = Vector(2, {(1) = -1, (2) = 2}), (11, 3) = Vector(2, {(1) = -1, (2) = -1}), (12, 1) = Vector(2, {(1) = 5, (2) = 5}), (12, 2) = Vector(2, {(1) = -2, (2) = 1}), (12, 3) = Vector(2, {(1) = -1, (2) = -1}), (13, 1) = Vector(2, {(1) = 3, (2) = 6}), (13, 2) = Vector(2, {(1) = -3, (2) = 0}), (13, 3) = Vector(2, {(1) = -1, (2) = -1}), (14, 1) = Vector(2, {(1) = 0, (2) = 6}), (14, 2) = Vector(2, {(1) = -3, (2) = -1}), (14, 3) = Vector(2, {(1) = 0, (2) = -1}), (15, 1) = Vector(2, {(1) = -3, (2) = 5}), (15, 2) = Vector(2, {(1) = -2, (2) = -2}), (15, 3) = Vector(2, {(1) = 1, (2) = -1}), (16, 1) = Vector(2, {(1) = -5, (2) = 3}), (16, 2) = Vector(2, {(1) = -1, (2) = -3}), (16, 3) = Vector(2, {(1) = 1, (2) = -1}), (17, 1) = Vector(2, {(1) = -6, (2) = 0}), (17, 2) = Vector(2, {(1) = 0, (2) = -3}), (17, 3) = Vector(2, {(1) = 1, (2) = 0}), (18, 1) = Vector(2, {(1) = -6, (2) = -3}), (18, 2) = Vector(2, {(1) = 1, (2) = -2}), (18, 3) = Vector(2, {(1) = 1, (2) = 1}), (19, 1) = Vector(2, {(1) = -5, (2) = -5}), (19, 2) = Vector(2, {(1) = 2, (2) = -1}), (19, 3) = Vector(2, {(1) = 1, (2) = 1}), (20, 1) = Vector(2, {(1) = -3, (2) = -6}), (20, 2) = Vector(2, {(1) = 3, (2) = 0}), (20, 3) = Vector(2, {(1) = 1, (2) = 1}), (21, 1) = Vector(2, {(1) = 0, (2) = -6}), (21, 2) = Vector(2, {(1) = 3, (2) = 1}), (21, 3) = Vector(2, {(1) = 0, (2) = 1}), (22, 1) = Vector(2, {(1) = 3, (2) = -5}), (22, 2) = Vector(2, {(1) = 2, (2) = 2}), (22, 3) = Vector(2, {(1) = -1, (2) = 1}), (23, 1) = Vector(2, {(1) = 5, (2) = -3}), (23, 2) = Vector(2, {(1) = 1, (2) = 3}), (23, 3) = Vector(2, {(1) = -1, (2) = 1}), (24, 1) = Vector(2, {(1) = 6, (2) = 0}), (24, 2) = Vector(2, {(1) = 0, (2) = 3}), (24, 3) = Vector(2, {(1) = -1, (2) = 0}), (25, 1) = Vector(2, {(1) = 6, (2) = 3}), (25, 2) = Vector(2, {(1) = -1, (2) = 2}), (25, 3) = Vector(2, {(1) = -1, (2) = -1}), (26, 1) = Vector(2, {(1) = 5, (2) = 5}), (26, 2) = Vector(2, {(1) = -2, (2) = 1}), (26, 3) = Vector(2, {(1) = -1, (2) = -1}), (27, 1) = Vector(2, {(1) = 3, (2) = 6}), (27, 2) = Vector(2, {(1) = -3, (2) = 0}), (27, 3) = Vector(2, {(1) = -1, (2) = -1}), (28, 1) = Vector(2, {(1) = 0, (2) = 6}), (28, 2) = Vector(2, {(1) = -3, (2) = -1}), (28, 3) = Vector(2, {(1) = 0, (2) = -1}), (29, 1) = Vector(2, {(1) = -3, (2) = 5}), (29, 2) = Vector(2, {(1) = -2, (2) = -2}), (29, 3) = Vector(2, {(1) = 1, (2) = -1}), (30, 1) = Vector(2, {(1) = -5, (2) = 3}), (30, 2) = Vector(2, {(1) = -1, (2) = -3}), (30, 3) = Vector(2, {(1) = 1, (2) = -1}), (31, 1) = Vector(2, {(1) = -6, (2) = 0}), (31, 2) = Vector(2, {(1) = 0, (2) = -3}), (31, 3) = Vector(2, {(1) = 1, (2) = 0}), (32, 1) = Vector(2, {(1) = -6, (2) = -3}), (32, 2) = Vector(2, {(1) = 1, (2) = -2}), (32, 3) = Vector(2, {(1) = 1, (2) = 1}), (33, 1) = Vector(2, {(1) = -5, (2) = -5}), (33, 2) = Vector(2, {(1) = 2, (2) = -1}), (33, 3) = Vector(2, {(1) = 1, (2) = 1}), (34, 1) = Vector(2, {(1) = -3, (2) = -6}), (34, 2) = Vector(2, {(1) = 3, (2) = 0}), (34, 3) = Vector(2, {(1) = 1, (2) = 1}), (35, 1) = Vector(2, {(1) = 0, (2) = -6}), (35, 2) = Vector(2, {(1) = 3, (2) = 1}), (35, 3) = Vector(2, {(1) = 0, (2) = 1}), (36, 1) = Vector(2, {(1) = 3, (2) = -5}), (36, 2) = Vector(2, {(1) = 2, (2) = 2}), (36, 3) = Vector(2, {(1) = -1, (2) = 1}), (37, 1) = Vector(2, {(1) = 5, (2) = -3}), (37, 2) = Vector(2, {(1) = 1, (2) = 3}), (37, 3) = Vector(2, {(1) = -1, (2) = 1}), (38, 1) = Vector(2, {(1) = 6, (2) = 0}), (38, 2) = Vector(2, {(1) = 0, (2) = 3}), (38, 3) = Vector(2, {(1) = -1, (2) = 0}), (39, 1) = Vector(2, {(1) = 6, (2) = 3}), (39, 2) = Vector(2, {(1) = -1, (2) = 2}), (39, 3) = Vector(2, {(1) = -1, (2) = -1}), (40, 1) = Vector(2, {(1) = 5, (2) = 5}), (40, 2) = Vector(2, {(1) = -2, (2) = 1}), (40, 3) = Vector(2, {(1) = -1, (2) = -1}), (41, 1) = Vector(2, {(1) = 3, (2) = 6}), (41, 2) = Vector(2, {(1) = -3, (2) = 0}), (41, 3) = Vector(2, {(1) = -1, (2) = -1}), (42, 1) = Vector(2, {(1) = 0, (2) = 6}), (42, 2) = Vector(2, {(1) = -3, (2) = -1}), (42, 3) = Vector(2, {(1) = 0, (2) = -1}), (43, 1) = Vector(2, {(1) = -3, (2) = 5}), (43, 2) = Vector(2, {(1) = -2, (2) = -2}), (43, 3) = Vector(2, {(1) = 1, (2) = -1}), (44, 1) = Vector(2, {(1) = -5, (2) = 3}), (44, 2) = Vector(2, {(1) = -1, (2) = -3}), (44, 3) = Vector(2, {(1) = 1, (2) = -1}), (45, 1) = Vector(2, {(1) = -6, (2) = 0}), (45, 2) = Vector(2, {(1) = 0, (2) = -3}), (45, 3) = Vector(2, {(1) = 1, (2) = 0}), (46, 1) = Vector(2, {(1) = -6, (2) = -3}), (46, 2) = Vector(2, {(1) = 1, (2) = -2}), (46, 3) = Vector(2, {(1) = 1, (2) = 1}), (47, 1) = Vector(2, {(1) = -5, (2) = -5}), (47, 2) = Vector(2, {(1) = 2, (2) = -1}), (47, 3) = Vector(2, {(1) = 1, (2) = 1}), (48, 1) = Vector(2, {(1) = -3, (2) = -6}), (48, 2) = Vector(2, {(1) = 3, (2) = 0}), (48, 3) = Vector(2, {(1) = 1, (2) = 1}), (49, 1) = Vector(2, {(1) = 0, (2) = -6}), (49, 2) = Vector(2, {(1) = 3, (2) = 1}), (49, 3) = Vector(2, {(1) = 0, (2) = 1}), (50, 1) = Vector(2, {(1) = 3, (2) = -5}), (50, 2) = Vector(2, {(1) = 2, (2) = 2}), (50, 3) = Vector(2, {(1) = -1, (2) = 1}), (51, 1) = Vector(2, {(1) = 5, (2) = -3}), (51, 2) = Vector(2, {(1) = 1, (2) = 3}), (51, 3) = Vector(2, {(1) = -1, (2) = 1}), (52, 1) = Vector(2, {(1) = 6, (2) = 0}), (52, 2) = Vector(2, {(1) = 0, (2) = 3}), (52, 3) = Vector(2, {(1) = -1, (2) = 0}), (53, 1) = Vector(2, {(1) = 6, (2) = 3}), (53, 2) = Vector(2, {(1) = -1, (2) = 2}), (53, 3) = Vector(2, {(1) = -1, (2) = -1}), (54, 1) = Vector(2, {(1) = 5, (2) = 5}), (54, 2) = Vector(2, {(1) = -2, (2) = 1}), (54, 3) = Vector(2, {(1) = -1, (2) = -1}), (55, 1) = Vector(2, {(1) = 3, (2) = 6}), (55, 2) = Vector(2, {(1) = -3, (2) = 0}), (55, 3) = Vector(2, {(1) = -1, (2) = -1}), (56, 1) = Vector(2, {(1) = 0, (2) = 6}), (56, 2) = Vector(2, {(1) = -3, (2) = -1}), (56, 3) = Vector(2, {(1) = 0, (2) = -1}), (57, 1) = Vector(2, {(1) = -3, (2) = 5}), (57, 2) = Vector(2, {(1) = -2, (2) = -2}), (57, 3) = Vector(2, {(1) = 1, (2) = -1}), (58, 1) = Vector(2, {(1) = -5, (2) = 3}), (58, 2) = Vector(2, {(1) = -1, (2) = -3}), (58, 3) = Vector(2, {(1) = 1, (2) = -1}), (59, 1) = Vector(2, {(1) = -6, (2) = 0}), (59, 2) = Vector(2, {(1) = 0, (2) = -3}), (59, 3) = Vector(2, {(1) = 1, (2) = 0}), (60, 1) = Vector(2, {(1) = -6, (2) = -3}), (60, 2) = Vector(2, {(1) = 1, (2) = -2}), (60, 3) = Vector(2, {(1) = 1, (2) = 1})})

(3)

xmin := 0; xmax := 0; ymin := 0; ymax := 0; for i from 2 while M[i, 1] <> M[1, 1] and i < 25 do xmin := min(M[i, 1][1], xmin); ymin := min(M[i, 1][2], ymin); xmax := max(M[i, 1][1], xmax); ymax := max(M[i, 1][1], ymax) end do; i, xmin, xmax, ymin, ymax

25, -6, 6, -6, 6

(4)

orb := plot(([seq])([M[j, 1][1], M[j, 1][2]], j = 1 .. i), colour = blue); l1 := plot(sqrt(2-sqrt(2))*x/sqrt(2+sqrt(2)), x = xmin .. xmax, colour = green); l2 := plot(-sqrt(2-sqrt(2))*x/sqrt(2+sqrt(2)), x = xmin .. xmax, colour = green); l3 := plot(sqrt(2+sqrt(2))*x/sqrt(2-sqrt(2)), x = xmin .. xmax, y = ymin .. ymax, colour = green); l4 := plot(-sqrt(2+sqrt(2))*x/sqrt(2-sqrt(2)), x = xmin .. xmax, y = ymin .. ymax, colour = green); display(orb, l1, l2, l3, l4, scaling = constrained)

 

accel := plottools:-arrow(seq([M[j, 1][1], M[j, 1][2]], [M[j, 3][1], M[j, 3][2]], j = 1 .. i), colour = red)

Error, invalid input: seq expects its 3rd argument, step, to be of type numeric, but received j = 1 .. 25

 

``


 

Download plot_arrows_sequence.mw
 

restart

with(plots)

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(1)

with(plottools)

[annulus, arc, arrow, circle, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, exportplot, extrude, getdata, hemisphere, hexahedron, homothety, hyperbola, icosahedron, importplot, line, octahedron, parallelepiped, pieslice, point, polygon, prism, project, rectangle, reflect, rotate, scale, sector, semitorus, sphere, stellate, tetrahedron, torus, transform, translate]

(2)

M := Matrix(60, 3, {(1, 1) = Vector(2, {(1) = -3, (2) = 5}), (1, 2) = Vector(2, {(1) = -2, (2) = -2}), (1, 3) = Vector(2, {(1) = 0, (2) = 0}), (2, 1) = Vector(2, {(1) = -5, (2) = 3}), (2, 2) = Vector(2, {(1) = -1, (2) = -3}), (2, 3) = Vector(2, {(1) = 1, (2) = -1}), (3, 1) = Vector(2, {(1) = -6, (2) = 0}), (3, 2) = Vector(2, {(1) = 0, (2) = -3}), (3, 3) = Vector(2, {(1) = 1, (2) = 0}), (4, 1) = Vector(2, {(1) = -6, (2) = -3}), (4, 2) = Vector(2, {(1) = 1, (2) = -2}), (4, 3) = Vector(2, {(1) = 1, (2) = 1}), (5, 1) = Vector(2, {(1) = -5, (2) = -5}), (5, 2) = Vector(2, {(1) = 2, (2) = -1}), (5, 3) = Vector(2, {(1) = 1, (2) = 1}), (6, 1) = Vector(2, {(1) = -3, (2) = -6}), (6, 2) = Vector(2, {(1) = 3, (2) = 0}), (6, 3) = Vector(2, {(1) = 1, (2) = 1}), (7, 1) = Vector(2, {(1) = 0, (2) = -6}), (7, 2) = Vector(2, {(1) = 3, (2) = 1}), (7, 3) = Vector(2, {(1) = 0, (2) = 1}), (8, 1) = Vector(2, {(1) = 3, (2) = -5}), (8, 2) = Vector(2, {(1) = 2, (2) = 2}), (8, 3) = Vector(2, {(1) = -1, (2) = 1}), (9, 1) = Vector(2, {(1) = 5, (2) = -3}), (9, 2) = Vector(2, {(1) = 1, (2) = 3}), (9, 3) = Vector(2, {(1) = -1, (2) = 1}), (10, 1) = Vector(2, {(1) = 6, (2) = 0}), (10, 2) = Vector(2, {(1) = 0, (2) = 3}), (10, 3) = Vector(2, {(1) = -1, (2) = 0}), (11, 1) = Vector(2, {(1) = 6, (2) = 3}), (11, 2) = Vector(2, {(1) = -1, (2) = 2}), (11, 3) = Vector(2, {(1) = -1, (2) = -1}), (12, 1) = Vector(2, {(1) = 5, (2) = 5}), (12, 2) = Vector(2, {(1) = -2, (2) = 1}), (12, 3) = Vector(2, {(1) = -1, (2) = -1}), (13, 1) = Vector(2, {(1) = 3, (2) = 6}), (13, 2) = Vector(2, {(1) = -3, (2) = 0}), (13, 3) = Vector(2, {(1) = -1, (2) = -1}), (14, 1) = Vector(2, {(1) = 0, (2) = 6}), (14, 2) = Vector(2, {(1) = -3, (2) = -1}), (14, 3) = Vector(2, {(1) = 0, (2) = -1}), (15, 1) = Vector(2, {(1) = -3, (2) = 5}), (15, 2) = Vector(2, {(1) = -2, (2) = -2}), (15, 3) = Vector(2, {(1) = 1, (2) = -1}), (16, 1) = Vector(2, {(1) = -5, (2) = 3}), (16, 2) = Vector(2, {(1) = -1, (2) = -3}), (16, 3) = Vector(2, {(1) = 1, (2) = -1}), (17, 1) = Vector(2, {(1) = -6, (2) = 0}), (17, 2) = Vector(2, {(1) = 0, (2) = -3}), (17, 3) = Vector(2, {(1) = 1, (2) = 0}), (18, 1) = Vector(2, {(1) = -6, (2) = -3}), (18, 2) = Vector(2, {(1) = 1, (2) = -2}), (18, 3) = Vector(2, {(1) = 1, (2) = 1}), (19, 1) = Vector(2, {(1) = -5, (2) = -5}), (19, 2) = Vector(2, {(1) = 2, (2) = -1}), (19, 3) = Vector(2, {(1) = 1, (2) = 1}), (20, 1) = Vector(2, {(1) = -3, (2) = -6}), (20, 2) = Vector(2, {(1) = 3, (2) = 0}), (20, 3) = Vector(2, {(1) = 1, (2) = 1}), (21, 1) = Vector(2, {(1) = 0, (2) = -6}), (21, 2) = Vector(2, {(1) = 3, (2) = 1}), (21, 3) = Vector(2, {(1) = 0, (2) = 1}), (22, 1) = Vector(2, {(1) = 3, (2) = -5}), (22, 2) = Vector(2, {(1) = 2, (2) = 2}), (22, 3) = Vector(2, {(1) = -1, (2) = 1}), (23, 1) = Vector(2, {(1) = 5, (2) = -3}), (23, 2) = Vector(2, {(1) = 1, (2) = 3}), (23, 3) = Vector(2, {(1) = -1, (2) = 1}), (24, 1) = Vector(2, {(1) = 6, (2) = 0}), (24, 2) = Vector(2, {(1) = 0, (2) = 3}), (24, 3) = Vector(2, {(1) = -1, (2) = 0}), (25, 1) = Vector(2, {(1) = 6, (2) = 3}), (25, 2) = Vector(2, {(1) = -1, (2) = 2}), (25, 3) = Vector(2, {(1) = -1, (2) = -1}), (26, 1) = Vector(2, {(1) = 5, (2) = 5}), (26, 2) = Vector(2, {(1) = -2, (2) = 1}), (26, 3) = Vector(2, {(1) = -1, (2) = -1}), (27, 1) = Vector(2, {(1) = 3, (2) = 6}), (27, 2) = Vector(2, {(1) = -3, (2) = 0}), (27, 3) = Vector(2, {(1) = -1, (2) = -1}), (28, 1) = Vector(2, {(1) = 0, (2) = 6}), (28, 2) = Vector(2, {(1) = -3, (2) = -1}), (28, 3) = Vector(2, {(1) = 0, (2) = -1}), (29, 1) = Vector(2, {(1) = -3, (2) = 5}), (29, 2) = Vector(2, {(1) = -2, (2) = -2}), (29, 3) = Vector(2, {(1) = 1, (2) = -1}), (30, 1) = Vector(2, {(1) = -5, (2) = 3}), (30, 2) = Vector(2, {(1) = -1, (2) = -3}), (30, 3) = Vector(2, {(1) = 1, (2) = -1}), (31, 1) = Vector(2, {(1) = -6, (2) = 0}), (31, 2) = Vector(2, {(1) = 0, (2) = -3}), (31, 3) = Vector(2, {(1) = 1, (2) = 0}), (32, 1) = Vector(2, {(1) = -6, (2) = -3}), (32, 2) = Vector(2, {(1) = 1, (2) = -2}), (32, 3) = Vector(2, {(1) = 1, (2) = 1}), (33, 1) = Vector(2, {(1) = -5, (2) = -5}), (33, 2) = Vector(2, {(1) = 2, (2) = -1}), (33, 3) = Vector(2, {(1) = 1, (2) = 1}), (34, 1) = Vector(2, {(1) = -3, (2) = -6}), (34, 2) = Vector(2, {(1) = 3, (2) = 0}), (34, 3) = Vector(2, {(1) = 1, (2) = 1}), (35, 1) = Vector(2, {(1) = 0, (2) = -6}), (35, 2) = Vector(2, {(1) = 3, (2) = 1}), (35, 3) = Vector(2, {(1) = 0, (2) = 1}), (36, 1) = Vector(2, {(1) = 3, (2) = -5}), (36, 2) = Vector(2, {(1) = 2, (2) = 2}), (36, 3) = Vector(2, {(1) = -1, (2) = 1}), (37, 1) = Vector(2, {(1) = 5, (2) = -3}), (37, 2) = Vector(2, {(1) = 1, (2) = 3}), (37, 3) = Vector(2, {(1) = -1, (2) = 1}), (38, 1) = Vector(2, {(1) = 6, (2) = 0}), (38, 2) = Vector(2, {(1) = 0, (2) = 3}), (38, 3) = Vector(2, {(1) = -1, (2) = 0}), (39, 1) = Vector(2, {(1) = 6, (2) = 3}), (39, 2) = Vector(2, {(1) = -1, (2) = 2}), (39, 3) = Vector(2, {(1) = -1, (2) = -1}), (40, 1) = Vector(2, {(1) = 5, (2) = 5}), (40, 2) = Vector(2, {(1) = -2, (2) = 1}), (40, 3) = Vector(2, {(1) = -1, (2) = -1}), (41, 1) = Vector(2, {(1) = 3, (2) = 6}), (41, 2) = Vector(2, {(1) = -3, (2) = 0}), (41, 3) = Vector(2, {(1) = -1, (2) = -1}), (42, 1) = Vector(2, {(1) = 0, (2) = 6}), (42, 2) = Vector(2, {(1) = -3, (2) = -1}), (42, 3) = Vector(2, {(1) = 0, (2) = -1}), (43, 1) = Vector(2, {(1) = -3, (2) = 5}), (43, 2) = Vector(2, {(1) = -2, (2) = -2}), (43, 3) = Vector(2, {(1) = 1, (2) = -1}), (44, 1) = Vector(2, {(1) = -5, (2) = 3}), (44, 2) = Vector(2, {(1) = -1, (2) = -3}), (44, 3) = Vector(2, {(1) = 1, (2) = -1}), (45, 1) = Vector(2, {(1) = -6, (2) = 0}), (45, 2) = Vector(2, {(1) = 0, (2) = -3}), (45, 3) = Vector(2, {(1) = 1, (2) = 0}), (46, 1) = Vector(2, {(1) = -6, (2) = -3}), (46, 2) = Vector(2, {(1) = 1, (2) = -2}), (46, 3) = Vector(2, {(1) = 1, (2) = 1}), (47, 1) = Vector(2, {(1) = -5, (2) = -5}), (47, 2) = Vector(2, {(1) = 2, (2) = -1}), (47, 3) = Vector(2, {(1) = 1, (2) = 1}), (48, 1) = Vector(2, {(1) = -3, (2) = -6}), (48, 2) = Vector(2, {(1) = 3, (2) = 0}), (48, 3) = Vector(2, {(1) = 1, (2) = 1}), (49, 1) = Vector(2, {(1) = 0, (2) = -6}), (49, 2) = Vector(2, {(1) = 3, (2) = 1}), (49, 3) = Vector(2, {(1) = 0, (2) = 1}), (50, 1) = Vector(2, {(1) = 3, (2) = -5}), (50, 2) = Vector(2, {(1) = 2, (2) = 2}), (50, 3) = Vector(2, {(1) = -1, (2) = 1}), (51, 1) = Vector(2, {(1) = 5, (2) = -3}), (51, 2) = Vector(2, {(1) = 1, (2) = 3}), (51, 3) = Vector(2, {(1) = -1, (2) = 1}), (52, 1) = Vector(2, {(1) = 6, (2) = 0}), (52, 2) = Vector(2, {(1) = 0, (2) = 3}), (52, 3) = Vector(2, {(1) = -1, (2) = 0}), (53, 1) = Vector(2, {(1) = 6, (2) = 3}), (53, 2) = Vector(2, {(1) = -1, (2) = 2}), (53, 3) = Vector(2, {(1) = -1, (2) = -1}), (54, 1) = Vector(2, {(1) = 5, (2) = 5}), (54, 2) = Vector(2, {(1) = -2, (2) = 1}), (54, 3) = Vector(2, {(1) = -1, (2) = -1}), (55, 1) = Vector(2, {(1) = 3, (2) = 6}), (55, 2) = Vector(2, {(1) = -3, (2) = 0}), (55, 3) = Vector(2, {(1) = -1, (2) = -1}), (56, 1) = Vector(2, {(1) = 0, (2) = 6}), (56, 2) = Vector(2, {(1) = -3, (2) = -1}), (56, 3) = Vector(2, {(1) = 0, (2) = -1}), (57, 1) = Vector(2, {(1) = -3, (2) = 5}), (57, 2) = Vector(2, {(1) = -2, (2) = -2}), (57, 3) = Vector(2, {(1) = 1, (2) = -1}), (58, 1) = Vector(2, {(1) = -5, (2) = 3}), (58, 2) = Vector(2, {(1) = -1, (2) = -3}), (58, 3) = Vector(2, {(1) = 1, (2) = -1}), (59, 1) = Vector(2, {(1) = -6, (2) = 0}), (59, 2) = Vector(2, {(1) = 0, (2) = -3}), (59, 3) = Vector(2, {(1) = 1, (2) = 0}), (60, 1) = Vector(2, {(1) = -6, (2) = -3}), (60, 2) = Vector(2, {(1) = 1, (2) = -2}), (60, 3) = Vector(2, {(1) = 1, (2) = 1})})

M := Matrix(60, 3, {(1, 1) = Vector(2, {(1) = -3, (2) = 5}), (1, 2) = Vector(2, {(1) = -2, (2) = -2}), (1, 3) = Vector(2, {(1) = 0, (2) = 0}), (2, 1) = Vector(2, {(1) = -5, (2) = 3}), (2, 2) = Vector(2, {(1) = -1, (2) = -3}), (2, 3) = Vector(2, {(1) = 1, (2) = -1}), (3, 1) = Vector(2, {(1) = -6, (2) = 0}), (3, 2) = Vector(2, {(1) = 0, (2) = -3}), (3, 3) = Vector(2, {(1) = 1, (2) = 0}), (4, 1) = Vector(2, {(1) = -6, (2) = -3}), (4, 2) = Vector(2, {(1) = 1, (2) = -2}), (4, 3) = Vector(2, {(1) = 1, (2) = 1}), (5, 1) = Vector(2, {(1) = -5, (2) = -5}), (5, 2) = Vector(2, {(1) = 2, (2) = -1}), (5, 3) = Vector(2, {(1) = 1, (2) = 1}), (6, 1) = Vector(2, {(1) = -3, (2) = -6}), (6, 2) = Vector(2, {(1) = 3, (2) = 0}), (6, 3) = Vector(2, {(1) = 1, (2) = 1}), (7, 1) = Vector(2, {(1) = 0, (2) = -6}), (7, 2) = Vector(2, {(1) = 3, (2) = 1}), (7, 3) = Vector(2, {(1) = 0, (2) = 1}), (8, 1) = Vector(2, {(1) = 3, (2) = -5}), (8, 2) = Vector(2, {(1) = 2, (2) = 2}), (8, 3) = Vector(2, {(1) = -1, (2) = 1}), (9, 1) = Vector(2, {(1) = 5, (2) = -3}), (9, 2) = Vector(2, {(1) = 1, (2) = 3}), (9, 3) = Vector(2, {(1) = -1, (2) = 1}), (10, 1) = Vector(2, {(1) = 6, (2) = 0}), (10, 2) = Vector(2, {(1) = 0, (2) = 3}), (10, 3) = Vector(2, {(1) = -1, (2) = 0}), (11, 1) = Vector(2, {(1) = 6, (2) = 3}), (11, 2) = Vector(2, {(1) = -1, (2) = 2}), (11, 3) = Vector(2, {(1) = -1, (2) = -1}), (12, 1) = Vector(2, {(1) = 5, (2) = 5}), (12, 2) = Vector(2, {(1) = -2, (2) = 1}), (12, 3) = Vector(2, {(1) = -1, (2) = -1}), (13, 1) = Vector(2, {(1) = 3, (2) = 6}), (13, 2) = Vector(2, {(1) = -3, (2) = 0}), (13, 3) = Vector(2, {(1) = -1, (2) = -1}), (14, 1) = Vector(2, {(1) = 0, (2) = 6}), (14, 2) = Vector(2, {(1) = -3, (2) = -1}), (14, 3) = Vector(2, {(1) = 0, (2) = -1}), (15, 1) = Vector(2, {(1) = -3, (2) = 5}), (15, 2) = Vector(2, {(1) = -2, (2) = -2}), (15, 3) = Vector(2, {(1) = 1, (2) = -1}), (16, 1) = Vector(2, {(1) = -5, (2) = 3}), (16, 2) = Vector(2, {(1) = -1, (2) = -3}), (16, 3) = Vector(2, {(1) = 1, (2) = -1}), (17, 1) = Vector(2, {(1) = -6, (2) = 0}), (17, 2) = Vector(2, {(1) = 0, (2) = -3}), (17, 3) = Vector(2, {(1) = 1, (2) = 0}), (18, 1) = Vector(2, {(1) = -6, (2) = -3}), (18, 2) = Vector(2, {(1) = 1, (2) = -2}), (18, 3) = Vector(2, {(1) = 1, (2) = 1}), (19, 1) = Vector(2, {(1) = -5, (2) = -5}), (19, 2) = Vector(2, {(1) = 2, (2) = -1}), (19, 3) = Vector(2, {(1) = 1, (2) = 1}), (20, 1) = Vector(2, {(1) = -3, (2) = -6}), (20, 2) = Vector(2, {(1) = 3, (2) = 0}), (20, 3) = Vector(2, {(1) = 1, (2) = 1}), (21, 1) = Vector(2, {(1) = 0, (2) = -6}), (21, 2) = Vector(2, {(1) = 3, (2) = 1}), (21, 3) = Vector(2, {(1) = 0, (2) = 1}), (22, 1) = Vector(2, {(1) = 3, (2) = -5}), (22, 2) = Vector(2, {(1) = 2, (2) = 2}), (22, 3) = Vector(2, {(1) = -1, (2) = 1}), (23, 1) = Vector(2, {(1) = 5, (2) = -3}), (23, 2) = Vector(2, {(1) = 1, (2) = 3}), (23, 3) = Vector(2, {(1) = -1, (2) = 1}), (24, 1) = Vector(2, {(1) = 6, (2) = 0}), (24, 2) = Vector(2, {(1) = 0, (2) = 3}), (24, 3) = Vector(2, {(1) = -1, (2) = 0}), (25, 1) = Vector(2, {(1) = 6, (2) = 3}), (25, 2) = Vector(2, {(1) = -1, (2) = 2}), (25, 3) = Vector(2, {(1) = -1, (2) = -1}), (26, 1) = Vector(2, {(1) = 5, (2) = 5}), (26, 2) = Vector(2, {(1) = -2, (2) = 1}), (26, 3) = Vector(2, {(1) = -1, (2) = -1}), (27, 1) = Vector(2, {(1) = 3, (2) = 6}), (27, 2) = Vector(2, {(1) = -3, (2) = 0}), (27, 3) = Vector(2, {(1) = -1, (2) = -1}), (28, 1) = Vector(2, {(1) = 0, (2) = 6}), (28, 2) = Vector(2, {(1) = -3, (2) = -1}), (28, 3) = Vector(2, {(1) = 0, (2) = -1}), (29, 1) = Vector(2, {(1) = -3, (2) = 5}), (29, 2) = Vector(2, {(1) = -2, (2) = -2}), (29, 3) = Vector(2, {(1) = 1, (2) = -1}), (30, 1) = Vector(2, {(1) = -5, (2) = 3}), (30, 2) = Vector(2, {(1) = -1, (2) = -3}), (30, 3) = Vector(2, {(1) = 1, (2) = -1}), (31, 1) = Vector(2, {(1) = -6, (2) = 0}), (31, 2) = Vector(2, {(1) = 0, (2) = -3}), (31, 3) = Vector(2, {(1) = 1, (2) = 0}), (32, 1) = Vector(2, {(1) = -6, (2) = -3}), (32, 2) = Vector(2, {(1) = 1, (2) = -2}), (32, 3) = Vector(2, {(1) = 1, (2) = 1}), (33, 1) = Vector(2, {(1) = -5, (2) = -5}), (33, 2) = Vector(2, {(1) = 2, (2) = -1}), (33, 3) = Vector(2, {(1) = 1, (2) = 1}), (34, 1) = Vector(2, {(1) = -3, (2) = -6}), (34, 2) = Vector(2, {(1) = 3, (2) = 0}), (34, 3) = Vector(2, {(1) = 1, (2) = 1}), (35, 1) = Vector(2, {(1) = 0, (2) = -6}), (35, 2) = Vector(2, {(1) = 3, (2) = 1}), (35, 3) = Vector(2, {(1) = 0, (2) = 1}), (36, 1) = Vector(2, {(1) = 3, (2) = -5}), (36, 2) = Vector(2, {(1) = 2, (2) = 2}), (36, 3) = Vector(2, {(1) = -1, (2) = 1}), (37, 1) = Vector(2, {(1) = 5, (2) = -3}), (37, 2) = Vector(2, {(1) = 1, (2) = 3}), (37, 3) = Vector(2, {(1) = -1, (2) = 1}), (38, 1) = Vector(2, {(1) = 6, (2) = 0}), (38, 2) = Vector(2, {(1) = 0, (2) = 3}), (38, 3) = Vector(2, {(1) = -1, (2) = 0}), (39, 1) = Vector(2, {(1) = 6, (2) = 3}), (39, 2) = Vector(2, {(1) = -1, (2) = 2}), (39, 3) = Vector(2, {(1) = -1, (2) = -1}), (40, 1) = Vector(2, {(1) = 5, (2) = 5}), (40, 2) = Vector(2, {(1) = -2, (2) = 1}), (40, 3) = Vector(2, {(1) = -1, (2) = -1}), (41, 1) = Vector(2, {(1) = 3, (2) = 6}), (41, 2) = Vector(2, {(1) = -3, (2) = 0}), (41, 3) = Vector(2, {(1) = -1, (2) = -1}), (42, 1) = Vector(2, {(1) = 0, (2) = 6}), (42, 2) = Vector(2, {(1) = -3, (2) = -1}), (42, 3) = Vector(2, {(1) = 0, (2) = -1}), (43, 1) = Vector(2, {(1) = -3, (2) = 5}), (43, 2) = Vector(2, {(1) = -2, (2) = -2}), (43, 3) = Vector(2, {(1) = 1, (2) = -1}), (44, 1) = Vector(2, {(1) = -5, (2) = 3}), (44, 2) = Vector(2, {(1) = -1, (2) = -3}), (44, 3) = Vector(2, {(1) = 1, (2) = -1}), (45, 1) = Vector(2, {(1) = -6, (2) = 0}), (45, 2) = Vector(2, {(1) = 0, (2) = -3}), (45, 3) = Vector(2, {(1) = 1, (2) = 0}), (46, 1) = Vector(2, {(1) = -6, (2) = -3}), (46, 2) = Vector(2, {(1) = 1, (2) = -2}), (46, 3) = Vector(2, {(1) = 1, (2) = 1}), (47, 1) = Vector(2, {(1) = -5, (2) = -5}), (47, 2) = Vector(2, {(1) = 2, (2) = -1}), (47, 3) = Vector(2, {(1) = 1, (2) = 1}), (48, 1) = Vector(2, {(1) = -3, (2) = -6}), (48, 2) = Vector(2, {(1) = 3, (2) = 0}), (48, 3) = Vector(2, {(1) = 1, (2) = 1}), (49, 1) = Vector(2, {(1) = 0, (2) = -6}), (49, 2) = Vector(2, {(1) = 3, (2) = 1}), (49, 3) = Vector(2, {(1) = 0, (2) = 1}), (50, 1) = Vector(2, {(1) = 3, (2) = -5}), (50, 2) = Vector(2, {(1) = 2, (2) = 2}), (50, 3) = Vector(2, {(1) = -1, (2) = 1}), (51, 1) = Vector(2, {(1) = 5, (2) = -3}), (51, 2) = Vector(2, {(1) = 1, (2) = 3}), (51, 3) = Vector(2, {(1) = -1, (2) = 1}), (52, 1) = Vector(2, {(1) = 6, (2) = 0}), (52, 2) = Vector(2, {(1) = 0, (2) = 3}), (52, 3) = Vector(2, {(1) = -1, (2) = 0}), (53, 1) = Vector(2, {(1) = 6, (2) = 3}), (53, 2) = Vector(2, {(1) = -1, (2) = 2}), (53, 3) = Vector(2, {(1) = -1, (2) = -1}), (54, 1) = Vector(2, {(1) = 5, (2) = 5}), (54, 2) = Vector(2, {(1) = -2, (2) = 1}), (54, 3) = Vector(2, {(1) = -1, (2) = -1}), (55, 1) = Vector(2, {(1) = 3, (2) = 6}), (55, 2) = Vector(2, {(1) = -3, (2) = 0}), (55, 3) = Vector(2, {(1) = -1, (2) = -1}), (56, 1) = Vector(2, {(1) = 0, (2) = 6}), (56, 2) = Vector(2, {(1) = -3, (2) = -1}), (56, 3) = Vector(2, {(1) = 0, (2) = -1}), (57, 1) = Vector(2, {(1) = -3, (2) = 5}), (57, 2) = Vector(2, {(1) = -2, (2) = -2}), (57, 3) = Vector(2, {(1) = 1, (2) = -1}), (58, 1) = Vector(2, {(1) = -5, (2) = 3}), (58, 2) = Vector(2, {(1) = -1, (2) = -3}), (58, 3) = Vector(2, {(1) = 1, (2) = -1}), (59, 1) = Vector(2, {(1) = -6, (2) = 0}), (59, 2) = Vector(2, {(1) = 0, (2) = -3}), (59, 3) = Vector(2, {(1) = 1, (2) = 0}), (60, 1) = Vector(2, {(1) = -6, (2) = -3}), (60, 2) = Vector(2, {(1) = 1, (2) = -2}), (60, 3) = Vector(2, {(1) = 1, (2) = 1})})

(3)

xmin := 0; xmax := 0; ymin := 0; ymax := 0; for i from 2 while M[i, 1] <> M[1, 1] and i < 25 do xmin := min(M[i, 1][1], xmin); ymin := min(M[i, 1][2], ymin); xmax := max(M[i, 1][1], xmax); ymax := max(M[i, 1][1], ymax) end do; i, xmin, xmax, ymin, ymax

25, -6, 6, -6, 6

(4)

orb := plot(([seq])([M[j, 1][1], M[j, 1][2]], j = 1 .. i), colour = blue); l1 := plot(sqrt(2-sqrt(2))*x/sqrt(2+sqrt(2)), x = xmin .. xmax, colour = green); l2 := plot(-sqrt(2-sqrt(2))*x/sqrt(2+sqrt(2)), x = xmin .. xmax, colour = green); l3 := plot(sqrt(2+sqrt(2))*x/sqrt(2-sqrt(2)), x = xmin .. xmax, y = ymin .. ymax, colour = green); l4 := plot(-sqrt(2+sqrt(2))*x/sqrt(2-sqrt(2)), x = xmin .. xmax, y = ymin .. ymax, colour = green); display(orb, l1, l2, l3, l4, scaling = constrained)

 

accel := plottools:-arrow(seq([M[j, 1][1], M[j, 1][2]], [M[j, 3][1], M[j, 3][2]], j = 1 .. i), colour = red)

Error, invalid input: seq expects its 3rd argument, step, to be of type numeric, but received j = 1 .. 25

 

``


 

Download plot_arrows_sequence.mw

 

I want to learn about why sometimes different algebraic expressions are ordered differently, and what would be the best way to instruct maple to chose a different "rule" for which a set of arithmetic functions are ordered, while still maintaining the axiom of uniqueness. 

 

I figured this would be accomplished on a case by case basis, and it may involve just using lists instead,defining a procedure to produce the desired ordering for any given set of functions, and using the "remove" command to replace the set "difference" operator and the Join command for the lists in place of the union operator. Then of course using the "Remove Duplicates" option from ListTools to impose the axiom of unique elements. 

 

Is this the best way to go about this, or is there a much simpler way, that includes an abstract algebra package that I'm unaware of thus far?

Hello everyone. Does anyone know how to display more than one rectangles on a single graph?

For example,

RECTANGLE 1:

 

RECTANGLE 2:

We wish to display both rectangles on a single graph without adjusting any of the coordinates. Look forward to anyone that familiar or even have any idea on this issue. Thanks in advanced:)

Dear sir, I hereby request you to suggest an appropriate method to plot phase portrait sketches for the above cited subject

in 2D and 3D for the problem  

 

 

With thanks and regards.

 

Mr M ANAND

Associate Profesoor in Mathematics.

This question is related to an answer I gave here:
So, please look at a simple worksheet containing only a few lines; the resuts are in the # comments.

restart;
evalf(frac(Pi^20));

#                              23.
restart;
printlevel:=40:
evalf(frac(Pi^20));

  ###  prinlevel stuff
#                              0.


And now the questions.
1. Why the first evalf(frac(Pi^20))  does not  call  `evalf/frac`?
     (the second does, trace(`evalf/frac`)  shows this  if inserted).
     Note that  `evalf/frac`(Pi^20)    returns  0.
2. Why evalf(frac(Pi^20))    depends on printlevel?
    Note that  if  printlevel is changed to 20 (say)  the result is again 23.
3. Why if we set interface(typesetting=standard)  in a fresh session
     the results are both 23?

 

I can't get a While do loop to work as expected.

For i from 2 while M[i,1]<>M[1,1] and i<25 do..   It doesn't catch row 15 where M[15,1] =M[1,1] but it does stop at i = 24 ok.
 

restart

``

M := Matrix(60, 3, {(1, 1) = Vector(2, {(1) = -3, (2) = 5}), (1, 2) = Vector(2, {(1) = -2, (2) = -2}), (1, 3) = Vector(2, {(1) = 0, (2) = 0}), (2, 1) = Vector(2, {(1) = -5, (2) = 3}), (2, 2) = Vector(2, {(1) = -1, (2) = -3}), (2, 3) = Vector(2, {(1) = 1, (2) = -1}), (3, 1) = Vector(2, {(1) = -6, (2) = 0}), (3, 2) = Vector(2, {(1) = 0, (2) = -3}), (3, 3) = Vector(2, {(1) = 1, (2) = 0}), (4, 1) = Vector(2, {(1) = -6, (2) = -3}), (4, 2) = Vector(2, {(1) = 1, (2) = -2}), (4, 3) = Vector(2, {(1) = 1, (2) = 1}), (5, 1) = Vector(2, {(1) = -5, (2) = -5}), (5, 2) = Vector(2, {(1) = 2, (2) = -1}), (5, 3) = Vector(2, {(1) = 1, (2) = 1}), (6, 1) = Vector(2, {(1) = -3, (2) = -6}), (6, 2) = Vector(2, {(1) = 3, (2) = 0}), (6, 3) = Vector(2, {(1) = 1, (2) = 1}), (7, 1) = Vector(2, {(1) = 0, (2) = -6}), (7, 2) = Vector(2, {(1) = 3, (2) = 1}), (7, 3) = Vector(2, {(1) = 0, (2) = 1}), (8, 1) = Vector(2, {(1) = 3, (2) = -5}), (8, 2) = Vector(2, {(1) = 2, (2) = 2}), (8, 3) = Vector(2, {(1) = -1, (2) = 1}), (9, 1) = Vector(2, {(1) = 5, (2) = -3}), (9, 2) = Vector(2, {(1) = 1, (2) = 3}), (9, 3) = Vector(2, {(1) = -1, (2) = 1}), (10, 1) = Vector(2, {(1) = 6, (2) = 0}), (10, 2) = Vector(2, {(1) = 0, (2) = 3}), (10, 3) = Vector(2, {(1) = -1, (2) = 0}), (11, 1) = Vector(2, {(1) = 6, (2) = 3}), (11, 2) = Vector(2, {(1) = -1, (2) = 2}), (11, 3) = Vector(2, {(1) = -1, (2) = -1}), (12, 1) = Vector(2, {(1) = 5, (2) = 5}), (12, 2) = Vector(2, {(1) = -2, (2) = 1}), (12, 3) = Vector(2, {(1) = -1, (2) = -1}), (13, 1) = Vector(2, {(1) = 3, (2) = 6}), (13, 2) = Vector(2, {(1) = -3, (2) = 0}), (13, 3) = Vector(2, {(1) = -1, (2) = -1}), (14, 1) = Vector(2, {(1) = 0, (2) = 6}), (14, 2) = Vector(2, {(1) = -3, (2) = -1}), (14, 3) = Vector(2, {(1) = 0, (2) = -1}), (15, 1) = Vector(2, {(1) = -3, (2) = 5}), (15, 2) = Vector(2, {(1) = -2, (2) = -2}), (15, 3) = Vector(2, {(1) = 1, (2) = -1}), (16, 1) = Vector(2, {(1) = -5, (2) = 3}), (16, 2) = Vector(2, {(1) = -1, (2) = -3}), (16, 3) = Vector(2, {(1) = 1, (2) = -1}), (17, 1) = Vector(2, {(1) = -6, (2) = 0}), (17, 2) = Vector(2, {(1) = 0, (2) = -3}), (17, 3) = Vector(2, {(1) = 1, (2) = 0}), (18, 1) = Vector(2, {(1) = -6, (2) = -3}), (18, 2) = Vector(2, {(1) = 1, (2) = -2}), (18, 3) = Vector(2, {(1) = 1, (2) = 1}), (19, 1) = Vector(2, {(1) = -5, (2) = -5}), (19, 2) = Vector(2, {(1) = 2, (2) = -1}), (19, 3) = Vector(2, {(1) = 1, (2) = 1}), (20, 1) = Vector(2, {(1) = -3, (2) = -6}), (20, 2) = Vector(2, {(1) = 3, (2) = 0}), (20, 3) = Vector(2, {(1) = 1, (2) = 1}), (21, 1) = Vector(2, {(1) = 0, (2) = -6}), (21, 2) = Vector(2, {(1) = 3, (2) = 1}), (21, 3) = Vector(2, {(1) = 0, (2) = 1}), (22, 1) = Vector(2, {(1) = 3, (2) = -5}), (22, 2) = Vector(2, {(1) = 2, (2) = 2}), (22, 3) = Vector(2, {(1) = -1, (2) = 1}), (23, 1) = Vector(2, {(1) = 5, (2) = -3}), (23, 2) = Vector(2, {(1) = 1, (2) = 3}), (23, 3) = Vector(2, {(1) = -1, (2) = 1}), (24, 1) = Vector(2, {(1) = 6, (2) = 0}), (24, 2) = Vector(2, {(1) = 0, (2) = 3}), (24, 3) = Vector(2, {(1) = -1, (2) = 0}), (25, 1) = Vector(2, {(1) = 6, (2) = 3}), (25, 2) = Vector(2, {(1) = -1, (2) = 2}), (25, 3) = Vector(2, {(1) = -1, (2) = -1}), (26, 1) = Vector(2, {(1) = 5, (2) = 5}), (26, 2) = Vector(2, {(1) = -2, (2) = 1}), (26, 3) = Vector(2, {(1) = -1, (2) = -1}), (27, 1) = Vector(2, {(1) = 3, (2) = 6}), (27, 2) = Vector(2, {(1) = -3, (2) = 0}), (27, 3) = Vector(2, {(1) = -1, (2) = -1}), (28, 1) = Vector(2, {(1) = 0, (2) = 6}), (28, 2) = Vector(2, {(1) = -3, (2) = -1}), (28, 3) = Vector(2, {(1) = 0, (2) = -1}), (29, 1) = Vector(2, {(1) = -3, (2) = 5}), (29, 2) = Vector(2, {(1) = -2, (2) = -2}), (29, 3) = Vector(2, {(1) = 1, (2) = -1}), (30, 1) = Vector(2, {(1) = -5, (2) = 3}), (30, 2) = Vector(2, {(1) = -1, (2) = -3}), (30, 3) = Vector(2, {(1) = 1, (2) = -1}), (31, 1) = Vector(2, {(1) = -6, (2) = 0}), (31, 2) = Vector(2, {(1) = 0, (2) = -3}), (31, 3) = Vector(2, {(1) = 1, (2) = 0}), (32, 1) = Vector(2, {(1) = -6, (2) = -3}), (32, 2) = Vector(2, {(1) = 1, (2) = -2}), (32, 3) = Vector(2, {(1) = 1, (2) = 1}), (33, 1) = Vector(2, {(1) = -5, (2) = -5}), (33, 2) = Vector(2, {(1) = 2, (2) = -1}), (33, 3) = Vector(2, {(1) = 1, (2) = 1}), (34, 1) = Vector(2, {(1) = -3, (2) = -6}), (34, 2) = Vector(2, {(1) = 3, (2) = 0}), (34, 3) = Vector(2, {(1) = 1, (2) = 1}), (35, 1) = Vector(2, {(1) = 0, (2) = -6}), (35, 2) = Vector(2, {(1) = 3, (2) = 1}), (35, 3) = Vector(2, {(1) = 0, (2) = 1}), (36, 1) = Vector(2, {(1) = 3, (2) = -5}), (36, 2) = Vector(2, {(1) = 2, (2) = 2}), (36, 3) = Vector(2, {(1) = -1, (2) = 1}), (37, 1) = Vector(2, {(1) = 5, (2) = -3}), (37, 2) = Vector(2, {(1) = 1, (2) = 3}), (37, 3) = Vector(2, {(1) = -1, (2) = 1}), (38, 1) = Vector(2, {(1) = 6, (2) = 0}), (38, 2) = Vector(2, {(1) = 0, (2) = 3}), (38, 3) = Vector(2, {(1) = -1, (2) = 0}), (39, 1) = Vector(2, {(1) = 6, (2) = 3}), (39, 2) = Vector(2, {(1) = -1, (2) = 2}), (39, 3) = Vector(2, {(1) = -1, (2) = -1}), (40, 1) = Vector(2, {(1) = 5, (2) = 5}), (40, 2) = Vector(2, {(1) = -2, (2) = 1}), (40, 3) = Vector(2, {(1) = -1, (2) = -1}), (41, 1) = Vector(2, {(1) = 3, (2) = 6}), (41, 2) = Vector(2, {(1) = -3, (2) = 0}), (41, 3) = Vector(2, {(1) = -1, (2) = -1}), (42, 1) = Vector(2, {(1) = 0, (2) = 6}), (42, 2) = Vector(2, {(1) = -3, (2) = -1}), (42, 3) = Vector(2, {(1) = 0, (2) = -1}), (43, 1) = Vector(2, {(1) = -3, (2) = 5}), (43, 2) = Vector(2, {(1) = -2, (2) = -2}), (43, 3) = Vector(2, {(1) = 1, (2) = -1}), (44, 1) = Vector(2, {(1) = -5, (2) = 3}), (44, 2) = Vector(2, {(1) = -1, (2) = -3}), (44, 3) = Vector(2, {(1) = 1, (2) = -1}), (45, 1) = Vector(2, {(1) = -6, (2) = 0}), (45, 2) = Vector(2, {(1) = 0, (2) = -3}), (45, 3) = Vector(2, {(1) = 1, (2) = 0}), (46, 1) = Vector(2, {(1) = -6, (2) = -3}), (46, 2) = Vector(2, {(1) = 1, (2) = -2}), (46, 3) = Vector(2, {(1) = 1, (2) = 1}), (47, 1) = Vector(2, {(1) = -5, (2) = -5}), (47, 2) = Vector(2, {(1) = 2, (2) = -1}), (47, 3) = Vector(2, {(1) = 1, (2) = 1}), (48, 1) = Vector(2, {(1) = -3, (2) = -6}), (48, 2) = Vector(2, {(1) = 3, (2) = 0}), (48, 3) = Vector(2, {(1) = 1, (2) = 1}), (49, 1) = Vector(2, {(1) = 0, (2) = -6}), (49, 2) = Vector(2, {(1) = 3, (2) = 1}), (49, 3) = Vector(2, {(1) = 0, (2) = 1}), (50, 1) = Vector(2, {(1) = 3, (2) = -5}), (50, 2) = Vector(2, {(1) = 2, (2) = 2}), (50, 3) = Vector(2, {(1) = -1, (2) = 1}), (51, 1) = Vector(2, {(1) = 5, (2) = -3}), (51, 2) = Vector(2, {(1) = 1, (2) = 3}), (51, 3) = Vector(2, {(1) = -1, (2) = 1}), (52, 1) = Vector(2, {(1) = 6, (2) = 0}), (52, 2) = Vector(2, {(1) = 0, (2) = 3}), (52, 3) = Vector(2, {(1) = -1, (2) = 0}), (53, 1) = Vector(2, {(1) = 6, (2) = 3}), (53, 2) = Vector(2, {(1) = -1, (2) = 2}), (53, 3) = Vector(2, {(1) = -1, (2) = -1}), (54, 1) = Vector(2, {(1) = 5, (2) = 5}), (54, 2) = Vector(2, {(1) = -2, (2) = 1}), (54, 3) = Vector(2, {(1) = -1, (2) = -1}), (55, 1) = Vector(2, {(1) = 3, (2) = 6}), (55, 2) = Vector(2, {(1) = -3, (2) = 0}), (55, 3) = Vector(2, {(1) = -1, (2) = -1}), (56, 1) = Vector(2, {(1) = 0, (2) = 6}), (56, 2) = Vector(2, {(1) = -3, (2) = -1}), (56, 3) = Vector(2, {(1) = 0, (2) = -1}), (57, 1) = Vector(2, {(1) = -3, (2) = 5}), (57, 2) = Vector(2, {(1) = -2, (2) = -2}), (57, 3) = Vector(2, {(1) = 1, (2) = -1}), (58, 1) = Vector(2, {(1) = -5, (2) = 3}), (58, 2) = Vector(2, {(1) = -1, (2) = -3}), (58, 3) = Vector(2, {(1) = 1, (2) = -1}), (59, 1) = Vector(2, {(1) = -6, (2) = 0}), (59, 2) = Vector(2, {(1) = 0, (2) = -3}), (59, 3) = Vector(2, {(1) = 1, (2) = 0}), (60, 1) = Vector(2, {(1) = -6, (2) = -3}), (60, 2) = Vector(2, {(1) = 1, (2) = -2}), (60, 3) = Vector(2, {(1) = 1, (2) = 1})})

M := Matrix(60, 3, {(1, 1) = Vector(2, {(1) = -3, (2) = 5}), (1, 2) = Vector(2, {(1) = -2, (2) = -2}), (1, 3) = Vector(2, {(1) = 0, (2) = 0}), (2, 1) = Vector(2, {(1) = -5, (2) = 3}), (2, 2) = Vector(2, {(1) = -1, (2) = -3}), (2, 3) = Vector(2, {(1) = 1, (2) = -1}), (3, 1) = Vector(2, {(1) = -6, (2) = 0}), (3, 2) = Vector(2, {(1) = 0, (2) = -3}), (3, 3) = Vector(2, {(1) = 1, (2) = 0}), (4, 1) = Vector(2, {(1) = -6, (2) = -3}), (4, 2) = Vector(2, {(1) = 1, (2) = -2}), (4, 3) = Vector(2, {(1) = 1, (2) = 1}), (5, 1) = Vector(2, {(1) = -5, (2) = -5}), (5, 2) = Vector(2, {(1) = 2, (2) = -1}), (5, 3) = Vector(2, {(1) = 1, (2) = 1}), (6, 1) = Vector(2, {(1) = -3, (2) = -6}), (6, 2) = Vector(2, {(1) = 3, (2) = 0}), (6, 3) = Vector(2, {(1) = 1, (2) = 1}), (7, 1) = Vector(2, {(1) = 0, (2) = -6}), (7, 2) = Vector(2, {(1) = 3, (2) = 1}), (7, 3) = Vector(2, {(1) = 0, (2) = 1}), (8, 1) = Vector(2, {(1) = 3, (2) = -5}), (8, 2) = Vector(2, {(1) = 2, (2) = 2}), (8, 3) = Vector(2, {(1) = -1, (2) = 1}), (9, 1) = Vector(2, {(1) = 5, (2) = -3}), (9, 2) = Vector(2, {(1) = 1, (2) = 3}), (9, 3) = Vector(2, {(1) = -1, (2) = 1}), (10, 1) = Vector(2, {(1) = 6, (2) = 0}), (10, 2) = Vector(2, {(1) = 0, (2) = 3}), (10, 3) = Vector(2, {(1) = -1, (2) = 0}), (11, 1) = Vector(2, {(1) = 6, (2) = 3}), (11, 2) = Vector(2, {(1) = -1, (2) = 2}), (11, 3) = Vector(2, {(1) = -1, (2) = -1}), (12, 1) = Vector(2, {(1) = 5, (2) = 5}), (12, 2) = Vector(2, {(1) = -2, (2) = 1}), (12, 3) = Vector(2, {(1) = -1, (2) = -1}), (13, 1) = Vector(2, {(1) = 3, (2) = 6}), (13, 2) = Vector(2, {(1) = -3, (2) = 0}), (13, 3) = Vector(2, {(1) = -1, (2) = -1}), (14, 1) = Vector(2, {(1) = 0, (2) = 6}), (14, 2) = Vector(2, {(1) = -3, (2) = -1}), (14, 3) = Vector(2, {(1) = 0, (2) = -1}), (15, 1) = Vector(2, {(1) = -3, (2) = 5}), (15, 2) = Vector(2, {(1) = -2, (2) = -2}), (15, 3) = Vector(2, {(1) = 1, (2) = -1}), (16, 1) = Vector(2, {(1) = -5, (2) = 3}), (16, 2) = Vector(2, {(1) = -1, (2) = -3}), (16, 3) = Vector(2, {(1) = 1, (2) = -1}), (17, 1) = Vector(2, {(1) = -6, (2) = 0}), (17, 2) = Vector(2, {(1) = 0, (2) = -3}), (17, 3) = Vector(2, {(1) = 1, (2) = 0}), (18, 1) = Vector(2, {(1) = -6, (2) = -3}), (18, 2) = Vector(2, {(1) = 1, (2) = -2}), (18, 3) = Vector(2, {(1) = 1, (2) = 1}), (19, 1) = Vector(2, {(1) = -5, (2) = -5}), (19, 2) = Vector(2, {(1) = 2, (2) = -1}), (19, 3) = Vector(2, {(1) = 1, (2) = 1}), (20, 1) = Vector(2, {(1) = -3, (2) = -6}), (20, 2) = Vector(2, {(1) = 3, (2) = 0}), (20, 3) = Vector(2, {(1) = 1, (2) = 1}), (21, 1) = Vector(2, {(1) = 0, (2) = -6}), (21, 2) = Vector(2, {(1) = 3, (2) = 1}), (21, 3) = Vector(2, {(1) = 0, (2) = 1}), (22, 1) = Vector(2, {(1) = 3, (2) = -5}), (22, 2) = Vector(2, {(1) = 2, (2) = 2}), (22, 3) = Vector(2, {(1) = -1, (2) = 1}), (23, 1) = Vector(2, {(1) = 5, (2) = -3}), (23, 2) = Vector(2, {(1) = 1, (2) = 3}), (23, 3) = Vector(2, {(1) = -1, (2) = 1}), (24, 1) = Vector(2, {(1) = 6, (2) = 0}), (24, 2) = Vector(2, {(1) = 0, (2) = 3}), (24, 3) = Vector(2, {(1) = -1, (2) = 0}), (25, 1) = Vector(2, {(1) = 6, (2) = 3}), (25, 2) = Vector(2, {(1) = -1, (2) = 2}), (25, 3) = Vector(2, {(1) = -1, (2) = -1}), (26, 1) = Vector(2, {(1) = 5, (2) = 5}), (26, 2) = Vector(2, {(1) = -2, (2) = 1}), (26, 3) = Vector(2, {(1) = -1, (2) = -1}), (27, 1) = Vector(2, {(1) = 3, (2) = 6}), (27, 2) = Vector(2, {(1) = -3, (2) = 0}), (27, 3) = Vector(2, {(1) = -1, (2) = -1}), (28, 1) = Vector(2, {(1) = 0, (2) = 6}), (28, 2) = Vector(2, {(1) = -3, (2) = -1}), (28, 3) = Vector(2, {(1) = 0, (2) = -1}), (29, 1) = Vector(2, {(1) = -3, (2) = 5}), (29, 2) = Vector(2, {(1) = -2, (2) = -2}), (29, 3) = Vector(2, {(1) = 1, (2) = -1}), (30, 1) = Vector(2, {(1) = -5, (2) = 3}), (30, 2) = Vector(2, {(1) = -1, (2) = -3}), (30, 3) = Vector(2, {(1) = 1, (2) = -1}), (31, 1) = Vector(2, {(1) = -6, (2) = 0}), (31, 2) = Vector(2, {(1) = 0, (2) = -3}), (31, 3) = Vector(2, {(1) = 1, (2) = 0}), (32, 1) = Vector(2, {(1) = -6, (2) = -3}), (32, 2) = Vector(2, {(1) = 1, (2) = -2}), (32, 3) = Vector(2, {(1) = 1, (2) = 1}), (33, 1) = Vector(2, {(1) = -5, (2) = -5}), (33, 2) = Vector(2, {(1) = 2, (2) = -1}), (33, 3) = Vector(2, {(1) = 1, (2) = 1}), (34, 1) = Vector(2, {(1) = -3, (2) = -6}), (34, 2) = Vector(2, {(1) = 3, (2) = 0}), (34, 3) = Vector(2, {(1) = 1, (2) = 1}), (35, 1) = Vector(2, {(1) = 0, (2) = -6}), (35, 2) = Vector(2, {(1) = 3, (2) = 1}), (35, 3) = Vector(2, {(1) = 0, (2) = 1}), (36, 1) = Vector(2, {(1) = 3, (2) = -5}), (36, 2) = Vector(2, {(1) = 2, (2) = 2}), (36, 3) = Vector(2, {(1) = -1, (2) = 1}), (37, 1) = Vector(2, {(1) = 5, (2) = -3}), (37, 2) = Vector(2, {(1) = 1, (2) = 3}), (37, 3) = Vector(2, {(1) = -1, (2) = 1}), (38, 1) = Vector(2, {(1) = 6, (2) = 0}), (38, 2) = Vector(2, {(1) = 0, (2) = 3}), (38, 3) = Vector(2, {(1) = -1, (2) = 0}), (39, 1) = Vector(2, {(1) = 6, (2) = 3}), (39, 2) = Vector(2, {(1) = -1, (2) = 2}), (39, 3) = Vector(2, {(1) = -1, (2) = -1}), (40, 1) = Vector(2, {(1) = 5, (2) = 5}), (40, 2) = Vector(2, {(1) = -2, (2) = 1}), (40, 3) = Vector(2, {(1) = -1, (2) = -1}), (41, 1) = Vector(2, {(1) = 3, (2) = 6}), (41, 2) = Vector(2, {(1) = -3, (2) = 0}), (41, 3) = Vector(2, {(1) = -1, (2) = -1}), (42, 1) = Vector(2, {(1) = 0, (2) = 6}), (42, 2) = Vector(2, {(1) = -3, (2) = -1}), (42, 3) = Vector(2, {(1) = 0, (2) = -1}), (43, 1) = Vector(2, {(1) = -3, (2) = 5}), (43, 2) = Vector(2, {(1) = -2, (2) = -2}), (43, 3) = Vector(2, {(1) = 1, (2) = -1}), (44, 1) = Vector(2, {(1) = -5, (2) = 3}), (44, 2) = Vector(2, {(1) = -1, (2) = -3}), (44, 3) = Vector(2, {(1) = 1, (2) = -1}), (45, 1) = Vector(2, {(1) = -6, (2) = 0}), (45, 2) = Vector(2, {(1) = 0, (2) = -3}), (45, 3) = Vector(2, {(1) = 1, (2) = 0}), (46, 1) = Vector(2, {(1) = -6, (2) = -3}), (46, 2) = Vector(2, {(1) = 1, (2) = -2}), (46, 3) = Vector(2, {(1) = 1, (2) = 1}), (47, 1) = Vector(2, {(1) = -5, (2) = -5}), (47, 2) = Vector(2, {(1) = 2, (2) = -1}), (47, 3) = Vector(2, {(1) = 1, (2) = 1}), (48, 1) = Vector(2, {(1) = -3, (2) = -6}), (48, 2) = Vector(2, {(1) = 3, (2) = 0}), (48, 3) = Vector(2, {(1) = 1, (2) = 1}), (49, 1) = Vector(2, {(1) = 0, (2) = -6}), (49, 2) = Vector(2, {(1) = 3, (2) = 1}), (49, 3) = Vector(2, {(1) = 0, (2) = 1}), (50, 1) = Vector(2, {(1) = 3, (2) = -5}), (50, 2) = Vector(2, {(1) = 2, (2) = 2}), (50, 3) = Vector(2, {(1) = -1, (2) = 1}), (51, 1) = Vector(2, {(1) = 5, (2) = -3}), (51, 2) = Vector(2, {(1) = 1, (2) = 3}), (51, 3) = Vector(2, {(1) = -1, (2) = 1}), (52, 1) = Vector(2, {(1) = 6, (2) = 0}), (52, 2) = Vector(2, {(1) = 0, (2) = 3}), (52, 3) = Vector(2, {(1) = -1, (2) = 0}), (53, 1) = Vector(2, {(1) = 6, (2) = 3}), (53, 2) = Vector(2, {(1) = -1, (2) = 2}), (53, 3) = Vector(2, {(1) = -1, (2) = -1}), (54, 1) = Vector(2, {(1) = 5, (2) = 5}), (54, 2) = Vector(2, {(1) = -2, (2) = 1}), (54, 3) = Vector(2, {(1) = -1, (2) = -1}), (55, 1) = Vector(2, {(1) = 3, (2) = 6}), (55, 2) = Vector(2, {(1) = -3, (2) = 0}), (55, 3) = Vector(2, {(1) = -1, (2) = -1}), (56, 1) = Vector(2, {(1) = 0, (2) = 6}), (56, 2) = Vector(2, {(1) = -3, (2) = -1}), (56, 3) = Vector(2, {(1) = 0, (2) = -1}), (57, 1) = Vector(2, {(1) = -3, (2) = 5}), (57, 2) = Vector(2, {(1) = -2, (2) = -2}), (57, 3) = Vector(2, {(1) = 1, (2) = -1}), (58, 1) = Vector(2, {(1) = -5, (2) = 3}), (58, 2) = Vector(2, {(1) = -1, (2) = -3}), (58, 3) = Vector(2, {(1) = 1, (2) = -1}), (59, 1) = Vector(2, {(1) = -6, (2) = 0}), (59, 2) = Vector(2, {(1) = 0, (2) = -3}), (59, 3) = Vector(2, {(1) = 1, (2) = 0}), (60, 1) = Vector(2, {(1) = -6, (2) = -3}), (60, 2) = Vector(2, {(1) = 1, (2) = -2}), (60, 3) = Vector(2, {(1) = 1, (2) = 1})})

(1)

M[1, 1]; for i from 2 while M[i, 1] <> M[1, 1] and i < 25 do print(i, M[i, 1]) end do

24, Vector[column](%id = 18446745366646139710)

(2)

``


 

Download Test_While_do_loop.mw

I'm currently wondering about the cut I'm looking for in the following worksheet.

I evaluate it in 2 ways but get different answers. Any idea what the problem here is?

Thanks


 

restart; dIs := sqrt(Pi/(I*s))*exp(I*s*t-I*s*omega0^2); Is1 := `assuming`([simplify(int(dIs, s))], [s > 0]); dIs := `assuming`([int(exp(-I*(omega^2+omega0^2-t)*s), omega = -infinity .. infinity)], [s > 0]); Is2 := int(%, s); plot3d(Im(eval(Is1, [t = x+I*y, s = 1, omega0 = 1])), x = -3 .. 3, y = -3 .. 3)

(-I*Pi/s)^(1/2)*exp(I*s*t-I*s*omega0^2)

 

(1/2-(1/2)*I)*Pi*2^(1/2)*erf(s^(1/2)*(I*(omega0^2-t))^(1/2))/(I*(omega0^2-t))^(1/2)

 

exp(I*s*t-I*s*omega0^2)*Pi^(1/2)/(I*s)^(1/2)

 

-I*Pi*erf((omega0^2-t)^(1/2)*(I*s)^(1/2))/(omega0^2-t)^(1/2)

 

 

``


 

Download CutErrorFunction.mw

restart; with(plots);
[animate, animate3d, animatecurve, arrow, changecoords, 

  complexplot, complexplot3d, conformal, conformal3d, 

  contourplot, contourplot3d, coordplot, coordplot3d, 

  densityplot, display, dualaxisplot, fieldplot, fieldplot3d, 

  gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, 

  interactive, interactiveparams, intersectplot, listcontplot, 

  listcontplot3d, listdensityplot, listplot, listplot3d, 

  loglogplot, logplot, matrixplot, multiple, odeplot, pareto, 

  plotcompare, pointplot, pointplot3d, polarplot, polygonplot, 

  polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, 

  semilogplot, setcolors, setoptions, setoptions3d, spacecurve, 

  sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]


fixedparameter1 := [n = .3, W[e] = .3, M = .2, gamma = 1, delta = -1, N[r] = .8, Pr = .72, Nb = .5, Nt = .5, Bi = 2, Pr = .72, Le = 5];
[n = 0.3, W[e] = 0.3, M = 0.2, gamma = 1, delta = -1, N[r] = 0.8, 

  Pr = 0.72, Nb = 0.5, Nt = 0.5, Bi = 2, Pr = 0.72, Le = 5]


eq1 := (1-n)*(diff(f(eta), eta, eta, eta))+f(eta)*(diff(f(eta), eta, eta))-M*(diff(f(eta), eta))+n*W[e]*(diff(f(eta), eta, eta, eta))*(diff(f(eta), eta, eta)) = 0;
        /  d   /  d   /  d         \\\
(1 - n) |----- |----- |----- f(eta)|||
        \ deta \ deta \ deta       ///

            /  d   /  d         \\     /  d         \
   + f(eta) |----- |----- f(eta)|| - M |----- f(eta)|
            \ deta \ deta       //     \ deta       /

            /  d   /  d   /  d         \\\ /  d   /  d         \\   
   + n W[e] |----- |----- |----- f(eta)||| |----- |----- f(eta)|| = 
            \ deta \ deta \ deta       /// \ deta \ deta       //   

  0
deq1; eval(eq1, fixedparameter1);
    /  d   /  d   /  d         \\\
0.7 |----- |----- |----- f(eta)|||
    \ deta \ deta \ deta       ///

            /  d   /  d         \\       /  d         \
   + f(eta) |----- |----- f(eta)|| - 0.2 |----- f(eta)|
            \ deta \ deta       //       \ deta       /

          /  d   /  d   /  d         \\\ /  d   /  d         \\   
   + 0.09 |----- |----- |----- f(eta)||| |----- |----- f(eta)|| = 
          \ deta \ deta \ deta       /// \ deta \ deta       //   

  0
eq2 := (1+(4/3)*N[r])*(diff(theta(eta), eta, eta))+Pr*f(eta)*(diff(theta(eta), eta))+Nb*(diff(phi(eta), eta))*(diff(theta(eta), eta))+Nt*(diff(theta(eta), eta))*(diff(theta(eta), eta)) = 0;
          /    4     \ /  d   /  d             \\
          |1 + - N[r]| |----- |----- theta(eta)||
          \    3     / \ deta \ deta           //

                         /  d             \
             + Pr f(eta) |----- theta(eta)|
                         \ deta           /

                  /  d           \ /  d             \
             + Nb |----- phi(eta)| |----- theta(eta)|
                  \ deta         / \ deta           /

                                    2    
                  /  d             \     
             + Nt |----- theta(eta)|  = 0
                  \ deta           /     
deq2; eval(eq2, fixedparameter1);
                      /  d   /  d             \\
          2.066666667 |----- |----- theta(eta)||
                      \ deta \ deta           //

                           /  d             \
             + 0.72 f(eta) |----- theta(eta)|
                           \ deta           /

                   /  d           \ /  d             \
             + 0.5 |----- phi(eta)| |----- theta(eta)|
                   \ deta         / \ deta           /

                                     2    
                   /  d             \     
             + 0.5 |----- theta(eta)|  = 0
                   \ deta           /     
eq3 := diff(phi(eta), eta, eta)+Pr*Le*f(eta)*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta, eta))/Nb = 0;
    /  d   /  d           \\                /  d           \
    |----- |----- phi(eta)|| + Pr Le f(eta) |----- phi(eta)|
    \ deta \ deta         //                \ deta         /

            /  d   /  d             \\    
         Nt |----- |----- theta(eta)||    
            \ deta \ deta           //    
       + ----------------------------- = 0
                      Nb                  
deq3 := eval(eq3, fixedparameter1);
    /  d   /  d           \\               /  d           \
    |----- |----- phi(eta)|| + 3.60 f(eta) |----- phi(eta)|
    \ deta \ deta         //               \ deta         /

                     /  d   /  d             \\    
       + 1.000000000 |----- |----- theta(eta)|| = 0
                     \ deta \ deta           //    
bcs1 := f(0) = 0, D(f)(0) = 1+gamma*(D@D)(F)(0)+delta*(D@D@D)(f)(0), D(f)(8) = 0;
 f(0) = 0, 

   D(f)(0) = 1 + gamma @@(D, 2)(F)(0) + delta @@(D, 3)(f)(0), 

   D(f)(8) = 0
bc1 := eval(bcs1, fixedparameter1);
   f(0) = 0, D(f)(0) = 1 + @@(D, 2)(F)(0) - @@(D, 3)(f)(0), 

     D(f)(8) = 0
bcs2 := D(theta)(0) = Bi*(theta(0)-1), theta(8) = 0;
         D(theta)(0) = Bi (theta(0) - 1), theta(8) = 0
bc2 := eval(bcs2, fixedparameter1);
           D(theta)(0) = 2 theta(0) - 2, theta(8) = 0
bcs3 := Nb*D(phi)(0)+Nt*D(theta)(0) = 0, Nb*D(phi)(0)+Nt*D(theta)(0) = 0, phi(8) = 0;
        Nb D(phi)(0) + Nt D(theta)(0) = 0, 

          Nb D(phi)(0) + Nt D(theta)(0) = 0, phi(8) = 0
bc3 := eval(bcs3, fixedparameter1);
       0.5 D(phi)(0) + 0.5 D(theta)(0) = 0, 

         0.5 D(phi)(0) + 0.5 D(theta)(0) = 0, phi(8) = 0
R := dsolve({bc1, bc2, bc3, deq1, deq2, deq3}, [f(eta), theta(eta), phi(eta)], numeric, output = listprocedure);
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations


 

Hello! I am trying to make an if statement that is IF a bound is not equal to NULL, it does things, and if it IS equal to NULL, the bounds are set to zero. When a bound is null, they say 

bound1:=()

My first if statement will not work, please help!

 

bound1:=solve(tau(x)=(Intv||j)[1],x,useassumptions) assuming (Intv||i)[1]<=x<=(Intv||i)[2] ;  

bound2:=solve(tau(x)=(Intv||j)[2],x,useassumptions) assuming (Intv||i)[1]<=x<=(Intv||i)[2];

if bound1<>NULL;bound2<>NULL;  then

if bound1<=bound2   then  

lower:=bound1;  upper:=bound2  

else lower:=bound2;   upper:=bound1 end if;

else lower:=0; upper:=0 end if;

1 2 3 4 5 6 7 Last Page 1 of 1622