## Conversion of this mathematica expression to Maple...

I am not unfamiliar with the Wolfram syntax but also not very good with it, and there is a particular element in a Mathematica code I have been given which I do not entirely understand how to efficiently write in Maple. The basic idea is to read in a list of expressions from an external file (LIST) and process the non zero elements and assign them to a function (COEF) which can be called later on. Here is the Mathematica exert:

```k = 0;
i = 0;
a = b = \[Theta];
Do[k = k + 1; KK = LIST[[k]];
If[KK =!= 0, i = i + 1; ff = Factor[KK];
COEF[x,y, z, l_, m_, n_] = ff], {z, -2,
2}, {y, -2, 2}, {x, -2, 2}];

```

The LIST has the following form and only contains l, m and n and another factor E which is left undefined for now. It does not contain x, y or z. The LIST can contain any number of terms depending on the problem. Here is an example:

`LIST={0, 0, 0, 0, 0, 0, 0, a^2 b m (-1 + n) n (a^2 + b^2 - 2 E), ... ,0,0, a^3 n(l+1+m) ... }`

So the Do loop cycles through the LIST and extracts out the non zero terms. What I am unsure about is how it is looping over x,y and z when they do not appear in the LIST at all. I assume it is attaching a x,y,z combination to each COEF and they can be called like this:

```COEF[0,1,1,0,2,3]
```

For the instance of when x=0, y=1, z=1, l=0, m=2 n=3. Is this correct? What would be the best way to replicate this in Maple?

- Yeti

## @Updated :Convert mathematica script to maple...

Ì am trying to convert this [APOh.txt] originally coded for mathematica to maple. In mathematica i ran into severa problems in ploting the function etc.. Anyhow so far failed. The code calls inputs from the followin text document [APO-48-10.txt] I am new to maple and its still unfamiliar. Is this possible to convert to maple?

## a bug in package MmaTranslator...

Hello;

Maple can't translate this valid Mathematica expression, it gives error

restart;
with(MmaTranslator):
eq:=FromMma(`x^2(a+y[x])^2 y'[x]==(1+x^2)(a^2+y[x]^2)`);

Error, (in MmaTranslator:-FromMma) The form, a^b^c, is found in the expression. It means either (a^b)^c or a^(b^c). Please use parentheses to clarify the meaning

But there is nothing wrong with the above expression. It is valid Mathematica expression. I found why Maple is confused. It needed a SPACE after the first x^2. So the following works in Maple

eq:=FromMma(`x^2 (a+y[x])^2 y'[x]==(1+x^2)(a^2+y[x]^2)`);

And now the error went away.  But a space not needed in Mathematica. It works either way.

Maple 2016.1 on windows.

## Bug in hypergeom?

by: Maple 2016

Is this a bug?

hypergeom([1, -1, 1/2], [-12,-3], 1);
Error, (in hypergeom/check_parameters) function doesn't exist: missing appropriate negative integers in the first list of parameters to compensate the negatives integer(s): [-3], found in the second list.

Yet this hypergeometric series terminates and Maple should be able to handle it, at least according to the Maple help page (the second rule below applies, yet the numerator has a smaller absolute value, so the first rule below applies).

If some   n[i] is a non-positive integer, the series is finite (that is,   F(n, d, z)  is a polynomial in    z).
If some  d[j]  is a non-positive integer, the function is undefined for all non-zero  z, unless there is also a negative upper parameter of smaller absolute value, in which case the previous rule applies.

Interestingly, the Wolfram Mathematica app can evaluate this to 311/312.

## Bug in implicitplot

Maple

The following three commands

```plots:-implicitplot(3*cos(x) = tan(y)^3, x = -Pi .. Pi, y = -(1/2)*Pi-1 .. (1/2)*Pi+1, thickness = 3, crossingrefine = 1, rational = true, signchange = true, resolution = 1000, gridrefine = 2);
plots:-implicitplot(3*cos(x) = tan(y)^3, x = -Pi .. Pi, y = -(1/2)*Pi-1 .. (1/2)*Pi+1, thickness = 3, crossingrefine = 1, rational = true, signchange = false, resolution = 1000, gridrefine = 2);
plots:-implicitplot(3*cos(x) = tan(y)^3, x = -Pi .. Pi, y = -(1/2)*Pi-1 .. (1/2)*Pi+1, thickness = 3, crossingrefine = 1, rational = true, resolution = 1000, gridrefine = 2);```

produce the same incorrect plot

It is clear the sraight lines given by y=Pi/2 and y=-Pi/2 are superfluous. It should be noticed that the Mmma's ContourPlot command without any options produces a correct plot.

## Critical bug in solve

Maple 2016
 • If the solve command does not find any solutions, then if the second argument is a name or set of names, then the empty sequence (NULL) is returned; if the second argument is a list, then the empty list is returned. This means that there are no solutions, or the solve command cannot find the solutions. In the second case, a warning is issued, and the global variable_SolutionsMayBeLost is set to true.

Let us consider

```solve({x > -Pi, (tan(x)-tan(x)^2)^2-cos(x+4*tan(x)) = -1, x < Pi}, [x]);
[]
```

We see the command omits the solution x=0 without any warning. It should be noticed that Mathematica solves it, outputting

{{x -> 0}, {x -> 0}}

and the warning

Solve::incs: Warning: Solve was unable to prove that the solution set found is complete.

One may draw a conclusion on her/his own.

## An incorrect evaluation of a function at a point...

As a new user of Maple (Maple 2015), I defined the function:

f:=x->(1+1/x)^x

As x->infinity, f(x) increases monotonically to e, as is known.

In financial applications, this function and related functions are often used to show that periodic compounding converges to continuous compounding as the number of compounding periods grows larger.

However, for certain large values of x, f(x) evaluates to functional values larger than e.  For example:

f(x)|x=31536000. evaluates to 2.74327....

which is greater than e=2.71828...

Also notice that is(f(31536000.)>e) returns true.

This incorrect evaluation makes it difficult to demonstrate to students the principles of and relationship between periodic compounding and continuous compounding.

Some other CAS (Mathematica and HP Prime) evaluate the function correctly while TI Nspire also evaluates the function incorrectly.

The following file demonstrates this behavior of Maple 2015:

20160705_example_of_function_evaluation_issue.mw

Can anyone share any insight to this issue or any errors that I am making.

## how i can convert mathematica code in to maple cod...

hi

i have a problem with convert mathematica code in to maple one

thanks

## how to translate this mathematica code into maple ...

``````curve =2{t (3 t^4+50 t^2-33),7 t^6-60 t^4+15 t^2+2}/(t^2+1)^3;
implicit =GroebnerBasis[Thread[{x, y}== curve],{x, y}, t]//First550731776-41620992 x^2+585816 x^4+625 x^6-182250 x^4 y -41620992 y^2+1171632 x^2 y^2+1875 x^4 y^2+364500 x^2 y^3+585816 y^4+1875 x^2 y^4-36450 y^5+625 y^6http://mathematica.stackexchange.com/questions/87136/how-to-convert-a-rational-parametric-plane-curve-into-implicit-form``````

## Mathematica program to Maple program?...

I resolve the surface flat grinding of a metal pieces in Mathematica, but I would like convert this program in Maple syntaxis.

## Calling xlsx file from Maple workbook for another ...

Hi,

I would like to start using maple workbook to manage my projects but i can't figure out the paths. suppose i have a workbook named: WorkBookTest.maple

and inside this i have a folder containing Data in which i have an excel workbook DataTest.xlsx

and also i have a folder containing Documents in which i have a maple worksheet Document.mw

and also i have a folder containing Code in which i have a mathematica notebook Code.nb

Now inside the maple worksheet, to import the excel data i use the command: Import("this:///Data/DataTest.xlsx")

and it works

Now inside the mathematica workbook, to import the excel data i use the command: Import["this:///Data//DataTest.xlsx"]

and it fails

so if i have other program like mathematica notebook inside maple workbook that wants to call a file with data, how should i define the path?

## A simple question I never dare ask ...

Hello All,

What is the Maple equivalent command for \$MaxNumber/\$MinNumber and \$MaxMachineNumber/\$MinMachineNumber (these should be 10^308/10^-308) found in Mathematica.

I never asked this question before because I do *not* like comparisons between Maple and Mathematica, as I said in a post some months ago.

Best :)

Jean-Michel

## How to run this code in Mathematica?...

``````I have the mathematica code given below. I am using Wolfram Mathematica Online. I am very new to Mathematica. When I put this code, I do not get any output. It just does not show me anything. \[Alpha] = 3;
F[s_] := Exp[-A*s^(2/\[Alpha])]; integral =
Re[Assuming[{A > 0, t > 0, {t, A} \[Element] Reals},
Integrate[F[s]*Exp[s*t] /. s -> I*y, {y, 0, Infinity}]/Pi]]Can some help me?``````

## Some legitimate users erased...

There are no users with 0 reputation.  It appears all users with 0 reputation and negative reputation have been erased.  One user I can not find who is or now was a legitimate user is John Mcloone an employee at Mathematica who made a post here.  I can only think during the recent spam attack that all users with 0 or negative reputation were removed.  Some of those users had legitimate questions.  Where did those users, John Mcloone and their posts go?

## Tough BesselJ Integral...

Hi,

I have a list of 603 integrals that I want to evaluate. Unfortunately, I can't get Maple to do most of them. Mathematica can do some that Maple can't, and returns an answer in terms of BesselJ functions. So my question is 2-fold

1) Is there a way to make Maple do this integral?
2) If not, is there a way to efficiently convert 603 expessions to Mathematica and back?

EXAMPLE INTEGRAL
restart;
assume(k1::real, k2::real, R::real, R>0);
a :=cos(x)*exp(I*(k1*R*sin(x)+k2*R*sin(x)-4*x))*sin(x):
int(a, x=-Pi/2..Pi/2) assuming real;

Thanks!

 > restart;
 > assume(k1::real, k2::real, R::real, R>0);
 > a :=cos(x)*exp(I*(k1*R*sin(x)+k2*R*sin(x)-4*x))*sin(x)
 (1)
 > int(a, x=-Pi/2..Pi/2) assuming real;
 (2)

 > ans := -(1/((k1 + k2)^6*R^6))*2*I*Pi* ( 10*(k1 + k2)^4*Pi*R^4*BesselJ(2, sqrt((k1 + k2)^2*R^2)) + 2*Pi ((k1 + k2)^2*R^2)^(3/2) (-30 + (k1 + k2)^2*R^2) *BesselJ(3, sqrt((k1 + k2)^2*R^2)) - (k1 + k2)^4*R^4*(-(k1 + k2)*R*cos((k1 + k2)*R) + sin((k1 + k2)*R)) + 8*(k1 + k2)^2*R^2*(-(k1 + k2)*R*(-6 + (k1 + k2)^2*R^2)*cos((k1 + k2)*R) + 3*(-2 + (k1 + k2)^2*R^2)*sin((k1 + k2)*R)) - 8*(-(k1 + k2)*R*( 120 - 20*k2^2*R^2 + k1^4*R^4 + 4*k1^3*k2*R^4 +
 > k2^4*R^4 + 4*k1*k2*R^2*(-10 + k2^2*R^2) +
 > k1^2*(-20*R^2 + 6*k2^2*R^4))*cos((k1 + k2)*R) +
 > 5*(24 - 12*k2^2*R^2 + k1^4*R^4 + 4*k1^3*k2*R^4 + k2^4*R^4 +
 > 4*k1*k2*R^2*(-6 + k2^2*R^2) +
 > 6*k1^2*R^2*(-2 + k2^2*R^2))*sin((k1 + k2)*R) ) );
 (3)
 >
 >