Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

K := x^3*y^4 + 6*x^2*y^3 + 3*x*y^4 + x^2*y^2 + 2*x*y^3;

f := (x, y) -> K; f(t, x);

 

It displays as x^3*y^4 + 6*x^2*y^3 + 3*x*y^4 + x^2*y^2 + 2*x*y^3;

 

instead of t^3*x^4 + 6*t^2*x^3 + 3*t*x^4 + t^2*x^2 + 2*t*x^3

 

But if i do direct assignment like f := (x, y) ->x^3*y^4 + 6*x^2*y^3 + 3*x*y^4 + x^2*y^2 + 2*x*y^3;

Then f(t,x) becomes and displays as t^3*x^4 + 6*t^2*x^3 + 3*t*x^4 + t^2*x^2 + 2*t*x^3;

But I want it like f:=(x,y)->K Later I should be able to make f(t,x) or f(p,s) like that K i can take some arbitary polynomial

Hi trying plot phase plane with these critical points. Howver what would I put for y at P1 to make it display when all y values

with(plots);
with(plottools);
with(DEtools);
solve({x*y = 0, x^2*y - x^2 = 0}, {x, y});
                         {x = 0, y = y}
initialset := {seq(seq([x(0) = a, y(0) = b], a = -2 .. 2), b = -2 .. 2)};
initialset := {[x(0) = -2, y(0) = -2], [x(0) = -2, y(0) = -1],

  [x(0) = -2, y(0) = 0], [x(0) = -2, y(0) = 1],

  [x(0) = -2, y(0) = 2], [x(0) = -1, y(0) = -2],

  [x(0) = -1, y(0) = -1], [x(0) = -1, y(0) = 0],

  [x(0) = -1, y(0) = 1], [x(0) = -1, y(0) = 2],

  [x(0) = 0, y(0) = -2], [x(0) = 0, y(0) = -1],

  [x(0) = 0, y(0) = 0], [x(0) = 0, y(0) = 1],

  [x(0) = 0, y(0) = 2], [x(0) = 1, y(0) = -2],

  [x(0) = 1, y(0) = -1], [x(0) = 1, y(0) = 0],

  [x(0) = 1, y(0) = 1], [x(0) = 1, y(0) = 2],

  [x(0) = 2, y(0) = -2], [x(0) = 2, y(0) = -1],

  [x(0) = 2, y(0) = 0], [x(0) = 2, y(0) = 1], [x(0) = 2, y(0) = 2]

  }
A := DEplot([diff(x(t), t) = x(t)^2*y(t) - x(t)^2, diff(y(t), t) = x(t)*y(t)], [x(t), y(t)], t = -3 .. 3, x = -8 .. 6, y = -5 .. 7, initialset, stepsize = 0.01, color = blue, linecolor = magenta, arrows = medium, axes = boxed, size = [1250, 1250]);
P1 := ellipse([0, y], 0.1, 0.15, filled = true, color = black);
Error, (in Plot:-TranslateOptions) unexpected options: [[0, y], .1, .15]
display([P1, A]);

 

When inside a section, why typing a command or any Maple expression, makes the cursor jump to outside the section after that?

Is it possible to create a new cell (i.e. >) and jump to that, so to remain inside the section?

Currently, I have to do CTRL-J to make new exection group, i.e. >, below the current one and remain inside the section, which is too much work. 

This is using worksheet mode. I see an option in tools->options->display to do that automatically. Which is great. But it does not work inside a SECTION. 

This is how to reproduce

1. set  tools->options->display->always insert new execution group after executing

2. In worksheet, click on insert->section to make new section.

3. in the first cell inside the section, type any Maple command or statement. Now you will see the cursor jumps outside the section, and makes new exection group (i.e. >).  But my cursor is now outside the section. So I have to move it back to inside the section.

I want to remain inside the section and have ">" be created inside the section.

Is this possible?

Maple 2021, windows. Worksheet mode.

I will make small movie to illustrate.

 

sometimes when I see such things, I get the feeling that the folks who develop the interface at Maplesoft, do not use it too much themselves. Else they would have noticed this annoyance in using sections. 

When inside a section, one would expect that a new exection cell to be created inside the section itself and not outside. 

 

Comparing the following 2 outputs, all done using worksheet mode. They are same expression. But one is generated using assignment and one using function definition (with arrow).

restart;
expr:=sinh(Pi)/Pi*(1+  Sum( (-1)^n/(1+n^2)*(cos(n*x)+n*sin(n*x)),n=1..m)):
f1:=expr;
f2:=unapply(expr,x);

Why Maple 2D display shows small dot for multiplication in the second case, but not in the first? Is there a way to remove this dot? I do not like it and find it distracting.  I looked at options->display and see nothing there to affect this.

 

Maple 2021 on windows 10

 

Just A Simple Fouier Transform Example:

Given x(t) = exp(-2*t) u(t) and X(ω) is equal to 1/(j*omega + 2);

Use The Frequency Differentiation of Fourier Transform to the Given Problem and Plot With An Amplitude Spectrum Graph:

Sorry Everyone: I am trying To Learn This Software and Need A Bit Of Help: I am Trying To Solve & Plot With An Amplitude Spectrum Graph #A & Problem #B. Can Anyone Help: 

Sorry I Do Not Know How & I Can Find Very Little Via Google a Google Search and Thank You A Million Times For Anyone That Can Help Me With Problems. 

#A). t*x(t)
#B). t^2*X(t)

#Solution To Example Problem #A 't*x(t)':

(t)^nX(t)->(j)^n*((ⅆ)^n)/((ⅆ)^( )omega^n)(X(omega));

n := -1;
                        
X := omega -> 1/(2 + j*omega);


diff([j^n*diff(X(omega), [omega $ n])], omega);

When I installed Maple 2021 student version (did an upgrade from Maple 2020 to get discount price). I noticed that Maple 2021 only has "shared server" icon to click on to start Maple GUI.

I do not know what the difference between "shared server" and the icon without it.

In Maple 2020, it shows both "maple 2020" and "shared server maple 2020". And when using 2020, I always clicked on "maple 2020", not the "shared server maple 2020".  This is standalone personal PC used only by me.

But in Maple 2021, only "shared server Maple 2021" shows up. And so this is the one I now use, and Maple comes up OK.

But why Maple 2021 do not have an icon without "shared server" on it like 2020?  Is this something I should worry about?

Here is screen shot from my START menu on windows 10 showing the difference. 

 

 

Im using geom3d trying to find a way to paramterise the equation of a circle in three dimensions how ever there is no function in that ive found that can do this. Geom3d is great at drawing and giving the equations of the sphere that i require and can even plot easily using the 'intersection' command but this never gives the actual parameterisation of the circle itself.

 

The equations of the spheres are easy to find and using them ive been attempting to code a way to give a paramterisation of the circle from code ive found online, but this only gives me the paramterisation of the positive/negative semicircle of what I want. I can obtain both halves of the circle and plot them together but I need the paramterisation of the full circle as I intend to use this. Does anyone know a better way of achiving this? 

(also Im not sure how to extract the equation of the plane from the geom3d[intersection] comand, its there under detail but im not sure how to have it assigned to its own object.

 

 

restart;
with(geom3d);
with(plots);
geom3d[point](A_1, -8.5, 0, 0);
point(A_2, 8.5, 0, 0);
point(B_1, 0., -5.5, sqrt(166/4));
point(B_2, 0., 5.5, sqrt(166/4));
sphere(Sb1_10, [B_1, 10]);
sphere(Sb2_10, [B_2, 10]);
sphere(Sa2_10, [A_2, 10]);
sphere(Sa1_12, [A_1, 12]);
sphere(Sa2_12, [A_2, 12]);
intersection(circ, Sb1_10, Sb2_10);
detail(circ);
draw([B_1, B_2, A_1, A_2, Sb1_10, Sb2_10, circ], axes = boxed);
plane(plane1, Sb1_10, Sb2_10);
M1 := Plane(circ);
detail(M1);
detail(plane1);
M := plane(K, Plane(circ), [x, y, z]);
form(M);
Equation(M);

 


S1 := Equation(Sb1_10, [x, y, z]);
S2 := Equation(Sb2_10, [x, y, z]);
s := eliminate({S1, S2}, y);
S_1 := solve(s[1, 2], {x(t), z(t)});
                   

 

 


assign(s[1, 1]);
assign(S_1[1]);
Eq1 := [normal(x), normal(y), normal(z)];
space1 := spacecurve(Eq1, t = -500 .. 500, color = red, scaling = constrained, axes = boxed, numpoints = 20000);
   

 

unassign('x');
unassign('z');
unassign('y');
assign(s[1, 1]);
assign(S_1[2]);
Eq2 := [normal(x), normal(y), normal(z)];
space2 := spacecurve(Eq2, t = -500 .. 500, color = green, scaling = constrained, axes = boxed, numpoints = 20000, title = "2");
 

 

unassign('x');
unassign('z');
unassign('y');
assign(s[2, 1]);
assign(S_1[1]);
Eq3 := [normal(x), normal(y), normal(z)];
space3 := spacecurve(Eq3, t = -500 .. 500, color = pink, scaling = constrained, axes = boxed, numpoints = 20000, title = "3");
 

unassign('x');
unassign('z');
unassign('y');
assign(s[2, 1]);
assign(S_1[2]);
Eq4 := [normal(x), normal(y), normal(z)];
space4 := spacecurve(Eq4, t = -500 .. 500, color = orange, scaling = constrained, axes = boxed, numpoints = 20000, title = "4");
 

Eq := Eq1 + Eq2 + Eq3 + Eq4;
spaceC := spacecurve({Eq}, t = -500 .. 500, color = blue, scaling = constrained, axes = boxed, numpoints = 20000);
display({space1, space2, space3, space4, spaceC});
 

restart;
with(geometry);
circle(c1, [point(A, 0, 0), point(B, 2, 0), point(C, 1, 2)], 'centername' = O1);
f1 := (x - 8.5)^2 + (y + 0)^2 + (z + 0)^2 = 12^2;
f2 := (x + 8.5)^2 + (y + 0)^2 + (z + 0)^2 = 12^2;
                                      2    2    2      
                f1 := (x - 8.5)  + y  + z  = 144

                                       2    2    2      
                f2 := (x + 8.5)  + y  + z  = 144


restart;
with(plottools);
with(plots);
f1 := x^2 + y^2 + z^2 = 1;
f2 := x + y + z = 1;
Circle := intersectplot(f1, f2, x = -10 .. 10, y = -2 .. 2, z = -5 .. 15, color = red, thickness = 3, numpoints = 10000);
S1 := implicitplot3d(f1, x = -20 .. 20, y = -20 .. 20, z = -10 .. 20, style = patchnogrid, color = blue);
S2 := implicitplot3d(f2, x = -20 .. 20, y = -20 .. 10, z = -10 .. 20, style = patchnogrid, color = gold, transparency = 0.5);
display(S1, S2, Circle, scaling = constrained, axes = boxed);
whattype(Circle);
detail(Circle);
   


sol := eliminate({f1, f2}, z);
Sol := solve(sol[2, 1], {x(t), y(t)});
assign(sol[1, 1]);
assign(Sol);
Eq := [normal(x), normal(y), normal(z)];
spacecurve(Eq, t = -500 .. 500, color = red, scaling = constrained, axes = boxed, numpoints = 20000);
 

 


restart;
with(geom3d);
with(plots);
f1 := -28.25000000 + x^2 + y^2 + z^2 + 11.0*y - z*sqrt(166) = 0;
plane1 := y = 0;
Circle := intersectplot(f1, plane1, x = -10 .. 10, y = -2 .. 2, z = -5 .. 15, color = red, thickness = 3, numpoints = 10000);
sol := eliminate({f1, plane1}, y);
Sol := solve(sol[2], {x(t), z(t)});
 


assign(sol[1]);
assign(Sol[2]);
Eq1 := [normal(x), normal(y), normal(z)];
C2 := spacecurve(Eq1, t = -500 .. 500, color = red, scaling = constrained, axes = boxed, numpoints = 20000);
unassign('x');
unassign('z');
unassign('y');
assign(sol[1]);
assign(Sol[1]);
Eq2 := [normal(x), normal(y), normal(z)];
C1 := spacecurve(Eq2, t = -500 .. 500, color = green, scaling = constrained, axes = boxed, numpoints = 20000);
 


Eq3 := Eq1 + Eq2;
C3 := spacecurve(Eq3, t = -500 .. 500, color = green, scaling = constrained, axes = boxed, numpoints = 20000);
display(C1, C2, C3);

I would like to use DifferentialGeometry to calculate some tensors. I don't want to use the Christoffel symbols as defined but I need to assign them new values, and make Maple use them later in the tesor calculations. Any help how I can do that?

Thank you

As a new user to Maple, I'm having trouble with something that should be simple - obtaining an algebraic simultaneous solution for two variables from two simple algebraic equations:

K1= N*(R9 + R6) + R9 / (R9 + R6)*N^2 + (2*R6 + 2*R9)*N + R9
K2= N*(R6 + R9) / (R6 + R9)*N^2 + (2*R6 + 2*R9)*N + R9

K1, K2 and N are known and I want to find the solutions for R6 and R9.  I know I could work this out by hand, but by learning how to use Maple to do this simple example would allow me to solve other, more complex, problems.

Thanks,

John

y := t -> 0.7*sin(300*t);
filenm := "https://www.gw-openscience.org/GW150914data/P150914/fig2-unfiltered-template-reconstruction-H.txt";
K := ImportMatrix(filenm, source = Matlab, skiplines = 1);
plot([K[() .. (), [1, 3]], y(t)], t = 0.35 .. 0.4);

I want to plot the residuals for this. Any ideas how? Thanks.

It seem like there is an (unwanted) difference between the latex() command and the newly introduced "Copy as LaTeX" in handling of \left and \right delimiters. A trivial example

>latex(sin(b/a));
\sin \! \left(\frac{b}{a}\right)

but if I instead use the new "Copy as LaTeX" command I get the result

\sin(\frac{b}{a})

These should of course be the same and I consider the first one to be the better conversion. It seems a very strange problem since it surely must be the same library routine that does the conversion in both cases? From a small set of examples I tried on it seem that the "Copy as .."  command never uses \left and \right which in several cases is absolutely necessary to get acceptable result.

 

I run Maple on two different computers each with 2 4k monitors running Windows 10 Pro.  Everything appears to work fine on one computer but on the other one, the display gets corrupted when moving the mouse under certain conditions.  I have eliminated the mouse and the video card as the problem because the same problem occurs after replacing them with other manufacturers components.  I have a document that generates a few plots that I can run from both computers.  At first all seems fine and the mouse can be moved across the display and plots without corruption.  But as soon as I try to enable any "Probe Info" via right clicking a plot or from the side pane when the plot is selected, moving the mouse over the plot will cause a continuous corruption that continuous to change as I move the mouse.  The only way I have found to recover from this is to close Maple and resart it.

It appears the problem has to do with redrawing the display after the mouse moves.  Below is an example:

Has anyone experienced this?

Thank you, David

 

test_19_marts.mw

Hey

Can anyone help me with this file?

I don't know how it happend, but the file somehow got corrupted. Is there anything i can do?

Thanks 

The background of my question comes from graph theory. But the essence of the problem has nothing to do with graph theory, and it only involves programming.

For the graph g1 below, the paired crossing edges  are marked as wine red.

with(GraphTheory):
with(SpecialGraphs):
g:=CompleteGraph(6);
g1:=DeleteEdge(g, {3,2}, inplace = false);

Paircrossedges:=[[{1,6},{3,5}],[{2,5},{1,4}],[{2,6},{3,4}]];

For each pair of crossed edges, I choose one to delete and get a plane graph g1', and then I consider the edge connectivity of g1', if the edge connectivity is equal 3, stop the calculation and return to the deleted edge set, otherwise continue to look for.

The following code is my attempt, break does not seem to work.

Conremovedges:= proc(G::Graph,Paircrossedges)
local i,j,k,dedges;
for i from 1 to 2 do
   for j from 1 to 2 do
     for k from 1 to 2 do
dedges:={Paircrossedges[1][i],Paircrossedges[2][j],Paircrossedges[3][k]};
              if EdgeConnectivity(DeleteEdge(G, dedges, inplace = false))=3 then
print(dedges);
break;
end if;
end do:
end do: 
end do:
end proc:
Conremovedges(g1,Paircrossedges)

 

My idea is that as long as the edge set that meets the condition appears for the first time, it should stop. If none are satisfied, return "not found".

Another question:

The above is just my example. In fact, the graph I want to consider is more complicated. If there are 18 pairs of crossing edges, do I need to write 18th-order for-loops? This seems very troublesome. Is there an easier way? Maximum number of for loops is 2^18 that is equal to 262144, which is still acceptable.

Conremovedges:= proc(G::Graph,Paircrossedges)
local a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,dedges;

for a1 from 1 to 2 do
for a2 from 1 to 2 do
for a3 from 1 to 2 do
for a4 from 1 to 2 do
for a5 from 1 to 2 do
for a6 from 1 to 2 do
for a7 from 1 to 2 do
for a8 from 1 to 2 do

for a9 from 1 to 2 do
for a10 from 1 to 2 do
for a11 from 1 to 2 do
for a12 from 1 to 2 do
for a13 from 1 to 2 do
for a14 from 1 to 2 do
for a15 from 1 to 2 do
for a16 from 1 to 2 do
for a17 from 1 to 2 do
for a18 from 1 to 2 do

dedges:={
Paircrossedges[1][a1],Paircrossedges[2][a2],Paircrossedges[3][a3],
Paircrossedges[4][a4],Paircrossedges[5][a5],Paircrossedges[6][a6],
Paircrossedges[7][a7],Paircrossedges[8][a8],Paircrossedges[9][a9],
Paircrossedges[10][a10],Paircrossedges[11][a11],Paircrossedges[12][a12],
Paircrossedges[13][a13],Paircrossedges[14][a14],Paircrossedges[15][a15],
Paircrossedges[16][a16],Paircrossedges[17][a17],Paircrossedges[18][a18]};
              if EdgeConnectivity(DeleteEdge(G, dedges, inplace = false))=3 then
print(dedges);
break;
end if;
end do:
end do: 
end do:
end do:
end do:
end do: 
end do:
end do:
end do:
end do: 
end do:
end do:
end do:
end do: 
end do:
end do:
end do:
end do: 
end proc:

 

 

 

 

 

In Maple, when calling LinearAlgebra:-Eigenvectors the order can change randomally each time. Ofcourse the result is always correct, but can show up in different order. 

I find this confusing, as I am looking at the screen, and see order changed each time. This is the order of how Maple shows the eigenvalues and corresponding eigenvectors.

Why does Maple do this? Is there a way to have same order given each time? Here is an example. If you run this code twice, most likely you will get different order each time. If not, try the command one more time.

restart;
Sy:=1/sqrt(2)*Matrix([[0,-I,0],[I,0,-I],[0,I,0]]);
lambda, v :=LinearAlgebra:-Eigenvectors(Sy);

screen shot

I thought there might be a global option to tell Maple not to do this? 

Again, answer is correct each time. I just like same output to show each time, as it is less confusing. Sometimes I think I did something wrong when I see different output show up for same command.

 

 

First 300 301 302 303 304 305 306 Last Page 302 of 2097