I am trying to generate a series expansion in terms of the variable t then substitute a value in for it. However it seems that something about the SeriesData object returned by Series doesn't permit a standard slashdot replacement.
Series[(a^4 - (a - t)^4), {t, 0, 4}] // Normal /. t -> a/20
returns
4 a^3 t - 6 a^2 t^2 + 4 a t^3 - t^4
which is the same result as though the slashdot isn't even there.
On the other hand, replacing prior to Normal results in an undesirable output.
Series[a^4 - (a - t)^4 , {t, 0, i}] /. t -> a/20 // Normal
returns
(4 a^3 a)/20 - 6 a^2 (a/20)^2 + 4 a (a/20)^3 - (a/20)^4 + O[a/20]^6
This is on the right track, but I am left with the BigO and no amount of Simplify or its related functions can get the expression to condense to C*a^4.
To further complicate things, I am trying to run this within a For loop where I increment the number of kept terms.
For[i = 1, i <= 4, i++,
Print[Series[a^4 - (a - t)^4), {t, 0, i}] // Normal /. t -> a/20]]
So, how can I do the Series expansion, substitute a/20 in for t, and get a nice output that is, ideally, some constant times a^4. Much thanks.
Normal@Series[(a^4 - (a - t)^4), {t, 0, 4}] /. t -> a/20. Operator precedence. in other words, implicitly, your original expression is interpreted like this:Series[(a^4 - (a - t)^4), {t, 0, 4}] // (Normal /. t -> a/20). – march Sep 20 '17 at 22:00