AmirHosein Sadeghimanesh

70 Reputation

6 Badges

4 years, 30 days

Social Networks and Content at Maplesoft.com

Finished Ph.D. in Applied Algebraic Geometry in Biology and now postdoc in Mathematics of Chemical Reaction Networks, University of Copenhagen. Main interests; Applied and Computational Algebraic Geometry, Mathematical Biology. I'm also a language lover!

MaplePrimes Activity


These are replies submitted by AmirHosein Sadeghimanesh

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.

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.

@Carl Love  @vv @Preben Alsholm

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.

@vv 

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.

@vv 

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.

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?

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.

@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?

@acer exactly, thank you ^_^

@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);

 

@Carl Love The prefix form worked, thanks.

@Kitonum 

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.

@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.

@Thomas Richard I did type i mod 2 in maple but after copying here I saw it is written `mod` (i,2) and I thought `` are extra. Now I corrected it in question's face.

@Carl Love 

Thanks.

1 2 Page 1 of 2