Derivation Notes on Numerical Solution for Ordinary Differential Equation

Page last edited 2,993 days ago
From Wei-Liang Qian
Jump to navigation Jump to search

Derivation Notes on Numerical Solution for Ordinary Differential Equation

by Hong-Hao Ma

14/02/2016

Presentation of the Problem

We are to solve the equation for <math>\sigma</math>-field, which is an ordinary differential equation:

<math>(r \cdot \sigma(r))^{}=r\cdot U^{'}(\sigma(r))+ r\cdot g \cdot N \cdot(u^{2}-v^{2})</math>

with the following boundary condition <math>\sigma'(r=0)=0</math> and <math>\sigma(r=+\infty)=\sigma_v</math>.

Transformation

We defines <math>w</math> as <math>w=r \sigma</math>, <math>U_{d}(n)=r(n)\cdot U^{'}(w(n)/r(n))</math>, <math>f(n)=r(n)\cdot g \cdot N\cdot(u(n)^{2}-v(n)^{2})</math>. Then the equation in question can be rewritten as follows:

<math>w^{}=r \cdot U^{'}(w/r)+ rgN(u^{2}-v^{2})</math>

Then one obtains the following recursive equation by using the fourth order Numerov method:

<math>w(n+1)-2w(n)+w(n-1)=\frac{(U_{d}(n+1)+10 U_{d}(n)+U_{d}(n-1))\delta^{2}}{12}+\frac{(f(n+1)+10 f(n)+f(n-1))\delta^{2}}{12}</math>

The left hand of the above equation reads

<math>w(n+1)-2w(n)+w(n-1)=((w(n+1)-2w(n)+w(n-1))-(w_{0}(n+1)-2w_{0}(n)+w_{0}(n-1)))+w_{0}(n+1)-2w_{0}(n)+w_{0}(n-1)=(y(n+1)-2y(n)+y(n-1))+w_{0}(n+1)-2w_{0}(n)+w_{0}(n-1)</math>

where we defines <math>y(n)=w(n)-w_0(n)</math>.

Concerning the right hand of the equation, we expand the <math>r U'(w/r)</math> around the initial value <math>w_0</math> (I don't think <math>w_0</math> is the initial value, it is the value from the last iteration). By employing the Taylor expansion, it gives:

<math>r\cdot U'(w/r)=r\cdot U'(w_{0}/r)+U(w_{0}/r)\cdot (w-w_0)</math>

Here if one introduces <math>U_{d0}(n)=r(n)\cdot U^{'}(w_{0}/r)</math>),

<math>\frac{(U_{d0}(n+1)+10 U_{d0}(n)+U_{d0}(n-1))\delta^{2}}{12}+\frac{(f(n+1)+10 f(n)+f(n-1))\delta^{2}}{12}+\frac{(y(n+1)+10 y(n)+y(n-1))U(w_{0}(n))\delta^{2}}{12}</math>

Final Expressions

So, we finally have:

<math>w_{0}(n+1)-2w_{0}(n)+w_{0}(n-1)=\frac{(U_{d0}(n+1)+10 U_{d0}(n)+U_{d0}(n-1))\delta^{2}}{12}-(y(n+1)-2y(n)+y(n-1))+\frac{(f(n+1)+10 f(n)+f(n-1))\delta^{2}}{12}+\frac{(y(n+1)+10 y(n)+y(n-1))U(w_{0}(n))\delta^{2}}{12}</math>

where <math>U\equiv U(w_{0}(n))</math>, and <math>F(n)</math> represents the remaining terms. It gives

<math>(1-\frac{U\delta^{2}}{12}) y(n+1)-(2+\frac{10U\delta^{2}}{12}) y(n)+(1-\frac{U\delta^{2}}{12}) y(n-1)+F(n)=0</math>

However, in the program, it says "The resulting tridiagonal system of equations is solved for <math>(1-\frac{U(n)\cdot \delta^2}{12})\cdot y(n)</math> by positing the existence of coefficients <math>A(n)</math>,<math>B(n)</math> such that <math>(1-\frac{U(n)\cdot \delta^2}{12})\cdot y(n) = A(n)\cdot (1-\frac{U(n)\cdot \delta^2}{12})\cdot y(n+1)+B(n)</math> and deriving a recursive relation for <math>A(n)</math> in terms of <math>A(n-1)</math> and <math>B(n)</math> in terms of <math>A(n)</math> and <math>B(n-1)</math> as follows.

<math>A[I]=\frac{1}{2+\frac{U \delta^{2}}{1-U \delta^2/12 }}-A[I-1] \equiv \frac{1-\frac{U(n)\cdot \delta^2}{12}}{2+\frac{10 U(n)\cdot \delta^2}{12}}-A[I-1]</math>
<math>B[I]= (B[I-1]-F[I])A[I]</math>"

I don't know the reason.

The corresponding transformed initial conditions are

<math>A(1)=0</math>
<math>B(1)=0</math>
<math>y(Nstep)=0</math>

Comments on English

Please stop using "have... as".