This section studies some first order nonlinear ordinary differential equations describing the time evolution (or “motion”) of those hamiltonian systems provided with a first integral linking implicitly both variables to a motion constant. An application has been performed on the Lotka--Volterra predator-prey system, turning to a strongly nonlinear differential equation in the phase variables.

Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to the main page for the first course APMA0330
Return to the main page for the second course APMA0340
Return to Part III of the course APMA0340
Introduction to Linear Algebra with Mathematica

Adomian Decomposition Method

We illustrate applications of the Adomian decomposition method (ADM for short) by considering nonlinear system of differential equations with two dependent variables:
\[ \begin{cases} L_1 \left[ y_1 \right] &= N_1 \left[ y_1, y_2 \right] + g_1 (t) , \\ L_2 \left[ y_2 \right] &= N_2 \left[ y_1, y_2 \right] + g_2 (t) , \end{cases} \]
subject to the initial conditions
\[ y_1 (0) = y_{10} , \qquad y_2 (0) = y_{20} . \]
Here L1 and L2 are considered, without loss of generality, first order differential operators, N1 and N2 are nonlinear operators that do not contain derivatives. In addition g1(t) and g2(t) are source terms. Operating with the inverse (integral) operators L1-1 to the first equation and L2-1 to the second equation, we reduce the problem under consideration to a fixed point problem for bounded functions:
\[ \begin{cases} y_1 (t) &= L_1^{-1}_1 N_1 \left[ y_1, y_2 \right] + L^{-1}_1 g_1 (t) , \\ y_2 (t) &= L^{-1}_2 N_2 \left[ y_1, y_2 \right] + L^{-1}_2 g_2 (t) . \end{cases} \]
The unknown functions y1(t) and y2(t) can be decomposed by infinite series of components
\[ \begin{split} y_1 (t) &= \sum_{n\ge 0} u_n (t) , \\ y_2 (t) &= \sum_{n\ge 0} v_n (t) , \end{split} \]
where the initial approximation is determined by solving the initial value problems for the uncoupled differential equations:
\begin{align*} L_1 \left[ u_0 (t) \right] &= g_1 (t) , \qquad u (0) = y_{10} , \\ L_2 \left[ v_0 (t) \right] &= g_2 (t) , \qquad v (0) = y_{20} . \end{align*}
In turn, the nonlinear operators should be represented by using the infinite series of the so-called Adomian polynomials An and Bn
\[ \begin{split} N_1 \left[ u,v \right] &= \sum_{n\ge 0} A_n , \\ N_2 \left[ u,v \right &= \sum_{n\ge 0} B_n , \end{split} \]
To understand how the recurrence is derived, it is convenient to introduce a grouping parameter (which we denote by λ) and represent the solutions and nonlinear terms in the form of generating functions, where convergence play no role:
\begin{align*} y_1 (t) &= \sum_n\ge 0} u_n (t)\,\lambda^n , \\ y_2 (t) &= \sum_n\ge 0} v_n (t)\,\lambda^n , \\ N_1 \left[ u,v \right] &= \sum_{n\ge 0} A_n \lambda^n , \\ N_2 \left[ u,v \right &= \sum_{n\ge 0} B_n \lambda^n . \end{align*}
Of course, we will set λ to 1 in the final answer, but for now we keep the parameter λ alive. Substituting the generating functions into the given system of nonlinear equations, we obtain
\begin{align*} \sum_n\ge 0} u_n (t)\,\lambda^n &= \lambda\,\sum_{n\ge 0} A_n \lambda^n , \\ \sum_n\ge 0} v_n (t)\,\lambda^n &= \lambda\,\sum_{n\ge 0} B_n \lambda^n . \end{align*}
Equating coefficient of like powers of λ, we derive the recurrence:
\begin{align*} u_{n+1} &= A_n \left( u_0 , u_1 , \ldots , u_n ; v_0 , v_1 , \ldots , v_n \right) , \qquad n=0,1,2,\ldots ; \\ v_{n+1} &= B_n \left( u_0 , u_1 , \ldots , u_n ; v_0 , v_1 , \ldots , v_n \right) , \qquad n=0,1,2,\ldots . \end{align*}
We present some codes prepared by J.-S. Duan. The subroutine PSSOL helps to determine multivariable Adomian polynomials. It has six inputs: Init is 2-D table of the initial values Ck,j, Alpha denotes the 3-D table of the coefficients αk,s,j, Be denotes the 1-D table of the coefficients βk of nonlinearities, F denotesthe 1-D table of the nonlinearities fk, G denotesthe 1-D table of the system input gk, and M is a nonnegative integer that determines the degrees of the output Taylor polynomial solutions to be pk + M for the solutions uk(x), 1 &le k ≤ q.
PSSOL[Init_,Alpha_,Be_,F_,G_,M_]:=Module[{p,q,s,j,ps,g,be,n,i,j1,m,r,k,k1,nu,U,CC,tr,alpha,A,T,se,c},p=Table[Length[Init[[k]]],{k,1,Length[Init]}];q=Length[p];ps=Sum[p[[k]],{k,1,q}];For[k=1,k<=q,k++,For[n=0,n<=M,n++,g[k,n]=1/n!*(D[G[[k]],{x,n}])/.x->0;be[k,n]=1/n!*(D[Be[[k]],{x,n}])/.x->0 ] ];Module[{},For[k=1,k<=q,k++,For[s=1,s<=q,s++,For[j=0,j<=p[[s]]-1,j++,For[n=0,n<=M,n++, alpha[k,s,j,n]=1/n!*(D[Alpha[[k]][[s]][[j+1]],{x,n}])/.x->0]]]]];U=Flatten[Table[Table[Subscript[v, i,j],{j,0,M}],{i,1,Sum[p[[r]],{r,1,q}]}]];CC=Flatten[Table[Table[Table[Product[r+j,{j,1,h}]*c[i,r+h],{r,0,M}], {h,0,p[[i]]-1}],{i,1,q}]];tr=Table[U[[j1]]->CC[[j1]],{j1,1,(M+1)*Sum[p[[r]],{r,1,q}]}];Module[{},For[k=1,k<=q,k++,A[k,0]=F[[k]]/.Subscript[v, j_]->Subscript[v, j,0];Table[T[i,j],{i,1,M},{j,1,i}];se=Table[_,{ps}]/.List->Sequence;For[r=1,r<=M,r++, T[r,1]=Table[Subscript[v, i,r]*D[A[k,0],Subscript[v, i,0]],{i,1,ps}];For[k1=2,k1<=r,k1++,T[r,k1]=Union[Flatten[Table[D[Map[#*Subscript[v, i,1]/(Exponent[#,Subscript[v, i,1]]+1)&,T[r-1,k1-1]], Subscript[v, i,0]], {i,1,ps}]]]];For[k1=2,k1<=Floor[r/2],k1++,T[r,k1]=T[r,k1]\[Union] (T[r-k1,k1]/.Flatten[Table[Subscript[v, i,j]->Subscript[v, i,j+1],{i,1,ps},{j,1,r-2*k1+1}]])];A[k,r]=(Sum[Total[T[r,k1] ],{k1,1,r}]); If[EvenQ[r], Do[T[r/2,k1]=., {k1,1,r/2}]]; ];Table[A[k,r],{r,0,M}]]];For[k=1,k<=q,k++, For[r=0,r<=M,r++,A[k,r]= A[k,r]/.tr]];For[k=1,k<=q,k++,For[j=0,j<=p[[k]]-1, j++, c[k,j]=Init[[k]][[j+1]]/j!]];For[n=0,n<=M,n++, For[k=1,k<=q,k++,c[k,p[[k]]+n]=(g[k,n]-Sum[Sum[Sum[Product[m+j,{j,1,p[[s]]-1-nu}]*alpha[k,s,p[[s]]-1-nu,n-m]*c[s,m+p[[s]]-1-nu],{nu,0,p[[s]]-1}],{s,1,q}]+be[k,n-m]*A[k,m],{m,0,n}]) / Product[n+i,{i,1,p[[k]]}]]];For[k=1,k<=q,k++,v[k]=Sum[c[k,j]*x^j,{j,0,p[[k]]+M}]]; j=.;Table[v[k],{k,1,q}] ];

The subroutine NSOL is to find the numerical solution for a nonlnear system of differential equations. It has eight inputs. The first six of them are the same as in the previous routine PSSOL. The last two are the end point X and the step-size h.

NSOL[Init_,Alpha_,Be_,F_,G_,M_,X_,h_]:=Module[{p,q,ps,xn,N1,k,in,al,be,f,g,j1,sol,new},p=Table[Length[Init[[k]]],{k,1,Length[Init]}];q=Length[p]; ps=Sum[p[[k]],{k,1,q}];N1=Floor[X/h]; xn[0]=0;sol={Table[Init[[k]][[1]],{k,1,Length[Init]}]};in=Init;al=Alpha; be=Be;f=F; g=G;For[k=1,k<=N1, k++, xn[k]=N[xn[k-1]+h];new=Table[Table[D[PSSOL[in,al,be,f,g,M][[k]],{x,j1}],{j1,0,p[[k]]-1}], {k,1,q}]/.{x->(xn[k]-xn[k-1])};sol=Append[sol,Table[new[[k]][[1]],{k,1,q}]];in=new; al=al/.{x->h+x}; be=be/.{x->h+x};g=g/.{x->h+x};];Prepend[Transpose[sol],Table[xn[k],{k,0,N1}]]];


Example: Consider the following initial value problem for the linear system of equations:

\begin{align*} \dot{y}_1 &= -0.1\,y_1 - 49.9\,y_2 , \\ \dot{y}_2 &= -50\,y_2 , \\ \dot{y}_3 &= 70\,y_2 -120\, y_3 , \end{align*}
subject to the initial conditions
\[ y_1 (0) =2 , \quad y_2 (0) =1, \quad y_3 (0) =2. \]
The exact solution of the above system is
\[ \begin{split} y_1 (t) &= e^{-50\,t} + e^{-0.1\,t} , \\ y_2 (t) &= e^{-50\,t} , \\ y_3 (t) &= e^{-50\,t} + e^{120\,t} . \end{split} \]


Example: Consider the initial value problem:

\begin{align*} \dot{y}_1 &= -12\, y_1 + 10\, y_2^2 , \\ \dot{y}_2 &= y_1 - y_2 - y_1 y_2 , \end{align*}
subject to the initial conditions
\[ y_1 (0) =0 , \quad y_2 (0) =0. \]
The exact solutions of the system is given by
\[ y_1 (t) = e^{-2t} , \quad y_2 (t) = e^{-t} . \]


Example:    ■


Example:    ■


  1. Chowdhury, M.S.H., Hashim, I., Hosen, M.A., Solving Linear and Non-Linear Stiff System of Ordinary Differential Equations by Multistage Adomian Decomposition Method, Proc. of TheThirdIntl. Conf. On Advances in Applied Science and Environmental Technology,/E,> -ASET 2015
  2. Ganji, D.D., Nourollahi, M., Rostamian, M., A comparison of variational iteration method with Adomian’s Decomposition Method in some highly nonlinear equations. International Journal of Science and Technology, 2007, 2(2):179–188
  3. Rabie, M.E.A. and Elzaki, T.M., A study of some systems of nonlinear partial differential equations by using Adomian and modified decomposition methods, African Journal of Mathematics and Computer Science Research, Vol. 7(6), pp. 61-67, October, 2014; doi: 10.5897/AJMCSR2014.0541 Article Number: 98918D947930


Return to Mathematica page
Return to the main page (APMA0340)
Return to the Part 1 Matrix Algebra
Return to the Part 2 Linear Systems of Ordinary Differential Equations
Return to the Part 3 Non-linear Systems of Ordinary Differential Equations
Return to the Part 4 Numerical Methods
Return to the Part 5 Fourier Series
Return to the Part 6 Partial Differential Equations
Return to the Part 7 Special Functions