08/26/2009, 09:55 PM
(08/26/2009, 09:15 PM)bo198214 Wrote: I also always used precision 1000 but that does not stretch the time in that amount.Well, as far as the amount of precision, this needs to be tuned to the problem being investigated. For the slog, I found that I need about 1.4 times as many bits as terms (which oddly enough is close to the magnitude of the radius of convergence, but this might be a coincidence), just to get numerical stability, and then however many additional bits of accuracy I want. So if I want 200 bits of accuracy, and I'm using 250 terms, I need about 550 bits, maybe a bit less (520?), so I just used 512 to pick a nice multiple of 64.
I really dont know why it takes so long.
I'm not sure if the same 1.4x rule applies for your recentered function; it could be 1.3 or 1.5 or something like that, so a bit of empirical investigation is required before you can safely tune to tight bounds. (Yes, I know your method is not recentered in the sense of recentering a polynomial, but it's still recentered in terms of what the output is compared to the input).
Quote:Well, the Carleman matrix consists of rows that are powers of the Taylor series in question (iterated multiplication, not iterated composition). To calculate the multiplication, we need to perform "long multiplication", which can be done with a matrix (the matrix called "mulm" in my code).Quote:I use iterative matrix multiplication,
I am not sure how it works. Can you give just the basic idea?
Probably the best way to see this is with a simple code example:
Create a matrix:
Code:
var('a,b,c,d,f,g')
M1 = [[a, 0, 0],
[b, a, 0],
[c, b, a]]
M2 = [d, f, g]
M3 = [];
# Multiply the matrix by the vector (can't make symbolic matrices
# in SAGE, so I'm faking it here with lists)
for kk in xrange(3):
M3.append(sum(M1[kk][jj] * M2[jj] for jj in xrange(3)));
print M3
f1 = a + b*x + c*x^2;
f2 = d + f*x + g*x^2;
f3 = (f1*f2).expand().series(x, 3);
print f3;Output:
Code:
[a*d, a*f + b*d, a*g + b*f + c*d]
(a*d) + (a*f + b*d)*x + (a*g + b*f + c*d)*x^2 + Order(x^3)
~ Jay Daniel Fox

