Maple 2017 Questions and Posts

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

In the attached maple worksheet integral.mw, I am trying to compute an integral involving hyperbolic cosines. While not straightforward to compute, it should be completely well behaved at zero and both infinities as long as rho is real:

Much to my surprise, maple gives "undefined" as the answer, even if I attach an "assuming rho > 0" to make completely sure that the denominator never vanishes.

If I fix rho to 1 (or any other value) and compute the integral numerically, maple happily gives a numeric value. Moreover, I can scale the R, use the fact that the integrand is an even function of R, factor the denominator, and use partial fraction decomposition to transform it into the equivalent form

which maple integrates happily and gives a completely well-defined function in terms of polylogarithms, which agrees with the numeric answer.

Now, I am not expecting maple to just solve every integral I throw at it, but why does it give "undefined" as the answer to a completely well-defined integral?

Hi.

Im working with GRtensor iii package for Maple.

The goal is to obtain values of specific product of the Ricci tensor and scalar function in FRW spacetime together with second order covariant derivative acting on this product. .

grdef(

After i defined general 2 covariant derivatives acting on that product

 grdef( 

I have errors when i want to define contracted forms of this expression/tensor:

grdef(

which should be scalar quantity (fY*Rab );ab

grdef(

and this should have only 2 lower indices ac

Hovewer i obtain errors for both cases
Error, (in grtensor:-grdef) lhs/rhs index conflict.

grtensor_v2.mw

I get the error message: 'There were problems furin the loading process. Your worksheet may be incomplete.'

The file appears empty. Please, can I get a help to recover the file.

Calculation1.mw

How is it possible in Maple to keep hold of pre determined results for comparison with subsequent results so that a recursive decision can be made to either modify the list of “kept” data or to continue to the next calculation, etc... ?

Example: a simple “subtract or double” sequence. If subtracting (say 1) from the current number would result in a term we already have,  then double it instead, and start over again with subtraction.

Formally: a(0)=0, a(1)=1, and for n>=1,

a(n+1) = a(n)-1 if that number has not been found already, else a(n+1)=2*a(n).

0,1,2,4,3,6,5,10,9,8,7,14,13,12,11,22.....

The arithmetic operations are facile but how to organise the keeping and comparison process??

David.

 

I have managed to install Maple2017 and open the installer using the Linux terminal and everything else but I can't find the file to run maple anywhere. I have been opening and doing everything with the linux terminal but I can't open maple without the filename as chromebook are fairly useless for downloading anything, does anyone know the name of the file or a way to make it run on chromebook? Thanks for any help offered in advance

Take any odd number k, with distinct odd prime divisors p_1,...p_k and ask the following question: What is the smallest even number which when added to each prime divisor p_i of k, gives another prime? Example: k= 119=7*17, so the smallest even number is 6 because 7+6=11 and 17+6=23. NB: some numbers (eg 105,195,231...) seem to have no solution. I would appreciate assistance with a code to calculate for every odd k, the even number in question, or to allocate 0 for numbers where no solution has been found up to some suitably convincing high number like N= 10^5 or 10^6, (a parameter I could change if desired). The idea would be to conjecture that the apparently no solution numbers (up to N) don’t actually have a solution. Any assistance much appreciated in advance. I have found the solutions up to k=781 by hand, but my hand is getting tired now.

cheers,

David.

ps: I would like to have the option (if possible) to output the numbers with solution =  0, and the numbers which are the smallest to have solution 2*n, as separate sequences, for n up to some arbitrary value (ie 3,7,23,69,93...). (n>=1). Hope this is not asking too much. 

Hello

I need to create a list of variables from a list of variables.  I thought of something like the code snippet below but I could not figure out how to force Maple to evaluate the variable before creating the new variables.  It is very likely that my approach is completely wrong and I have to use something altogether different.  

vars:=[x,y,z];
for invars in vars do
[invars||(1..nops(vars))];
end do;

Many thanks

Ed

 

 

Hello

I need to build a system of linear equations from a list of polynomials.  The list of indeterminates is as follows:

incog:=[theta[1, 1], theta[1, 2], theta[2, 1], theta[2, 2], theta[2, 6], theta[3, 0], theta[3, 3], theta[3, 4], theta[3, 5]];

The list of polynomials is:

eq:=[1, theta[1, 1]+theta[2, 2]+theta[3, 3], -theta[1, 1]-theta[2, 2], theta[2, 6]*theta[3, 5], -theta[1, 1]*theta[3, 3]-theta[2, 2]*theta[3, 3], -theta[1, 1]*theta[2, 6]*theta[3, 5]+theta[1, 2]*theta[2, 6]*theta[3, 4], theta[1, 1]*theta[2, 2]*theta[3, 3]-theta[1, 2]*theta[2, 1]*theta[3, 3]+theta[1, 2]*theta[2, 6]*theta[3, 0]];

eq[1], eq[2] and eq[5] will be used as examples, although all of them should be used.  

In eq[1], there are no indeterminates, therefore the first line of the matrix related to the system of equations is:

[0, 0, 0, 0, 0, 0, 0, 0, 0]

In eq[2], there is a summation of  three indeterminates and the outcome is a set of three lines (summation of indeterminates)

[1, 0, 0, 0, 0, 0, 0, 0, 0]

[0, 0, 0, 1, 0, 0, 0, 0, 0]

[0, 0, 0, 0, 0, 0, 1, 0, 0]

In eq[5], there is a summation of a product of indeterminates and outcome is a set of two lines as follows:

[1, 0, 0, 0, 0, 0, 1, 0, 0]

[0, 0, 0, 1, 0, 0, 1, 0, 0]

 

Carrying on like this will result in a matrix of 14 lines with zeros and ones in positions related to the indeterminates.  Building the matrix is what matters to me.

I have a thousand of such problems with different indeterminates and set of polynomials.  

Any ideas on how to build a function to automatically create the matrices would be most appreciated.

Thank you.

Cheers

Ed

 

I'm having trouble connecting from Maple on Windows 10 to MSQL Server. I tried Microsoft recommended drivers such as sqljdbc_6.4.0.0, did (as I thought) all required steps. The only invariable result I get is "Cannot load driver". I was wandering if anyone had implemented such a construction. Driver name & version , connection string and Java version would be greatly appreciated. Another option is to have any driver, which connects to any of standard databases (Oracle, MySQL).  The only limitation is- it must be from Windows 7 or 10.
          Thanks.
           A.B.

Hello,

I have a problem in solving an integral in maple. I can't solve the below integral in maple and it returns the integral itself to me. I also attach an image from the integral if here is not clearly shown. I want maple to return me just a number. can anyone help me in this?

Thank you

int(sin(beta)*(-0.4447569104e-1*beta(10)^3+1.846983291*beta(10)^2+78.88888890*beta(10)+620.4645491)/(9.+.6366197724*beta(10))^2, beta = 0 .. (1/2)*Pi)

 

 

 

 

I used the implicit function to draw two images, how to display only the intersection of two images? Or, how do I draw the x^2+y^2+z^2=1 image under x+y+z=0 condition? Code show as above.Thank you.

 

I want to solve for the coefficients in some multivariate polynomials by equating them to other known multivariate polynomials.

 

Something like this. I have

p[1]=(a+b)*x^2+(a+c)*x*y+d*z;

p[2]=(a-b)*x+e*y*z+f*z^2;

 

I want to impose that p[1]=x^2+2*x*y+3*z and that p[2]=x+4*y*z and I want Maple to tell me the values of (a,b,c,d,e,f).

 

Sounds simple enough, but I have not been able to do it

I am providing analysis for a Graph I have made using the GraphTheory kit. I am attempting to find a way to find the Betweeness Centrality. So far I have only found one example of the code which is being used to find the Betweeness Centrality of a Network found in a pdf (Attatched below). I have been able to alter the code accordingly to my data but the last line requires some further understanding of how Matrices work in Maple. This is the line I fail to understand completely:

"""""""" BetweenessCentrality_data := < node_data[1.., 1] | < seq(add (ad_mat[i, j] * wt_mat[i, j], j = 1.. num_characters), i = 1. . num_characters)> >: BetweenessCentrality_sorted := FlipDimension( x[2])))>, 1)  """"""""

And this is all the code leading up to the line in question:

"""""""" data := FileTools:-JoinPath(["Excel", "Inter station database (2).xls"], base = datadir);

M := ExcelTools:-Import(data, "Hoja2");

edge_data := Matrix(727, 3, (i, j) --> M[i, j+2] );

with(ListTools);

node_data := Matrix(727, 2, (i, j) -->M[i, j+2] );

convert(Matrix(<<node_data>>), list);


listednode_data := convert(Matrix(<<node_data>>), list);

MakeUnique(listednode_data);

UniqueListedNode_data := MakeUnique(listednode_data);

node_data := Matrix(numelems(UniqueListedNode_data), 1, (i, j) -->UniqueListedNode_data[i]);
 

num_edges := RowDimension(edge_data);
 

num_characters := RowDimension(node_data);
 

G := Graph(node_data[() .. (), 1], weighted);
 

for i from 1 to num_edges do

AddEdge(G, [{edge_data[i, 1], edge_data[i, 2]}, edge_data[i, 3]])

end do;

wt_mat := WeightMatrix(G);
ad_mat := AdjacencyMatrix(G); """"""""

To provide further context, my graph is strongly connected.

If anyone could kindly provide a breakdown of the line of code in question, It would be very appreciated. 

Here is the link to the pdf I used as source for my code:https://www.maplesoft.com/applications/view.aspx?SID=154530

 

Hello, I am wondering if Maple is capable of generating a subgraph for a directed, weighed graph with the GraphTheory package. The online resources I can find only include undirected, unweighed graphs. 

can you please include an example with commands that is able to perform the said task?

My name is Viorel Popescu and I am a Ph.D. candidate at University Politehnica of Bucharest, Europe. I was impressed by the article that I found on the internet about Series Solution to Differential Equation with Maple. I am trying to solve the equation g''(r)- r/R*g(r)=0 with initial condition g(2R)=0 and g'(0)=R where R>0 is a positive constant.

5 6 7 8 9 10 11 Last Page 7 of 40