Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Suppose I have a subset of R^2, say (x,y) € [0,1] x [0,1]

Now I map

x=r*exp(t)

y=r*exp(-t)

Is it possible to do a 2d contourplot to just see where [0,1]x[0,1] is mapped onto ?

Are these errors to be expected? Why do they happen?

restart;
solve({x<>10, -infinity<x , x<infinity, -infinity<y , y<infinity},{x,y});

Error, (in solver) invalid input: SolveTools:-Inequality:-LinearUnivariateSystem expects its 1st argument, eqns, to be of type ({list, set})({`<`, `<=`, `=`}), but received {x <> -infinity, x < 10}

But it works when replacing x<>10 by y<>10

restart;
solve({y<>10,-infinity<x , x<infinity, -infinity<y , y<infinity},{x,y});

            {10 < y, x < infinity, y < infinity, -infinity < x}, {y <> -infinity, x < infinity, y < 10, -infinity < x}

What is the difference in the above two?

It also work when replacing x<>10 by x=10

solve({x=10, -infinity<x, x<infinity, -infinity<y , y<infinity},{x,y});
               {x = 10, y < infinity, -infinity < y}

It also works when removing the y parts by keeping x<>10

solve({x<>10, -infinity<x , x<infinity},{x,y});
           {y = y, 10 < x, x < infinity}, {y = y, x < 10, -infinity < x}

it also works when removing x<>10 and putting back the y stuff

solve({-infinity<x , x<infinity, -infinity<y , y<infinity},{x,y});
              {x < infinity, y < infinity, -infinity < x, -infinity < y}

Why Maple gives an error for some cases and not the others?

Maple 2018.1

Hi

I need to find a relation between delta [m,k] in terms of m and k

delta[m,k]=f(m,k), where k=0,1,2,...,m

A code is written (delta.mw) to find delta[m,k] for a certain amoun of m.

Is there a way or a code to find a general form of f(m,k)?

Thanks

 

 

Hello

 

I've written a completely symbolic expression involving sum function. When I hit enter, Maple 2016.2 evaluates the expression although it's completely symbolic and not evaluable.

 

How to stop Maple from falsely evaluating a symbolic expression? I dis use the restart command to make sure all variables are empty. When evaluating Maple generate a very large open form expression that makes no mathematical sense.

 

Maple file in the following link

https://www.dropbox.com/s/13ciwothh1pqijk/sumBug.mw?dl=0

Please advice

Thanks

I am fairly new to Maple and I'm currently researching twisted multiloop algebras. I'm trying to use Maple to automate many of the calculations. For example, suppose xy = yx + 2z and I have the expression wxy (the variables are non-commutative. I already have this functionality working properly with the physics package). I want Maple to make the substitution for xy and simplfiy. For example: wxy = w(yx + 2z) = wyx + 2wz. Is this possible?

Thank you for your help.

I have two matrices, one of the dimension of solution space that i have been using solve to navigate
this matrix will look something like:

M := matrix([[3, 2, 1], [2, 1, 1],[2, 1, 1]])

and I have another matix of the times that it takes solve to find these regions:

N := matrix([[.2, .4, .8], [.3, .6, .5], [.8, 2.3, 2.6]])

I'd like to find the sets {N[ij]:M[ij]=m for some integer m}; that is I'd like to get all the elements of N on entries of M with the same number so i can start thinking about them statistiaclly.

i.e. for 3 i'd like the list [.2]

      for 2                      [.4 .3 .8]

and so on.
 

I wish to extract a minimum route in a network given both start and end positions.

Also, I wish to avoid a spur in the circuit and obtain one continuous orthogonal  path. 

As an example, take the 7-node case having 14 arcs (see worksheet) using Dijkstra's algorithm (I assume this is fit for purpose in this particular case).

Starting with node 1, the algorithm suggests the paths:

1>2>3>4>5>6>7.>8>9 and 1>2>3>4>5>10>11>12>13>14 (here, there is a spur at node 5 where the paths separate)

Is it possible obtain one minimum path?

The source node is prescribed in the routine - can anyone explain how to prescribe the end node?

Thanks for reading!

Shortest_Circuit.mw

 

I tried to integrate

int((1-x^floor(u))/((1-x)*u^2), u = 1 .. infinity, numeric)

where x=-1. The result should be log 2 = 0.6931471806. However it gives me 0.6687714032.

When using a numeric cut off, the result improves, so what is the issue here?

6687714032

Hello.

I have this problem when executing the entire worksheet or selected groups.
Also Maple can crash by itself, to its heart's content)
What I can do to solve this problem?
OS: W7 x64, Java is up to date

Thx.

Hi Guys i need some Help. 

I created a work sheet where i am calculatin the polynominial coefficient of an equation. The Problem is that if i take these coefficient and then calculate the root with Matlab and compare it with the symbolic toolbox  i get wrong roots. My question now is did i something wrong by creating the coefficient ? 

Polynom_Calculation.mw 

These are the values for the parameters : 

b1=0
b2=0
v1=0
v2=0
s1=0
s2=0.175
j2=0.28
tau =20
th1 = 0
th3 = 0
 

i added  my Maple skript. i hope that sb can help me.

In the first one I used hypergeometric function where the number is converged. Now using the series expansion of hypergeometric function I rewrite the equation as in the 2nd and 3rd case. But here it is not converging. I expect the same answer as in the first case i.e 0.14042. Thank you

 

problem2.mw

I have an 8*5 matrix, and i'd like to replace elements of it that are >20 with 20. For those interestedm, the matrix comes from this question.

M := Matrix(8, 5, {(1, 1) = 1.266, (1, 2) = .734, (1, 3) = .656, (1, 4) = .735, (1, 5) = 1.843, (2, 1) = 2.859, (2, 2) = 5.625, (2, 3) = 5.188, (2, 4) = 5.453, (2, 5) = 10.765, (3, 1) = 3.281, (3, 2) = 9.000, (3, 3) = 5.516, (3, 4) = 5.828, (3, 5) = 6.156, (4, 1) = 7.718, (4, 2) = 34.125, (4, 3) = 5.453, (4, 4) = 5.344, (4, 5) = 5.453, (5, 1) = 8.703, (5, 2) = 6.515, (5, 3) = 6.125, (5, 4) = 6.641, (5, 5) = 6.734, (6, 1) = 17.766, (6, 2) = 8.578, (6, 3) = 8.765, (6, 4) = 9.875, (6, 5) = 32.610, (7, 1) = 22.156, (7, 2) = 15.640, (7, 3) = 15.610, (7, 4) = 15.187, (7, 5) = 23.735, (8, 1) = 20.140, (8, 2) = 20.156, (8, 3) = 20.266, (8, 4) = 19.344, (8, 5) = 21.078})

I tried to create a logical matrix that i could input into M (this is how it works in maple) to select the elements so i could replace  them, but this didn't work 

Hello,  how can i  to adapt the  commands  below  to write  in fprintf a vector with  N components.

 

 fd≔fopen("temp_file",WRITE);

fprintf(fd,"x = %d, y = %g",x,y)

fclose(fd)  

For exemple: Given a vector (or list)  v:=[1,2,3,4,....N], i would like to get  a file with  N column and 1 line, where N is a integer number, which i will give.

Thanks for any help.

 

 

Hello MaplePrime users,

Yesterday, I posted my MagicPuzzles package to the MapleCloud. It is a collection of tools I have written for manipulating, solving, and visualizing puzzles like Magic Squares and Magic Stars. Here's a sample solution for each:



For the Magic Square, the numbers on each horizontal and vertical line, along with the numbers on each of the two diagonals, add up to 65.

The inaugural version has separate sub-packages for:

  • Magic Annulai (my own name)
  • Magic Hexagons
  • Magic Squares
  • Magic Stars

Moreover, each sub-package contains these commands:

  • Equations(), to return the linear equations for the variables based on the Magic Sum;
  • Constraints(), to return the conditions that prevent redundant solutions found by reflections and rotations;
  • VerifySolution(), to confirm if a list of numbers is a solution;
  • EquivalentSolutions(), to determine solutions equivalent to a given solution;
  • PrimarySolution(), which takes a solution and returns the associated primary solution;
  • Reflection() and Rotation(), to reflect and rotate a solution; and
  • Draw(), to provide a visualization (like the ones above).

There is also a command, MagicSolve(), which is used to find solutions, which take the form of permutations of [1,...n] for some positive integer n, to the equations. Essentially, it solves the linear equations, and cycles through all permutations for the free variables, and selects those that give "magic" solutions.

In future versions, I intend to add:

  • Other specific classes of problems;
  • More sample solutions; and
  • Known algorithms for finding particular solutions.


To install the package, you can do so from here, or just execute the following within Maple 2017+:

PackageTools:-Install( 5755630338965504, 'overwrite' );

There are many examples in the help pages.

I think others will find this package interesting and useful, and I encourage you to check it out.

(a) Plot the graph of  
                       sin(x)*exp( -x^2)
 for x in the interval [-2,2]. 
(b) Find to 10 decimal digits the maximum and minimum values of 
                         sin(x)*exp( -x^2)
 for x in [-2,2] AND find the corresponding values of x. [So if the maximum occurs at x=a, you should also compute sin(x)*exp( -x^2)   both to 10 digits. Similarly for the minimum. Using unapply to make the expression into a function will be useful here.]  

So far I have this for a

> j := exp(-x^2)*sin(x);

> plot(j, x = -2 .. 2);

 

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