Example:
Consider the initial
value problem for the
Riccati equation
\[
y' = x^2 + y^2 , \qquad y(0) =1.
\]
First, we find its series solution.
Clear[seriesDSolve];
seriesDSolve[ode_, y_, iter : {x_, x0_, n_}, ics_: {}] :=
Module[{dorder, coeff},
dorder = Max[0, Cases[ode, Derivative[m_][y][x] :> m, Infinity]];
(coeff = Fold[
Flatten[{#1,
Solve[#2 == 0 /. #1,
Union@Cases[#2 /. #1, Derivative[m_][y][x0] /; m >= dorder,
Infinity]]}] &,
ics,
Table[
SeriesCoefficient[ode /. Equal -> Subtract, {x, x0, k}],
{k, 0, Max[n - dorder, 0]}]
];
Series[y[x], iter] /. coeff) /; dorder > 0
]
seriesDSolve[y'[x] == x^2 + (y[x])^2, y, {x, 0, 15}, {y[0] -> 1}]
1 + x + x^2 + (4 x^3)/3 + (7 x^4)/6 + (6 x^5)/5 + (37 x^6)/30 + (
404 x^7)/315 + (369 x^8)/280 + (428 x^9)/315 + (1961 x^10)/1400 +
(
75092 x^11)/51975 + (1238759 x^12)/831600 + (9884 x^13)/6435 + (
17121817 x^14)/10810800 + (115860952 x^15)/70945875 + SeriesData[
x, 0, {}, 0, 16, 1]
So we have
\begin{align*}
y(x) &= 1 + x + x^2 + \frac{4}{3}\,x^3 + \frac{7}{6}\, x^4 + \frac{6}{5}\,x^5 + \frac{37}{30}\, x^6 + \frac{404}{315}\, x^7 + \frac{369}{280} \, x^8 + \frac{428}{315}\,x^9 + \frac{1961}{1400}\,x^{10} \\
& \quad + \frac{75092}{51975}\,x^{11} + \frac{1238759}{831600}\, x^{12} +
\frac{9884}{6435}\,x^{13} + \frac{17121817}{10810800}\, x^{14} + \frac{115860952}{70945875}\, x^{15} + \cdots .
\end{align*}
Incidentally, this procedure can be automated very easily with a computer algebra system. Here's how to do so with
Mathematica:
For[{n = 1, y[0][x_] = 1}, n < 4, n++,
y[n][x_] = 1 + Integrate[y[n - 1][t]^2 + t^2, {t, 0, x}];
Print[{n, y[n][t]}]]
{1,1+t+t^3/3}
{2,1+t+t^2+(2 t^3)/3+t^4/6+(2 t^5)/15+t^7/63}
{3,1+t+t^2+(4 t^3)/3+(5 t^4)/6+(8 t^5)/15+(29 t^6)/90+(47 t^7)/315+
(41 t^8)/630+(299 t^9)/11340+(4 t^10)/525+(184 t^11)/51975+t^12/2268+(4 t^13)/12285+t^15/59535}
So
\begin{align*}
\phi_0 &= 1, \\
\phi_1 (x) &= 1 + x + \frac{x^3}{3} , \\
\phi_2 (x) &= 1 + x + x^2 + \frac{2\,x^3}{3} + \frac{1}{6}\, x^4 + \frac{2}{15}\, x^5 + \frac{x^7}{63} , \\
\phi_3 (x) &= 1 + x + x^2 + \frac{4}{3}\, x^3 + \frac{5}{6}\, x^4 +
\frac{8}{15}\, x^5 + \frac{29}{90}\, x^6 + \frac{47}{315}\, x^7 \\
&\quad + \frac{41}{630}\, x^8 + \frac{299}{11340}\, x^9 + \frac{4}{525}\, x^{10} +
\frac{184}{51975}\, x^{11} + \frac{1}{2268}\,x^{12} + \frac{4}{12285}\,x^{13} + \frac{x^{15}}{59535} .
\end{align*}
If you want intermediate results, too, here is a function that keeps them:
picardList[initialVector_, flow_, n_, var_] :=
Module[{time},
FoldList[
iterate[
initialVector, flow, #1, #2, time
] &,
initialVector,
Reverse[Range[n] - 1]] /. {Subscript[time, _] -> var}
]
picardList[1, flow, 4, x] // TableForm
Picard's iterations could be found using the following subroutine:
Clear[picardSeries, iterate];
iterate[initial_, flow_, psi_, n_, t_] :=
initial +
Expand@Apply[Subtract,
Assuming[{Subscript[t, n + 1] > 0},
Integrate[flow[Subscript[t, n + 1], psi],
Subscript[t, n + 1]]] /. {{Subscript[t, n + 1] ->
Subscript[t, n]}, {Subscript[t, n + 1] -> 0}}]
picardSeries[initialVector_, flow_, n_, var_] :=
Module[{time},
Fold[iterate[initialVector, flow, #1, #2, time] &, initialVector,
Reverse[Range[n] - 1]] /. {Subscript[time, 0] -> var}]
Then we apply this subroutine to our problem:
flow[t_, f_] := f^2 + t^2
picardSeries[1, flow, 5, x]
There is no way to find a pattern or estimate the radius of convergence of the
above series. Now we try to find its explicit solution:
DSolve[{y'[x] == (y [x])^2 + x^2, y[0] == 1}, y[x], x]
{{y[x] -> (-x^2 BesselJ[-(3/4), x^2/2] Gamma[1/4] +
x^2 BesselJ[-(5/4), x^2/2] Gamma[3/4] +
BesselJ[-(1/4), x^2/2] Gamma[3/4] -
x^2 BesselJ[3/4, x^2/2] Gamma[3/
4])/
(x (BesselJ[1/4, x^2/2] Gamma[1/4] -
2 BesselJ[-(1/4), x^2/2] Gamma[3/4]))}}
Therefore, its solution is expressed through Bessel functions:
\[
y(x) = \dfrac{-x^2 J_{-3/4} (x^2 /2)\,\Gamma (1/4) + x^2 J_{-5/4} (x^2 /2)\,\Gamma (3/4) + J_{-1/4} (x^2 /2)\,\Gamma (3/4) -x^2 J_{3/4} (x^2 /2)\,\Gamma (3/4)}{x \, J_{1/4} (x^2 /2)\,\Gamma (1/4) -2\,x\,J_{-1/4} (x^2 /2)\,\Gamma (3/4)} .
\]
Obviously, the solution blows up at the points where the denominator is zero.
FindRoot[(BesselJ[1/4, x^2/2] Gamma[1/4] -
2 BesselJ[-(1/4), x^2/2] Gamma[3/4]) == 0, {x, 1}]
{x -> 0.969811}
So we expect that the solution exists in the interval (0,0.969811).
Upon plotting the fourth Picard iteration and the explicit solution, we see that
y[x_] = (-x^2 BesselJ[-(3/4), x^2/2] Gamma[1/4] +
x^2 BesselJ[-(5/4), x^2/2] Gamma[3/4] +
BesselJ[-(1/4), x^2/2] Gamma[3/4] -
x^2 BesselJ[3/4, x^2/2] Gamma[3/
4])/
(x (BesselJ[1/4, x^2/2] Gamma[1/4] -
2 BesselJ[-(1/4), x^2/2] Gamma[3/4]))
phi4[x_] =
1 + x + x^2 + (4 x^3)/3 + (7 x^4)/6 + (6 x^5)/5 + (107 x^6)/90 +
(
362 x^7)/315 + (2683 x^8)/2520 + (2689 x^9)/2835 + (92179 x^10)/
113400 +
(6673 x^11)/9900 + (201503 x^12)/374220 + (612853 x^13)/
1474200 +
(3774677 x^14)/12162150 + (127144841 x^15)/567567000
Plot[{y[x], phi4[x]}, {x, 0, 1}, PlotStyle -> Thick]
Plotted figure shows a good approximation on the interval about [0,0.7]. Picard's theorem guarantees the existence of solution on the interval
\( [0, 1/\sqrt{2}) \approx (0,0.7) , \) which is far away from the root 0.969811, where the denominator is zero.
■