@@ -5,6 +5,8 @@ label{nonlin:timediscrete:logistic}
55
66=== Algebraic equations ===
77
8+ idx{iterative methods}
9+
810A linear, scalar, algebraic equation in $x$ has the form
911
1012!bt
@@ -177,7 +179,7 @@ equation for the unknown value $u^{n+1}$ that we can easily solve:
177179!bt
178180\[ u^{n+1} = u^n + \Delta t\,u^n(1 - u^n)\tp\]
179181!et
180- The nonlinearity in the original equation poses in this case no difficulty
182+ In this case, the nonlinearity in the original equation poses no difficulty
181183in the discrete algebraic equation.
182184Any other explicit scheme in time will also give only linear
183185algebraic equations
@@ -200,6 +202,8 @@ known in the next step, which is linear in the unknown $u^{n+1}$ .
200202===== Exact solution of nonlinear algebraic equations =====
201203label{nonlin:timediscrete:logistic:roots}
202204
205+ idx{`sympy`} idx{Taylor series} idx{`limit`}
206+
203207Switching to a Backward Euler scheme for
204208(ref{nonlin:timediscrete:logistic:eq}),
205209
@@ -259,7 +263,7 @@ In the present simple case, however, we can analyze the roots mathematically
259263and provide an answer. The idea is to expand the roots
260264in a series in $\Delta t$ and truncate after the linear term since
261265the Backward Euler scheme will introduce an error proportional to
262- $\Delta t$ anyway. Using `sympy` we find the following Taylor series
266+ $\Delta t$ anyway. Using `sympy`, we find the following Taylor series
263267expansions of the roots:
264268
265269!bc pyshell
@@ -431,7 +435,7 @@ label{nonlin:timediscrete:logistic:BE:Picard:1it}
431435!et
432436which is a linear algebraic equation in the unknown $u^n$, making
433437it easy to solve for $u^n$ without any need for
434- any alternative notation.
438+ an alternative notation.
435439
436440We shall later refer to the strategy of taking one Picard step, or
437441equivalently, linearizing terms with use of the solution at the
@@ -456,6 +460,8 @@ level as start for the Picard iteration.
456460===== Linearization by a geometric mean =====
457461label{nonlin:timediscrete:logistic:geometric:mean}
458462
463+ idx{geometric mean} idx{arithmetic mean}
464+
459465We consider now a Crank-Nicolson discretization of
460466(ref{nonlin:timediscrete:logistic:eq}). This means that the
461467time derivative is approximated by a centered
@@ -480,7 +486,7 @@ mean,
480486\[ u^{n+\half}\approx \half(u^n + u^{n+1}),\]
481487!et
482488such that the scheme involves the unknown function only at the time levels
483- where we actually compute it.
489+ where we actually intend to compute it.
484490The same arithmetic mean applied to the nonlinear term gives
485491
486492!bt
@@ -549,6 +555,7 @@ u^\prime u$, i.e., a difference of size $\Delta t^2$).
549555===== Newton's method =====
550556label{nonlin:timediscrete:logistic:Newton}
551557
558+ idx{quadratic convergence}
552559
553560The Backward Euler scheme (ref{nonlin:timediscrete:logistic:eq:BE})
554561for the logistic equation leads to a nonlinear algebraic equation
@@ -639,7 +646,7 @@ notation used in the literature.
639646===== Relaxation =====
640647label{nonlin:timediscrete:logistic:relaxation}
641648
642- idx{relaxation (nonlinear equations)}
649+ idx{relaxation (nonlinear equations)} idx{relaxation parameter}
643650
644651One iteration in Newton's method or
645652Picard iteration consists of solving a linear problem $\hat F(u)=0$.
@@ -670,6 +677,7 @@ label{nonlin:timediscrete:logistic:relaxation:Newton:formula}
670677===== Implementation and experiments =====
671678label{nonlin:timediscrete:logistic:impl}
672679
680+ idx{`logistic.py`}
673681
674682The program "`logistic.py`": "${src_nonlin}/logistic.py" contains
675683implementations of all the methods described above.
@@ -828,13 +836,15 @@ where $f$ is a nonlinear function of $u$.
828836
829837=== Explicit time discretization ===
830838
831- Explicit ODE methods like the Forward Euler scheme, Runge-Kutta methods,
839+ Explicit ODE methods like the Forward Euler scheme, Runge-Kutta methods and
832840Adams-Bashforth methods all evaluate $f$ at time levels where
833841$u$ is already computed, so nonlinearities in $f$ do not
834842pose any difficulties.
835843
836844=== Backward Euler discretization ===
837845
846+ idx{`ODE_Picard_tricks.py`}
847+
838848Approximating $u^{\prime}$ by a backward difference leads to a Backward Euler
839849scheme, which can be written as
840850
@@ -863,8 +873,8 @@ until a stopping criterion is fulfilled.
863873!bnotice Explicit vs implicit treatment of nonlinear terms
864874Evaluating $f$ for a known $u^{-}$ is referred to as *explicit* treatment of
865875$f$, while if $f(u,t)$ has some structure, say $f(u,t) = u^3$, parts of
866- $f$ can involve the known $u$, as in the manual linearization
867- like $(u^{-})^2u$, and then the treatment of $f$ is ``more implicit''
876+ $f$ can involve the unknown $u$, as in the manual linearization
877+ $(u^{-})^2u$, and then the treatment of $f$ is ``more implicit''
868878and ``less explicit''. This terminology is inspired by time discretization
869879of $u^{\prime}=f(u,t)$, where evaluating $f$ for known $u$ values gives
870880explicit schemes, while treating $f$ or parts of $f$ implicitly,
@@ -894,7 +904,7 @@ implicitly.
894904
895905A trick to treat $f$ implicitly in Picard iteration is to
896906evaluate it as $f(u^{-},t)u/u^{-}$. For a polynomial $f$, $f(u,t)=u^m$,
897- this corresponds to $(u^{-})^{m}u/u^{-1 }=(u^{-})^{m-1}u$. Sometimes this more implicit
907+ this corresponds to $(u^{-})^{m}u/u^{-}=(u^{-})^{m-1}u$. Sometimes this more implicit
898908treatment has no effect, as with $f(u,t)=\exp(-u)$ and $f(u,t)=\ln (1+u)$,
899909but with $f(u,t)=\sin(2(u+1))$, the $f(u^{-},t)u/u^{-}$ trick
900910leads to 7, 9, and 11 iterations during the first three steps, while
@@ -904,7 +914,7 @@ $f(u^{-},t)$ demands 17, 21, and 20 iterations.
904914
905915Newton's method applied to a Backward Euler discretization of
906916$u^{\prime}=f(u,t)$
907- requires the computation of the derivative
917+ requires computation of the derivative
908918
909919!bt
910920\[ F^{\prime}(u) = 1 - \Delta t\frac{\partial f}{\partial u}(u,t_n)\tp\]
@@ -966,6 +976,8 @@ while Newton's method can apply the general formula
966976===== Systems of ODEs =====
967977label{nonlin:ode:generic:sys:pendulum}
968978
979+ idx{system of algebraic equations} idx{coupled system}
980+
969981We may write a system of ODEs
970982
971983!bt
@@ -1094,7 +1106,7 @@ compactly as
10941106where $u$ is a vector of unknowns $u=(u_0,\ldots,u_N)$, and
10951107$F$ is a vector function: $F=(F_0,\ldots,F_N)$.
10961108The system at the end of Section ref{nonlin:ode:generic:sys:pendulum} fits
1097- this notation with $N=2 $, $F_0(u)$ given by the left-hand side of
1109+ this notation with $N=1 $, $F_0(u)$ given by the left-hand side of
10981110(ref{nonlin:ode:generic:sys:pendulum:u0}), while $F_1(u)$ is
10991111the left-hand side of (ref{nonlin:ode:generic:sys:pendulum:u1}).
11001112
@@ -1118,6 +1130,8 @@ of these methods, can be found in Kelley cite{Kelley_1995}.
11181130===== Picard iteration =====
11191131label{nonlin:systems:alg:Picard}
11201132
1133+ idx{linear system}
1134+
11211135We cannot apply Picard iteration to nonlinear equations unless there is
11221136some special structure. For the commonly arising case
11231137$A(u)u=b(u)$ we can linearize the
@@ -1153,6 +1167,8 @@ more details.
11531167===== Newton's method =====
11541168label{nonlin:systems:alg:Newton}
11551169
1170+ idx{Jacobian}
1171+
11561172The natural starting point for Newton's method is the general
11571173nonlinear vector equation $F(u)=0$.
11581174As for a scalar equation, the idea is to approximate $F$
@@ -1316,7 +1332,7 @@ k>k_{\max}\tp
13161332===== Example: A nonlinear ODE model from epidemiology =====
13171333label{nonlin:systems:alg:SI}
13181334
1319- The simplest model spreading of a disease, such as a flu, takes
1335+ A very simple model for the spreading of a disease, such as a flu, takes
13201336the form of a $2\times 2$ ODE system
13211337
13221338!bt
@@ -1345,7 +1361,7 @@ algebraic equations in the unknowns $S^{n+1}$ and $I^{n+1}$:
13451361\frac{\nu}{2}(I^n + I^{n+1})\tp
13461362\end{align}
13471363!et
1348- Introducing $S$ for $S^{n+1}$, $S^{(1)}$ for $S^n$, $I$ for $I^{n+1}$,
1364+ Introducing $S$ for $S^{n+1}$, $S^{(1)}$ for $S^n$, $I$ for $I^{n+1}$ and
13491365$I^{(1)}$ for $I^n$, we can rewrite the system as
13501366
13511367!bt
0 commit comments