Talk:Formal power series: Difference between revisions

Content added Content deleted
(→‎Task and goal: new section)
m (→‎Task and goal: correction + little detail)
Line 49: Line 49:
As far as I can understand it, the task (from the bold '''task''' to the end of paragraph, before "As an example") could be accomplished by implementing a (numerical) method for derivative to compute Taylor coefficients... if the given function is ''derivable'' (he*l I'm not sure this is the right translation) &infty; times in 0; and then implementing operations like + - * / over ''finite'' (only theoretically infinite) vectors (which are nothing but coordinates in a space with basis 1,x,x<sup>2</sup>...)...
As far as I can understand it, the task (from the bold '''task''' to the end of paragraph, before "As an example") could be accomplished by implementing a (numerical) method for derivative to compute Taylor coefficients... if the given function is ''derivable'' (he*l I'm not sure this is the right translation) &infty; times in 0; and then implementing operations like + - * / over ''finite'' (only theoretically infinite) vectors (which are nothing but coordinates in a space with basis 1,x,x<sup>2</sup>...)...


Until here, everything's fine, we can leave functional programming or lazy evaluation apart: we can just ''register'' a function (e.g. returning an opaque ''handler'' in langs like C) and expand it when needed, truncating the series to N (where N must be choosen smartly, but even roughly, it won't change too much for the task part); or, we can expand it and store the coefficients, truncating the expansion at the ''convenient'' number N... this approach is better for a lot of languages, and the user likely can see the difference (if N is choosen well).
Until here, everything's fine, we can leave functional programming or lazy evaluation apart: we can just ''register'' a function (e.g. returning an opaque ''handler'' in langs like C) and expand it when needed (e.g. for computation... but the result of course "exists" only as coefficients), truncating the series to N (where N must be choosen smartly, but even roughly, it won't change too much for the task part); or, we can expand it and store the coefficients, truncating the expansion at the ''convenient'' number N... this approach is better for a lot of languages, and the user likely can't see the difference (if N is choosen well).


But this is about the task part. The example makes it less clear: is it asking just to demonstrate that the integral we implemented works fine? I.e. we find the coeffs for sin, then the coeffs for cos, then we compute integral of cos (using the new type) &mdash;or the derivative of sin...&mdash; and we show that the coeffs are the same of sin...? (then in the example we did not need to use a definite integral for this)
But this is about the task part. The example makes it less clear: is it asking just to demonstrate that the integral we implemented works fine? I.e. we find the coeffs for sin, then the coeffs for cos, then we compute integral of cos (using the new type) &mdash;or the derivative of sin...&mdash; and we show that the coeffs are the same of sin...? (then in the example we did not need to use a definite integral for this)