radaar

202 Reputation

8 Badges

7 years, 25 days

MaplePrimes Activity


These are replies submitted by radaar

@Markiyan Hirnyk 

Do you think there is any problem in my code. I didn't get the error you just pointed out about hardware floats.

@Mariusz Iwaniuk 

Can I simpify the inner summation so that the expression will be left with only one summation.

@acer 

In this case it is fine but in the other case it is an uphill battle.

@acer 

In most of the cases I am evaluating the function for an increment of the variable i.e running a loop. So as you said I am afraid that at some value of the variable (over which the loop is running) the Digits and nterms which i am setting may not be enough.

@Carl Love 

In the following I tried to evaluate the sum using both eval and evalf but eval takes much more time than evalf. Why it is so. Considering the simple example it is ok but if it somewhat larger sum then it may take huge lot of time compared to evalf.

eval-evalf.mw
 

restart; Digits := 50; a := 1.689; f := proc (n, Z) options operator, arrow; a*(Sum(Z^(2*i)*hypergeom([n-i+2, 1/2], [3/2], cos(-Z^2/a))*(Sum(pochhammer(n^2, j)*sin(Pi*Z^2/n), j = 0 .. i))/factorial(i)^2, i = 0 .. 100)) end proc; evalf(f(3, 1))

1572.6261454761299423773653727543181610273126394169

(1)

restart; Digits := 50; a := 1.689; f := proc (n, Z) options operator, arrow; a*(sum(Z^(2*i)*hypergeom([n-i+2, 1/2], [3/2], cos(-Z^2/a))*(sum(pochhammer(n^2, j)*sin(Pi*Z^2/n), j = 0 .. i))/factorial(i)^2, i = 0 .. 100)) end proc; Re(eval(f(3, 1)))

1572.6261454761299423773653727543181610273126394169

(2)

``


 

Download eval-evalf.mw

 

@Kitonum 

Thank you. But I need KK as a function of x. You may think of this case
 

KK := proc (x, n) options operator, arrow; diff(n*x^2, x) end proc

proc (x, n) options operator, arrow; unapply(D(n*x^2, x), x) end proc

(1)

KK(2, 2)

Error, (in D) expecting 1 argument, got 2

 

NULL


 

Download FUNCTION_(2).mw

@tomleslie 

I am running calculation in 32 bit maple 2016 trial version on  64 bit windows 10. It takes much time for calculation in my system than you pointed. 1)Sum takes around 3 minutes and gives error as shown 2) with add - 2 minutes with correct result and third one you see in my code where Sum is used with expression written using shortkeys I get correct result. Is it problem with using 32 bit version in a 64 bit machine. I dont have a 64 bit maple version, it will be useful if I get 64 bit version. Thank you.

 

As all of you pointed that the result get converging with upper limit taken to be 100, And I am looking  for 4-5 decimal places. I have a doubt what if in this the same case if it doesn't converge with these many points and we are asked to go for infinity or atleast 500 points. With 200 points it shows maple was unable allocate enough memory. Please see below code where a strange results are obtaining with Digits:=50

JJ6.mw
 

 

 

 

. Since I am a beginner with maple I am unaware of running  the job in parallel.  Also how is it possible to implement same in mathematica (where my approach takes 3-4 hours to complete the job) since I am much more comfortable with using mathematica.

First 10 11 12 Page 12 of 12