Maple 2019 Questions and Posts

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

I am learning how to use dchange in Maple. I can do  something as dchange(x=t^2) OK, but I need to do dchange(x=t^n) where "n" is meant to be a parameter that I can later use subs on to set it to any number I want.  But I do not know how to tell Maple that "t" is the new variable and that "n" is meant to be used as constant or parameter.

As an example, this works

n:=2;
ode:=x^2*diff(z(x),x)=0;
PDEtools:-dchange({x=t^n},ode,{t})

But this does not work

n:='n';
ode:=x^2*diff(z(x),x)=0;
PDEtools:-dchange({x=t^n},ode,{t});
subs(n=2,%)

It used "n" above as new variable. So the dependent variable which was z(x) became z(t,n). 

So I need to tell Maple that "t" is the new variable only and not "n" as well. 

Is it possible to do this in Maple?

Maple 2019 on windows.

 

My Maple Worksheets (not Maple Documents) have lots of explanetory Text blocks [..... surounding executable Math blocks ([> ..... I often insert mathematical symbols, most commonly subscripted variables, in these Text blocks.  For a simple example, consider the text block entered as

[This is a test of a subscripted variable "CTL-R" h__0 "CTL-T" in a text block.

The "CTL-R" (quotes are not actually entered) is the short cut to go into math mode, and "CTL-T" exits math mode and returns to text mode and the double underscore produces an atomic subscripted variable.

The text block actually will look like

[This is a test of a subscripted variable h0 in a text block.

The problem occurs when I reexecute the worksheet. The Text block actually produces output labeled with an equation number. For my simple example above the Text block becomes

[This is a test of a subscripted variable h0 in a text block.

[                                              h0                                                   (1)

 

where the two lines started by [ are actually merged with one expanded [ for the Text block with its output. To get rid of the unwanted output, I have to put my curser over the h0 that is in the Text body (not the output h0) and hit "Shift-F5". The output h0 with its equation number disappears.  If there are a number of simple math expressions in a text block, I have to process them one at a time with "Shift-F5". This takes up a lot of time. With earlier Maple versions (~2015 or earlier) I used to fly through Text blocks using the shortcuts "Ctl-R" and "Ctl-T" and these Text blocks produced no output when the worksheet was reexecuted. 

Starting with Maple 2016 I could enter math expressions in Text blocks using the shortcuts, but I could not copy and paste  a Text block with inline math expressions without the expressions becoming "live" in the copied block.  Starting with Maple 2017 all my Text boxes with math expressions began executing the math and producing output.

I gave up on Maple 2017 and 2018.  I have finally made the jump from Maple 2016 to Maple 2019, in part, because I finally discovered the "Shift-F5" trick to make math expressions in a Text block inactive.

Does anyone know how to make the default behaviour of Maple with math expressions in a Text block to be "Don't execute the math and produce output in the Text block"?

I would post an actual example worksheet, except I have never been successful whenever I have tried to upload a worksheet. I hope my description above is adequate.

Any help will be greatly appreciated.  Neill Smith

 

 


 

restart; with(VectorCalculus)

r := `<,>`(sin(t), cos(t), t)

Vector(3, {(1) = 0.2739493386e-115+0.2739493386e-115*I, (2) = 1.0-0.7504824014e-231*I, (3) = t})

(1)

``


what??

Download problem.mw

Because Debian Linux is not officially supported by Maple, I would like to know if is there anybody who is able to provide following information:

1. is possible in principle to operate Maple 2018-2019 on Debian 9 Linux?

2. how to install Maple 2018 or 2019 on Linux Deian 9 (Stretch)? Are there required some specific Tweaks and Hints?

Thanks in advance for any help...

Is this an expected behaviour for simplify/size

I was simplifying a result from pdsolve, but did not check that the solution was null or () before calling simplify.

It turns out that  simplify((),size)  returns size for this. I find this is very strange.

I would have expected it to return ().

I can fix this by checking that sol is not null before calling simplify ofcourse. But the question is, why does simplify((),size) return size? What is the logic for this? From help:

The simplify(expr, size) calling sequence is used to attempt simplifying the expression size, performing only collections and simple decomposition of fractional powers in the coefficients - sometimes taking advantage of linear factors when they exist. No other mathematical simplifications of the expression or its subexpressions is performed. These operations, while simple and with low computational cost, may remarkably structure the expression and reduce its size.
 

is it possible what happens is this: becuase "sol" was null, the call simplify(sol,size) has actually become simplify(size) and the result is size.  So because the first slot in the call was (), it was ignored during the call and the first parameter became size insteal of sol?

Maple 2019 on windows 10.

Earlier smoothly working generation of normal distribution in v. 2019 unexpectedly shows the error:

RandV  := Statistics[RandomVariable](Normal(0, 1));
Statistics[Sample](RandV, 10);

Error, (in p) unable to convert Float(undefined) to an integer

 

I'm trying to create an ellipsoid using spherical coordinates.

 
                   "x^2 + y^2/4 + z^2/9 = 1" how can I enter this?

This is what I have , but shape show up really crazy

plot3d([cos(theta)*sin(phi),sin(theta)*sin(phi),cos(phi)],theta=0..2*Pi,phi=0..Pi,scaling=constrained,axes=boxed);

Thanks

[An edited and reposted version of this Question, which has subsequently been deleted, specifically asked that the plot be done by making a small adjustment to Maple's spherical coordinates. The deleted version also named the ellipsoid E, a detail which is important for understanding correctly the OP's subsequent integration Question. --Carl Love acting as a Moderator]

I'm doing a statistic analysis on a lot of data which i have imported from Excel into a matrix. I've got about 2880 data points and i'm trying to use regression and its giving me an error which i do not know how to deal with.

How would i execute the following calculate? I know i could use the statistics package but i want to do with with the formula. I'm trying to find the standard deviation. Look at the attached picture so see. I've also attached a copy of the calculations in maple format.

Download Test.mw

Also another little side thing, but not necessary. Is it possible to have a matrix with empty spaces in it and return it?

How I can determine a function that satisfy these boundary and initial conditions.

Thank you

S2

Maple Worksheet - Error

Failed to load the worksheet //convert/S2
 

Download S2

 

While googling around for Season 8 spoilers, I found data sets that can be used to create a character interaction network for the books in the A Song of Ice and Fire series, and the TV show they inspired, Game of Thrones.

The data sets are the work of Dr Andrew Beveridge, an associate professor at Macalaster College (check out his Network of Thrones blog).

You can create an undirected, weighted graph using this data and Maple's GraphTheory package.

Then, you can ask yourself really pressing questions like

  • Who is the most influential person in Westeros? How has their influence changed over each season (or indeed, book)?
  • How are Eddard Stark and Randyll Tarly connected?
  • What do eigenvectors have to do with the battle for the Iron Throne, anyway?

These two applications (one for the TV show, and another for the novels) have the answers, and more.

The graphs for the books tend to be more interesting than those for the TV show, simply because of the far broader range of characters and the intricacy of the interweaving plot lines.

Let’s look at some of the results.

This a small section of the character interaction network for the first book in the A Song of Ice and Fire series (this is the entire visualization - it's big, simply because of the shear number of characters)

The graph was generated by GraphTheory:-DrawGraph (with method = spring, which models the graph as a system of protons repelling each other, connected by springs).

The highlighted vertices are the most influential characters, as determined by their Eigenvector centrality (more on this later).

 

The importance of a vertex can be described by its centrality, of which there are several variants.

Eigenvector centrality, for example, is the dominant eigenvector of the adjacency matrix, and uses the number and importance of neighboring vertices to quantify influence.

This plot shows the 15 most influential characters in Season 7 of the TV show Game of Thrones. Jon Snow is the clear leader.

Here’s how the Eigenvector centrality of several characters change over the books in the A Song of Ice and Fire series.

A clique is a group of vertices that are all connected to every other vertex in the group. Here’s the largest clique in Season 7 of the TV show.

Game of Thrones has certainly motivated me to learn more about graph theory (yes, seriously, it has). It's such a wide, open field with many interesting real-world applications.

Enjoy tinkering!

I googled, read help and not able to find how to do this. 

I want to change the zoom in worksheet to any value I want, and not just 100%,150%,75%, etc.... which are the values that are listed in View->Zoom factor.

Is there a place one can type in the zoom value they want? Say 110% or any other number?

windows 10.

Thank you

I read a string from file which contains a sequence of Maple commands, all in one string. The commands are separated by ";" in the string. I need to then evaluate all the commands in the string as if I typed them one after the other. 

Here is an example

data:="x:='x';y:='y';sol:=dsolve(diff(y(x),x)=1,y(x));"; #read from database
parse(data);

Warning, extra characters at end of parsed string
x := 'x'
 

I want the result to parse to be as if I typed

x:='x'; 
y:='y'; 
sol:=dsolve(diff(y(x),x)=1,y(x));

I looked at help in parse page, but I do not see what I need to do. It says that 

If the option 'statement' is specified, the string must consist of exactly one Maple statement (which includes expressions). The statement is parsed and evaluated, and the result is returned.
 

But I am not using the statment option. I also tried using this option, no change, same problem.

Is there a way to prase such a string? 

Thanks

 

Is this documenation wrong?

https://www.maplesoft.com/support/help/maple/view.aspx?path=Database%2fSQLite%2fFetchRow

It says that calling sequence is 

     FetchRow( statement, column, valuetype  )

But below it only shows 

statement

-

prepared statement obtained using Prepare command

valuetype

-

type of the output data, default is "auto"

 

With no column anywhere.  And none of examples show column in them.

And when I tried it by adding a column name that I know exist in my sqlite3 database, Maple gave an error that no such parameter allowed.  

Does FetchRow support column name or is the above just a documenation error?

Maple 2019

 

I have noticed a few times now with Maple 2019. It looses kernel connection when it is sitting there idly. This time I observed it. Had saved a document after an intensive calculation. The memory used was about 30Gig. shortly after saving the cpu fan was running hard. I checked task manager and cpu was cycling to 100%, it was mserever. Then the memory usage droped to about 6gig and message as shown. During this time Maple screen down in the LH corner displayed "Ready", so it didn't think it was doing anything.
 

My code below works but I an looking to speed it up to apply to large arrays. I have large integers and I want to store the exponent and first and last few digits.

nelems := 10;  ~ takes about 50mins when n=100,000,000
n := 374894756873546859847556;
op(n);
A := Array(1 .. 4, 1 .. nelems);
length(n);
st := time();
for i to nelems do
    A[1, i] := i^10*n;
    A[2, i] := length(A[1, i]) - 1;
    b := convert(A[1, i], string);
    A[3, i] := parse(b[1 .. 3]);
    A[4, i] := parse(b[-3 .. -1]);
end do;
time() - st;
A;
A[1, -2];
A[2, -2];
A[3, -2];
A[4, -2];

 

First 42 43 44 45 Page 44 of 45