Research website of Vyacheslav Gorchilin
2018-05-30
All articles
Table of algorithms for the numerical solutions of some differential equations
To improve the visual representation of the algorithms, we introduce some simplifications. For example, \(\dot Y = \frac{dY(x)}{dx}\) and the values of a function at a point \(x_i\) will be written as \[Y(x_i) = Y_i \quad f(x_i) = f_i \quad g(x_i) = g_i \quad h(x_i) = h_i\] the distance between the points is standard and the same throughout the interval: \(\Delta x = x_i - x_{i-1}\). It is chosen depending on the requirements of the problem being solved and the computational capabilities of the processor. Also depends on the total number of iterations: \(i \in 1, 2, 3, ..., N\). The very meaning of the coordinates is simply: \(x_i = i\,\Delta x\). The symbols \(a, b, \omega, \alpha\) are denoted by constants, and the symbol \(\mathbf{i}\) is the imaginary unit.

Name Equation Numerical solution
Linear Bernoulli's equation \[g(x)\,\dot Y = f(x)\,Y + h(x)\] \[Y_i = {g_i\,Y_{i-1} + h_i\,\Delta x \over g_i - f_i\,\Delta x}, \quad Y_0 = Y(0)\]
The search function is in the exponent of the exponential \[\dot Y = f(x) \exp(a\,Y) + h(x)\] \[Y_i = Y_{i-1} + {f_i \exp(a\,Y_{i-1}) + h_i \over 1 + a\,f_i \exp(a\,Y_{i-1}) \Delta x } \Delta x, \quad Y_0 = Y(0)\]
The desired function is under the log \[\dot Y = f(x) \ln(1+a\,Y) + h(x) \\ a\,Y \ge 0 \] \[Y_i = Y_{i-1} + \left[ f_i \ln(1+a\,Y_{i-1}) - {a\,f_i\,Y_{i-1} \over 1+a\,Y_{i-1}} + h_i \right] \Delta x \\ a\,Y_i \ge 0, \quad Y_0 = Y(0)\]
The desired function is under the sine \[\dot Y = f(x) \sin(\omega\,Y + \alpha) + h(x)\] \[Y_i = Y_{i-1} + {f_i \sin(A) + h_i \over 1 - f_i\,\omega\cos(A) } \Delta x \\ A = \omega\,Y_{i-1} + \alpha, \quad Y_0 = Y(0)\]
Equation with square of derivative \[(\dot Y)^2 = f(x)\,Y + h(x)\] \[Y_i = \begin{cases} Y_{i-1} \pm \Delta x \sqrt{A}, & A \ge 0 \\ Y_{i-1} \pm \mathbf{i} \Delta x \sqrt{|A|}, & A \lt 0 \end{cases} \\ A = f_i\,Y_{i-1} + h_i \\ Y_0 = Y(0)\]
The equation with the square root of the unknown function \[\dot Y = f(x) \sqrt{Y} + h(x)\] \[Y_i = \begin{cases} A + \Delta x\,f_i \sqrt{Y_{i-1}}, & Y_{i-1} \ge 0 \\ A + \mathbf{i}\Delta x\,f_i \sqrt{|Y_{i-1}|}, & Y_{i-1} \lt 0 \end{cases} \\ A = Y_{i-1} + h_i\,\Delta x \\ Y_0 = Y(0)\]
Abel equation of the second kind \[\dot Y\,(Y + a) = f(x)\,Y + g(x) \] \[ Y_i = \begin{cases} A + \sqrt{B} & A \ge 0, B \ge 0 \\ A + \mathbf{i}\sqrt{|B|}, & A \ge 0, B \lt 0 \\ A - \sqrt{B}, & A \lt 0, B \ge 0 \\ A - \mathbf{i}\sqrt{|B|}, & A \lt 0, B \lt 0 \end{cases} \\ A = {Y_{i-1} + f_i\,\Delta x - a \over 2} \\ B = A^2 + a\,Y_{i-1} + g_i\,\Delta x \\ Y_0 = Y(0) \]
Ordinary diff. the equation of the second order \[\ddot Y = f(x)\,Y + a\] \[Y_i = {2Y_{i-1} - Y_{i-2} + a\,\Delta x^2 \over 1 - f_i\,\Delta x^2} \\ Y_0 = Y(0), \quad Y_{-1} = Y(0) - \dot Y(0)\,\Delta x\]
Equation the sine-Gordon. The desired function is under the sine \[\ddot Y = f(x)\,\sin(\omega\,Y + \alpha)\] \[Y_i = Y_{i-1} + {Y_{i-1} - Y_{i-2} + \Delta x^2 f_i \sin(A) \over 1 - \Delta x^2 f_i\,\omega\cos(A) } \\ A = \omega\,Y_{i-1} + \alpha \\ Y_0 = Y(0), \quad Y_{-1} = Y(0) - \dot Y(0)\,\Delta x\]
If in the process of calculating the imaginary component occurs, then it must be saved in a separate variable. Best in problems where such a component may appear immediately possible to separate the real and imaginary parts in separate variables.
 

© Vyacheslav Gorchilin, 2018
* Reprinting of the article are possible with the installation of links to this website and respect the copyright