Why Compute Taylor Coefficients from the ODE?
A Taylor method advances an initial-value problem by approximating its solution near a known point. A direct approach would repeatedly differentiate the solution to obtain higher derivatives. But for an equation such as \(y'=f(t,y)\), those derivatives can become complicated quickly, especially when \(f\) is nonlinear.
Instead, we can represent the local Taylor coefficients as unknowns and use the differential equation to determine them one at a time. The key idea is that the coefficient of \(h^n\) in the derivative depends on the next solution coefficient, while the coefficient of \(h^n\) in \(f(t,y)\) can be computed from the coefficients already found.
Coefficients and the Recurrence
Consider the initial-value problem \(y'=f(t,y)\), \(y(t_0)=y_0\), and let \(h=t-t_0\). If the solution has the required derivatives, define its Taylor coefficients at \(t_0\) by
For now, the associated infinite expression is understood as a formal Taylor series: it records coefficients and does not, by itself, assert that the series converges to the solution. For a finite calculation through degree \(p\), use the Taylor polynomial
Write \(F(h,y)=f(t_0+h,y)\). If the coefficient of \(h^n\) in the formal expansion of \(F(h,\sum_{j\ge 0}a_jh^j)\) is \(c_n\), then the recurrence is
The coefficient \(c_n\) depends only on \(a_0,\ldots,a_n\). Thus, once \(a_0\) is known, the equation determines \(a_1\), then \(a_2\), and so on. The coefficient notation \([h^n]G(h)\), when used, means “the coefficient of \(h^n\) in \(G(h)\).” In this notation, \(c_n=[h^n]F(h,\sum_{j\ge 0}a_jh^j)\).
Why Matching Coefficients Works
The justification follows directly from the derivative of a power series, or, for a finite computation, from the derivative identities for Taylor coefficients. Differentiating the formal expression term by term gives
The ODE says this derivative equals \(F(h,y)\). If the coefficient of \(h^n\) on the right is \(c_n\), equality of coefficients requires \((n+1)a_{n+1}=c_n\). This also explains the index shift: the \(h^n\) term of the derivative comes from the \(a_{n+1}h^{n+1}\) term of the solution.
For an actual solution with sufficiently many derivatives, the same relation holds for its finite Taylor coefficients. In particular, the coefficient of \(h^n\) in the Taylor expansion of \(y'\) is \(y^{(n+1)}(t_0)/n!=(n+1)a_{n+1}\), and the ODE supplies the matching coefficient from \(f(t_0+h,y(t_0+h))\). This finite-coefficient argument does not require an infinite Taylor series to converge.
Worked Example: A Linear Equation with Explicit Time Dependence
Worked Example: Finding Coefficients for \(y'=t+y\)
Find the Taylor coefficients at \(t_0=0\) for \(y'=t+y\), \(y(0)=1\), through degree four.
Set \(h=t\) and write the formal coefficients as \(a_0,a_1,\ldots\), with \(a_0=1\). The right side is \(h+\sum_{n\ge0}a_nh^n\). Its coefficient of \(h^n\) is \(a_n+1\) when \(n=1\), and \(a_n\) otherwise. Therefore
where \(\delta_{n1}=1\) if \(n=1\) and \(0\) otherwise. Compute each coefficient:
Thus the degree-four Taylor polynomial is
For a step of \(h=0.1\), calculate each term:
Check the coefficients against the ODE using the exact solution. Solving \(y'-y=t\) gives \(y=2e^t-t-1\): its derivative is \(2e^t-1\), and \(t+y=t+2e^t-t-1=2e^t-1\); also \(y(0)=1\). Its Taylor expansion begins \(1+t+t^2+t^3/3+t^4/12\), confirming the coefficients. At \(t=0.1\), the exact value is \(2e^{0.1}-1.1\approx1.110340371976\), so the degree-four step differs by about \(0.000001294691\). This comparison checks the calculation; the recurrence itself did not require the exact solution.
Worked Example: A Nonlinear Equation
Worked Example: Finding Coefficients for \(y'=y^2\)
Find the coefficients through degree four for \(y'=y^2\), \(y(0)=1\). Here the coefficient of \(h^n\) in \(y^2\) is the convolution sum \(\sum_{k=0}^{n}a_ka_{n-k}\). Hence
Starting with \(a_0=1\), calculate in order:
Therefore \(P_3(h)=1+h+h^2+h^3\). Taking a third-order step with \(h=0.2\) gives
Check against the exact solution \(y=1/(1-t)\), valid near \(t=0\). Its derivative is \(1/(1-t)^2=y^2\), and its initial value is \(1\). At \(t=0.2\), it equals \(1/0.8=1.25\), differing from the cubic step by \(0.002\). Its geometric expansion \(1+t+t^2+t^3+\cdots\) confirms the coefficients calculated by the recurrence.
Worked Example: Explicit Time Dependence and Nonlinearity
Worked Example: Finding Coefficients for \(y'=ty+t^2\)
Let \(y(0)=1\). The coefficient of \(h^n\) in \(hy\) is zero for \(n=0\), and is \(a_{n-1}\) for \(n\ge1\). The added term \(h^2\) contributes \(1\) when \(n=2\). Thus
Now compute successively, beginning with \(a_0=1\):
The degree-four polynomial is \(P_4(h)=1+h^2/2+h^3/3+h^4/8\). For \(h=0.2\),
Check the recurrence by differentiating the polynomial and comparing coefficients in the ODE. Its derivative is \(P_4'(h)=h+h^2+h^3/2\), while
The coefficients match through degree three, as required for a degree-four solution polynomial: differentiating \(P_4\) lowers its degree by one. The higher-degree terms on the right reflect coefficients not included in \(P_4\).
Using the Recurrence in a Taylor Step
For an initial value \(y(t_0)=y_0\), once \(a_0,\ldots,a_p\) have been computed, the degree-\(p\) Taylor step to \(t_0+h\) is
This is a finite approximation. If the solution has \(p+1\) continuous derivatives near \(t_0\), Taylor's theorem gives a remainder of order \(h^{p+1}\) as \(h\) approaches zero. The recurrence supplies the coefficients; the smoothness condition justifies the finite approximation and its remainder statement. Do not infer convergence of an infinite series merely because the recurrence can be continued indefinitely.
For a general right-hand side, a practical calculation forms only the terms needed. For instance, if \(F\) contains products, multiply the truncated polynomials and retain coefficients through the required degree. If \(F\) contains a known smooth function of \(h\), use its Taylor coefficients to the required finite order. This is coefficient arithmetic, not a claim that the resulting infinite series represents the solution.
A Common Factorial and Indexing Mistake
The numbers \(a_n\) are Taylor coefficients, not the derivatives themselves. Since \(a_n=y^{(n)}(t_0)/n!\), omitting the factorial gives incorrect values. For \(y'=y^2\), \(y(0)=1\), the recurrence gives \(a_2=1\). A mistaken calculation might identify \(a_2\) with \(y''(0)\) and conclude \(y''(0)=1\). But differentiating the ODE gives \(y''=2yy'\), so \(y''(0)=2\).
The correction is \(a_2=y''(0)/2!=2/2=1\). The recurrence’s factor \(n+1\) is also essential: \((n+1)a_{n+1}\), not \(a_{n+1}\), is the coefficient of \(h^n\) after differentiating the series. Keeping these two facts separate prevents a common off-by-one error.
Why These Recurrences Matter
Recurrences turn a differential equation into a systematic process for generating local Taylor data. They are especially useful when differentiating the solution repeatedly by hand would be cumbersome, or when the right-hand side has a structure—such as a polynomial or a simple product—that makes coefficient extraction efficient.
The method also makes its assumptions visible. A list of recursively generated coefficients is always useful as formal or finite-order information, but it does not prove that an infinite series converges to the solution. For numerical work, a finite Taylor polynomial is the object used for a step, with its accuracy understood through the differentiability and remainder conditions appropriate to that finite order.
Check Your Understanding
Use the coefficient recurrence and the distinction between formal and convergent series to answer these questions.
- For \(y'=f(t,y)\), why does the coefficient of \(h^n\) in \(y'\) equal \((n+1)a_{n+1}\)?
- For \(y'=y^2\), \(y(0)=1\), calculate \(a_1\) and \(a_2\) from the convolution recurrence.
- For \(y'=t+y\), \(y(0)=1\), what contribution does the explicit \(t\) term make to the coefficient of \(h^n\)?
- What differentiability condition justifies a degree-\(p\) Taylor polynomial with an \(O(h^{p+1})\) remainder?
- Does generating infinitely many formal coefficients prove that their series converges to the solution? Explain.