Tag Info

New answers tagged

1

Looks like homework, but anyway. The idea is to take derivatives, substituting from lower derivatives to rewrite e.g. x'' in terms of x' (which you can already rewrite in terms of x). Below I show this for x''[0]. Similar substitutuins, keeping track of past derivative rewrites, can be used to get higher derivatives to evaluate at t=0. xprime[t] := -k1 x[t] ...


2

Search the documentation for Taylor, first hit is Series. Solve Differential equation, sol = x[t] /. First@DSolve[ { D[x[t], t] == -k1 x[t] + (1 - x[t]) k2 Exp[-k2 t] , x[0] == 0 } , x[t], t]; You can get the series by Series[sol, {t, 0, 3}] but you are interested only in the 2nd and 3rd order coefficients, so you see at the ...


9

@Artes's use of Coefficient certainly seems the most straightforward and probably the best for small examples. If the polynomials have very many terms, the use of SeriesData to represent the polynomials will give better performance. The multiplication of series is efficient in Mathematica. One should note that it is truncated beyond the maximum degree ...


8

There is a straightforward answer analogous to that in Maple : Coefficient[ Sum[t^i, {i, 5}] Sum[t^i, {i, 2, 6}] Sum[t^i, {i, 3, 9}], t, 15] 19 This can be verified by expanding the polynomial: Expand[ Sum[t^i, {i, 5}] Sum[t^i, {i, 2, 6}] Sum[t^i, {i, 3, 9}]] However you can do it in many different ways e.g. by exploiting CoefficientRules or ...


2

Truncate early and often. f[0] = f0; f[n_] /; n > 0 := f[n] = Sum[ Series[1/(6 + j x) n (1/x + j f[n - 1]), {x, 0, 0}], {j, 1, 4}]; Timing[ res = Series[ Sum[Series[1/(2 + n x) (n/x + f[n]), {x, 0, 0}], {n, 1, 6}], {x, 0, 0}]] (* Out[140]= {0.012000, SeriesData[x, 0, { Rational[1016635, 162], Rational[5, 486] (-3351289 + 835701 f0)}, ...



Top 50 recent answers are included