Maple 2021 Questions and Posts

These are Posts and Questions associated with the product, Maple 2021

BTW "recusant" is an old word, religious in origin, for someone who refuses to do what they're told, or believe what they're told to believe.

Here's my problem:

phi := (1+sqrt(5))/2;

plots[pointplot]([seq([n, sin(n*phi)], n = 1000 .. 2000)], symbol = point, axes = boxed, labels = [n, typeset('sin(n*phi)')], labeldirections = [horizontal, vertical])

produces a label sin( n phi ).  I want it to say sin( phi n ). 

I've tried the noncommuting times &*  (which prints &*) and the matrix product . (which prints as a function call).

Is there a way to typeset this product in the order that I want?  Here "n" is the variable and "phi" is the constant (yes that looks weird, but so does the graph).  I suspect that there is; I think "typeset" is probably much more powerful than I have been kludging it as.  Help?

screenshot:

Hi

I have been trying to create a hyperlink to a bookmark in a maple document. I left the Target field blank, and entered the 

book mark in the book mark field. But I keep getting the error: " target cannot be blanK" Can anyone help ?

Rivan

I have the following equations which I want to plot the curves of them by maple's:

1. |x+2|+|y|=3

2. |y|-|x|=2.

How to implement this task in maple?

 

thanks!

One of our users asks how they can find the Re ( sqrt(a+I*b)) where a, b are real.

They had tried entering the latter as "assume", without any luck. 

We told them that it may not be very intuitive, but such expressions can be evaluated by wrapping into evalc which implicitly assumes that free parameters are real-valued:

evalc(Re(sqrt(a+I*b)));

I am trying to get Maple 2021 to printout the intervals on which a differentiable function increases/decrease in a Maple document as part of a procedure. 

The function: 

A := x^2 + 400/x

the attempt. 

solve(evalf(diff(A, x) < 0))

which gives the result: RealRange(-infinity, Open(0.)), RealRange(Open(0.), Open(5.848035476))
There is no extreme point at x = 0 for A? So how do I get Maple to do an output which makes sense?  

How is the matrix of the affinity of base the plan of equation x+2*y-z=1, of direction u <1,0,-1>and of ratio 2 determined? Thank you.

I used to have this kind of code without problem:

myModule := module()
    option package;
    export myFunc;
    # local i;
    myFunc := proc()
        [seq(i, i in 1..10)]
    end proc;
end module;

But after upgrading to the latest version of Maple 2021, I get a warning

Warning, (in myModule:-myFunc) `i` is implicitly declared local |myModule.mpl:5|

I have to uncomment the local i declaration for the warning to go away. Has the behavior of seq changed in Maple 2021?

how to export my data in sheet excel for this file 

 

Nnew.mw  

Hello,

I am having some trouble with the "Seq" command of the "Threads" package. This is a parallel implementation of the usual "seq" command.

I namely defined a (very long) procedure "f" which defines a (very complicated) function $f: R^2 -> R$, taking as arguments an $x$ and a $y$ and returning $f(x,y)$. I want to plot its graph in 3D, which I try to do by making a 3D data structure consisting of points making up the $x$ range, $y$ range, and the evaluations $f(x,y)$. I then want to plot it with the "SurfacePlot" command from the "Statistics" package.

If I define my data structure as

 data := [seq([seq([i/10, j/10, f(i/10, j/10)], i = 1 .. 10)], j = 1 .. 10)]

the SurfacePlot(data) works. However, it is very slow because it runs in serial and the function evaluation "f(x,y)" takes a long time to compute.

I therefore wanted to compute the data in parallel. For this, I use

 data := [Seq([Seq([i/10, j/10, f(i/10, j/10)], i = 1 .. 10)], j = 1 .. 10)]

Sometimes this works, but often it does not and I get the following error after a number of datapoints have been computed (i.e. after evaluations of f have been made).

Error, (in simplify/float) invalid arguments for Float constructor

This is the first time I use parallel computing, so I am not familiar with potential problems that could trigger errors and don't understand very well how parallel computing works. Does "Seq" only compute the different data points [x,y,f(x,y)] in parallel, or does it compute stuff within the procedure "f" also in parallel when evaluating "f(x,y)" at some fixed arguments "(x,y)"? Because another procedure is defined within "f" and it is called multiple times within one "f" call, so in that case it could be a problem with lexical scope. Any suggestion to help me understand and correct my error would be greatly appreciated.

This is a just a general type question. Often reading questions posted to do with modules and packages I see "foo" used. I have put together some simple packages for routines I find useful. I am week in general programming knowledge. I would like to know is "foo" something special or a generic name used for testing? Is is an acronym? ...

Hi,

This is my first post here and I am really hoping someone can help me. I just started using Maple and I am using Maple 2021.

I generated numbers using a SEQUENCE and the sequence is called y. I am trying to extract the element (y[n]) and the index (n) of that element based on the CONDITION that y[n] has to lie in between 0 and 1 exclusive (so the element of the sequence or y[n] has to be such that 0 < y[n] < 1). How can I achieve this using select commad and also using a LOOP. Are there any other methods that can be used to achive this result. Any or all help would be really appreciated.

 

Thank you all.

In mathematica, CommunityGraphPlot attempts to draw the vertices grouped into communities. 

g = Graph[{1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3, 
   3 \[UndirectedEdge] 4, 1 \[UndirectedEdge] 4, 
   1 \[UndirectedEdge] 5, 5 \[UndirectedEdge] 6, 
   5 \[UndirectedEdge] 7, 7 \[UndirectedEdge] 8, 
   8 \[UndirectedEdge] 9, 7 \[UndirectedEdge] 9}, 
  VertexLabels -> "Name"];
ged = {{6, 7, 8, 9}, {5}, {1, 2, 3, 4}};# Gallai-Edmonds decomposition
CommunityGraphPlot[
 HighlightGraph[g, FindIndependentEdgeSet[g], 
  GraphHighlightStyle -> "Thick"], 
 Thread[Labeled[ged, {"D(g)", "A(g)", "C(g)"}]], PlotTheme -> "Web"]

This function is very useful, for example, if I get a partition of vertices, such as the gallai-Edmonds decomposition below, I use  CommunityGraphPlot to easily see the overall layout of the graph. I don't know if Maple has a corresponding function.

PS: The Gallai-Edmonds decomposition of a graph g is the partition {D(g),A(g),C(g)} of its vertices, where D(g) consists of every vertex v for which there exists a maximum matching of g that misses v, A(g) consists of every vertex v that is not in D(g) but neighbors some vertex in D(g) and C(g) consists of all remaining vertices.

I am trying to plot a Runge-Kutta method for 1+ tsin(tx). When ever I try to do the plot data command an empty graph shows up. I noticed that some of my values from the algorithm did not calculate properly. How do I fix this problem? This is what I typed in for the calculations. 

f := (t, x) -> 1 + t*sin(x);
t[0] := 0;x[0] := 0;
h := 0.1;
 

for n to 20 do
    t[n] := n*h;
    m1 := f(t[n - 1], x[n - 1]);
    m2 := f(t[n - 1] + h/2, x[n - 1] + m1*h/2);
    m3 := f(t[n - 1] + h/2, x[n - 1] + m2*h/2);
    m4 := f(t[n - 1] + h, h*m3 + x[n - 1]);
    x[n] := x[n - 1] + h/6*(m1 + 2*m2 + 2*m3 + m4);
end;
 

Hi I have experienced another Maple 2021 error with those of my students who Maple 2021 Mac edition. 

Lets say their have saved a .mw on their main drive and tries to open the file from inside Maple. Maple gives an error like "file cannot be opened - please try to another". This also happens when trying to open the file from outside Maple. 

This never happens on the Windows version. So any idea what could be causing this ?

I have the following expression.

Ps = (x - 600)(15000 + 400*(y - 4000)/2000 + 15000*0.40*(850 - x)/100) - y

Maple will evaluate this to:

Ps = (x - 600)(15000 + 400*(y - 4000)/2000 + 15000*0.40*(850 - x)/100) - y

Screenshot:

Plotting these two in 2D on Desmos to demonstrate: https://www.desmos.com/calculator/tvp4rbzxzp

These two are not the same expression. Is Maple broken or am I doing something wrong?

First 22 23 24 25 26 27 28 Last Page 24 of 35