16 reputation
3
bio website
location
age
visits member for 1 year, 6 months
seen Apr 10 at 13:12

Feb
10
comment NSolve solution does not verify original equation
I have checked a bit more your solution and this is what I found: the integral evaluates to a complex number for W between 0 and $3.6\times10^{-7}$. Anything above that the integral is real. So I will use your solution for values close to 0 for W and worry no more! Thanks a lot!
Feb
10
comment NSolve solution does not verify original equation
I have checked a bit more your solution and this is what I found:
Feb
10
comment NSolve solution does not verify original equation
I thought of that, but I have to following worry: what happens in the vicinity of W=0? That integral is a function of W esentially, so what hapens in the vicinity of 0? Is the value of the integral correct using this method?
Feb
10
comment NSolve solution does not verify original equation
I have tried Chop just now, but I am having the same problem as I described in my edit.
Feb
10
revised NSolve solution does not verify original equation
added 352 characters in body
Feb
10
awarded  Commentator
Feb
10
comment NSolve solution does not verify original equation
Small error: instead of "I get complex values later when I do Sqrt[x1]" shoud be "I get complex values later when I do Sqrt[f(x1)]"
Feb
10
asked NSolve solution does not verify original equation
Oct
11
comment How to sum up large number of elements in a table quickly?
@acl to me it seems that Total isn't very fast, or it is slower in this case due to something that I can't see. There is a very large amount of elements to be added. Is there an alternative way to add the elements of a Table, other than Total, For loops or Sum?
Oct
11
comment How to sum up large number of elements in a table quickly?
@acl I tried running my problem using Table instead of ParallelTable but the latter is considerably faster. I get 649 seconds vs a lot more for the case of Table (I actually stopped it after it passed the 10 minute mark)
Oct
11
awarded  Editor
Oct
11
revised How to sum up large number of elements in a table quickly?
added 4 characters in body
Oct
11
comment How to sum up large number of elements in a table quickly?
@acl Thank you fo the extensive post. I have never used Compile successfully but I will try and give it another go.
Oct
11
awarded  Student
Oct
11
comment How to sum up large number of elements in a table quickly?
I am afraid that I do not understand how you made f faster. Can you explain a bit more please?
Oct
11
comment How to sum up large number of elements in a table quickly?
A1 and A2 are 2500x2500 (but this is an example, it could be more but let's go with this because I know that it takes about 10 mins on my machine). But as I said before, these remain constant. This was the whole idea. I wanted to precalculate them in order to gain speed, and I did but the final Table[f[x],{x,1,2500}], this takes 10 mins to calculate.
Oct
11
comment How to sum up large number of elements in a table quickly?
I have a laptop with a 2.4 core i5 procesor and 4 Gb of ram
Oct
11
comment How to sum up large number of elements in a table quickly?
Hang, on I just read previous comment earlier. It takes under a second for one value of x. For 2000+ values it takes about 10 minutes. This is what I am hoping to improve. More precisely if I do: ParallelTable[f[x],{x,1,2000}], it takes about 10 mins.
Oct
11
comment How to sum up large number of elements in a table quickly?
well yes, you are right, f[x] takes under 1 second, but if i need to apply f to 2000 values of x then the time increases significantly. I have a feeling that there might be nothing else to do to speed this up. But hope is the last to go :)
Oct
11
comment How to sum up large number of elements in a table quickly?
they are constant. These are 2D tables created using Table, if this is of any help.