## 225 Reputation

8 years, 224 days

## Social Networks and Content at Maplesoft.com

Finished Ph.D. in Applied Algebraic Geometry in Biology and did postdoc in Mathematics of Chemical Reaction Networks, University of Copenhagen. Another postdoc in Nonlinear Dynamics in the Mathematical Models of Cell Biology at University of Szeged. Currently a research fellow at Coventry University. Main interests; Applied and Computational Algebraic Geometry, Computer Algebra, Mathematical Biology, Chemical Reaction Network Theory, Population Dynamics. I'm also a language lover!

## Typesetting:-Typeset worked :)...

@acer Thanks. Your first suggestion worked.

## typeset has the same problem as well!...

I also have the same struggle that Maple simplify a math expression that is supposed to stand only for a label of a plot and not to be simplified. For example using

```typeset(log[10](sigma^2))
```

gives you  which is of course not what I want to put on my plot :'( Is there anyway to emphasize to Maple that please don't simplify or do any changes on my input expression for typeset etc?

## Can you provide an example?...

Szia Csaba. To convert an expression written in 2-D math, just right clicking on it and then from "2-D math" --> convert to --> "1-D math input" works. Or you can select the expression and then menu bar --> format --> convert to --> 1-D math input. If you have any specific example where instead of the expression itself, its result is getting represented in 1-D math input format, then can you provide one.

## A not much suitable alternative method...

An alternative method is to use the following post

https://stackoverflow.com/questions/27477658/save-putty-ouput-to-file-from-command-line/38347463#38347463

After closing Putty, going to the path you will see a log file, then open it with notepad. But it may look a bit ugly. A picture of the result (in my case) is in below.

## Heaviside and piecewise and abs...

I used heaviside and piecewise just multiplying one more function to the integrand and then they gave me two different results in Maple!

```int(abs((k5*x2-k1)*(k5*x1-k2)-k5^2*x1*x2)*piecewise(0 < -k5*x1*x2+k1*x1 < 1, 1, -k5*x1*x2+k1*x1 <= 0 and 1 <= -k5*x1*x2+k1*x1, 0)*piecewise(0 < -k5*x1*x2+k2*x2 < 1, 1, -k5*x1*x2+k2*x2 <= 0 and 1 <= -k5*x1*x2+k2*x2, 0), [k1 = 0 .. 1, k2 = 0 .. 1, k5 = 0 .. 1, x1 = 0 .. 1, x2 = 0 .. 1]);
## infinity
f := piecewise(0 < -k5*x1*x2+k1*x1 < 1, 1, -k5*x1*x2+k1*x1 <= 0 and 1 <= -k5*x1*x2+k1*x1, 0)*piecewise(0 < -k5*x1*x2+k2*x2 < 1, 1, -k5*x1*x2+k2*x2 <= 0 and 1 <= -k5*x1*x2+k2*x2, 0); g := convert(f, Heaviside); int(abs((k5*x2-k1)*(k5*x1-k2)-k5^2*x1*x2)*g, [k1 = 0 .. 1, k2 = 0 .. 1, k5 = 0 .. 1, x1 = 0 .. 1, x2 = 0 .. 1]);
## -29/360
```

The function I multiplied is positive and bounded on the region of integration and I didn't use numeric option, so I don't get why Maple once gives infinity and the other time gives a negative value.

## It seems it is really divergent...

Writing the integral as limit of a Rimannian sum sequence by the following computation it seems you are right and it is divergent to +infinity.

But then it also means that Maple sometimes give wrong answers, yes? Because the second integral in my question should be greater than the first integral and if the first one is divergent to +inifnity, then the second one is as well.

## Can you say why do you think the integra...

If you remove the absolute value part with all inside of it from the integral, Maple gives a finite value as the answer. Now thinking of the absolute value part. I think when it gets large, the rest of the integrand gets small. I guess it's more a problem of programming, maybe in numerical computations sometimes Maple doesn't behave well with the absolute value symbol (just a guess, I'm not claiming this is the case). For example look at the following;

`subs([t = 2, k[6] = 0.1e-6, T[1] = 0.1e-6], abs(23021.44392*k[6]-(113433.3241*(4.913357862*T[1]/k[6]+.1000000000))*k[6]+610432.4100*T[1]))`

Why does it simplify everything, but not the absolute value and needs evalf to effect the absolute value?

Let's try one of the points when the absolute value part gets large.

## Any further information on your polynomi...

Depending on the form of your polynomials there may be a method. Let's say if you are in a binomial ideal or homogenous ideal or an ideal coming from a specific application ... . So is there any special thing about your ideal which you think it may help?

## Restarting and not opening the file with...

I restarted the computer and then I didn't open that file in my Maple, then there was no empty number error anymore. On the other hand I sent the file to a friend and when he opened it, he also encountered the error. So something is wrong in that file and if it is open in the Maple, it causes other files to have a problem. But I can't see what is wrong in that file.

## I have a same problem with empty number ...

@Joe Riel I just happened to this error from today. Until yesterday there was no sign of this error in my files. Today whetever I type from a list or whatever I have to add a space before the closing paranthesis or closing brackets in all of my files. Even those that I had from previous days. I tried the stoperror('all'); but it still didn't solve the problem. Anything else that I can do?

## Exactly!...

@acer exactly, thank you ^_^

## Does it work for more than two parameter...

@Kitonum How should I use the mothed you used for more than two parameters? I tried the following but it didn't work.

`plot([seq(seq(seq([x,y, k[1]=0..1], k[2]=0..1,0.01), k[3]=0..1,0.01),k[4]=0..1,, 0.01)], thickness=4, color=green);`

## Thanks...

@Carl Love The prefix form worked, thanks.

## seq result...

Thank you, it worked for array. I changed it in my procedure but I also have

`T := cartprod([[1, 2, 3]\$n])`

Should I use seq for this too?

Using seq for Array and leaving this catprod remaining with its \$, Maple 2016 didn't show any error but my procedure is showing wrong answers while in Maple 2015 it was giving correct results. So some part of procedure is not working as before. Since I don't know of any other source of changes in versions, I guess it goes back to \$ again.

## 2D Parser...

@Joe Riel  What is 2D Parser?
But one can do it manually if the dimension of the array is fixed determined number like here "3", in my procedure I'm taking the dimension as one of the inputs so it's not a fixed number and I do need Array((1..3)\$n) which n varries.

 1 2 3 4 Page 3 of 4
﻿