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 bottom of the documentation the related functions and you find SeriesCoefficient
The Series
2nd order coefficient is:
SeriesCoefficient[sol, {t, 0, 2}]
-((k1 k2)/2) - k2^2
Third order:
SeriesCoefficient[sol, {t, 0, 3}]
1/6 (k1^2 k2 + 3 k1 k2^2 + 5 k2^3)