**2. Derivation of approximate analytical solutions of differential equations by the moving nodes method**

This chapter introduces the concept of a roaming node and provides approximate solutions to simple problems using a moving node. We also studied the derivation algorithm for nonstationary and two-dimensional problems.

Note that the concept of a movable node in this context is considered for the first time.

#### **2.1 The concept of a moving node**

The solution of differential equations (DE) (ordinary or partial derivatives) by the method of finite differences is based on a finite-difference approximation of derivatives. When applying the finite difference method to the solution of DE, there is a transition from a continuous region to a finite difference one. A grid of "nodal points" is introduced into the solution area. Representing the derivatives in a finite difference *Moving Node Method for Differential Equations DOI: http://dx.doi.org/10.5772/intechopen.107340*

**Figure 2.**

**Figure 1.**

*Three moving node.*

form, they bring it to the form of a difference equation. The difference equation is written for all grid nodes and results in a system of algebraic equations [4, 36].

Most of the DEs found in the equations of mathematical physics contain only partial derivatives of the first and second orders, while for the approximation of the derivatives they try to use no more than three nodes of the difference grid (in the case of ordinary DEs) (**Figure 1**). Let the node *W* and *E* be considered fixed, and the node *x* changes into segments (*W, E*). Then the approximation of the derivatives (first or second order) also changes based on the location of the node. The node *x* is said to be movable.

You can increase the number of moved nodes. Let us select additional moving nodes as follows: *x*<sup>1</sup> = (W + *x*)/2, *x*<sup>2</sup> = (W + *x*)/2. When node *x* changes its position, *x*<sup>1</sup> and *x*<sup>2</sup> automatically change their positions (**Figure 2**). In this way, you can increase the number of moved nodes. The increase in the number of moved nodes is related to the accuracy of the difference equations.

The displacement of nodal points is not only related to finite-difference equations, this approach can be successfully applied when discretizing differential equations using the control volume method.

#### **2.2 Obtaining an approximate analytical solution with one moving node**

Let, it is necessary to find *Ф х*ð Þ a solution to the DE in the region *W* ≤*x*≤*E* with the corresponding boundary conditions. Let us take an arbitrary point *x*∈ð Þ *W*, *E :* We have three nodes: *W*, *E* boundary nodes and an internal node *x*. The position of a point inside the region is determined by the node being moved *x*. The difference equation is usually written for an arbitrary node, *x*. When approximating differential operators, the first derivatives on the moving node are approximated by different relations:

$$\frac{d\Phi(\mathbf{x})}{d\mathbf{x}} \approx \frac{U(\mathbf{x}) - U(\mathbf{W})}{\mathbf{x} - \mathbf{W}},\tag{1}$$

$$\frac{d\Phi(\mathbf{x})}{d\mathbf{x}} \approx \frac{U(E) - U(\mathbf{x})}{E - \mathbf{x}},\tag{2}$$

$$\frac{d\Phi(\mathbf{x})}{d\mathbf{x}} \approx \frac{U(E) - U(W)}{E - W}.\tag{3}$$

The approximation of the derivative by (1) and (2) is called the approximation of this derivative using a one-sided difference, and (3) is the approximation using the central difference.

The second derivative on the moving node is approximated as follows [4] (similarly to the approximation of the second derivative in a non-uniform grid):

$$\frac{d^2\Phi(\mathbf{x})}{d\mathbf{x}^2} \approx \frac{2}{E-W} \left( \frac{U(E)-U(\mathbf{x})}{E-\mathbf{x}} - \frac{U(\mathbf{x})-U(W)}{\mathbf{x}-W} \right) \tag{4}$$

Let us consider some model problems of applying the moving nodes method (MNM) to obtain an analytical solution.

#### *2.2.1 Flow in a flat pipe*

The flow of a viscous fluid in a flat pipe in a one-dimensional formulation is described by the equation

$$\frac{d^2U}{dy^2} = -\frac{\Delta p}{\mu} \tag{5}$$

where *U* is the fluid velocity, is the vertical coordinate perpendicular to the flow, Δ*p=l* is the pressure drop (const), *μ* is the viscosity. Let *y* ¼ 0 and *y* ¼ *h* motionless walls.

We average (5) over the liquid volume: ½ � *y=*2,ð Þ *h* � *y =*2 , here "*y*" is a moving node (**Figure 3**). Then we have

$$\int\_{y/2}^{(h+\eta)/2} \frac{d^2U}{dy^2} dy = \int\_{y/2}^{(h+\eta)/2} \left(-\frac{\Delta p}{\mu \, l}\right) d\eta$$

From here

$$
\left.\frac{dU}{d\boldsymbol{y}}\right|\_{(h+\boldsymbol{y})/2} - \left.\frac{dU}{d\boldsymbol{y}}\right|\_{\boldsymbol{y}/2} = \left(-\frac{\Delta p}{\mu \, l}\right)\frac{h}{2} \tag{6}
$$

We replace the derivatives in (6) with the difference relation:

$$\left. \frac{dU}{dy} \right|\_{(h+\gamma)/2} \approx \frac{u(h) - u(y)}{h - \gamma}, \left. \frac{dU}{dy} \right|\_{\gamma/2} \approx \frac{u(y) - u(0)}{\gamma}.\tag{7}$$

$$(h + \gamma)/2$$

$$\gamma$$

$$\gamma$$

$$\gamma/2$$

**Figure 3** *Control volume.*

Here *u y*ð Þ is an approximate value *U y*ð Þ. Thus, approximation (5) with respect to the moving node has the form:

$$\frac{u(h) - u(y)}{h - y} - \frac{u(y) - u(0)}{y} = \left(-\frac{\Delta p}{\mu l}\right)\frac{h}{2}.\tag{8}$$

Hence, taking into account the no-slip condition (*u*(*h*) = *u*(0) = 0)

$$
\mu(\boldsymbol{\nu}) = -\frac{\Delta p}{2\mu}\boldsymbol{\nu}(\boldsymbol{h} - \boldsymbol{\nu}).
$$

Here *u y*ð Þ is the average solution. For this problem, the averaged solution coincides with the exact solution.

This means that the approximation (7) for this problem is exact. The reason for the coincidence of the solution obtained with the help of the MNM with one node and the exact solution is explained by the following fact.

Lagrange's mean value theorem states that if a function *f x*ð Þ is continuous on an interval ½ � *a*, *b* and differentiable on an interval ð Þ *a*, *b* , then in this interval there is at least one *x* ¼ *ξ* point such that

$$\frac{f(b) - f(a)}{b - a} = f'(\xi). \tag{9}$$

It is easy to check that if *f x*ð Þ represents a parabola, then in (9) *ζ* ¼ ð Þ *a* þ *b =*2*:* The exact solution (5) is a parabola. Integrating (5) over the control volume ½ � *x=*2, ð Þ *h* þ *x =*2 , we obtain

$$\int\_{y/2}^{(h+\eta)/2} \frac{d^2u}{d\eta^2}d\eta = \frac{du}{d\eta}\Big|\_{(h+\eta)/2} - \frac{du}{d\eta}\Big|\_{\mathfrak{y}/2} = \int\_{\mathfrak{y}/2}^{(h+\eta)/2} \frac{1}{\mu}\frac{\Delta p}{l}d\eta.$$

Since *u y*ð Þ there is a parabola, therefore

$$
\left. \frac{du}{dy} \right|\_{(h+\eta)/2} = \frac{u(h) - u(\chi)}{h - \chi}, \\
\left. \frac{du}{dy} \right|\_{\chi/2} = \frac{u(\chi) - u(0)}{\chi - 0},
$$

and (8) is the exact difference analog of (5).

### *2.2.2 Heat distribution in the plate*

Heat propagation in the plate is described by the equation

$$\frac{d^2T}{d\mathbf{x}^2} + \frac{q}{k} = \mathbf{0}, \quad \frac{dT(\mathbf{0})}{d\mathbf{x}} = \mathbf{0}, \quad T(\mathbf{1}) = \mathbf{1} \tag{10}$$

where *k* is the thermal conductivity and *q* is the heat release per unit volume (*k* and *q* = const). It is assumed that the source does not depend on temperature. Replacing (10) with a difference equation with a moving node, we have

$$\frac{2}{1-0} \left[ \frac{T(\mathbf{1}) - T(\mathbf{x})}{1 - \mathbf{x}} - \frac{T(\mathbf{x}) - T(\mathbf{0})}{\mathbf{x} - \mathbf{0}} \right] + \frac{q}{k} = \mathbf{0} \tag{11}$$

Solving Eq. (11), we obtain

$$T(\mathbf{x}) = \mathbf{1} + \frac{q}{2k} \left(\mathbf{1} - \mathbf{x}^2\right) \tag{12}$$

Solution (12) coincides with the exact solution. Note that the exact solution is obtained not only for the Dirichlet problem but as for the problem of flow in a flat pipe. Here the boundary conditions are of mixed type.

#### *2.2.3 Magnetohydrodynamic Couette flow*

Consider the Couette flow, when a conducting fluid flows in a uniform magnetic field between two plates, one of which is stationary, and the other moves in its own plane at a constant speed. Based on the Navier-Stokes equation, taking into account the magnetic field and taking into account the one-dimensionality of the flow, it can be written in a dimensionless form as follows:

$$\frac{d^2u}{dy^2} - \mathcal{M}^2 u = P \tag{13}$$

Boundary conditions

$$u(\mathbf{0}) = \mathbf{0}, \ u(\mathbf{1}) = \mathbf{1} \tag{14}$$

Here, *u* is the dimensionless flow velocity and *y* is the dimensionless coordinate. Dimensionless quantities *M* – Hartmann number, *P* – pressure coefficient (М and Р = const).

Replacing the second-order derivative in (13) with a difference relation similar to (7), and considering the boundary condition (14), we can obtain an approximate solution

$$u\_1(\boldsymbol{y}) = \frac{2\boldsymbol{y} - \mathcal{P}\boldsymbol{y}(1-\boldsymbol{y})}{2 + M^2\boldsymbol{y}(1-\boldsymbol{y})} \tag{15}$$

This solution comes close to the exact solution (**Figure 4**).

#### *2.2.4 The method of moving nodes for the convection-diffusion equation*

Consider the transport equation

$$\frac{d\Phi}{d\mathbf{x}} = \frac{1}{Pe} \frac{d^2\Phi}{d\mathbf{x}^2} + \mathcal{S}(\mathbf{x}),\tag{16}$$

Here, *Ф* the unknown function, *S x*ð Þ the source, *Pe* is the Peclet number. The equation is considered under appropriate boundary conditions.

The convective term of Eq. (16) is approximated by (1), and the diffusion term by (4). Consider (16) into segments with boundary conditions *Ф*ð Þ¼ 0 0, *Ф*ð Þ¼ 1 1 and *S x*ð Þ¼ 0. Then, using the upwind scheme, we replace Eq. (16) with a difference equation that looks like this:

*Moving Node Method for Differential Equations DOI: http://dx.doi.org/10.5772/intechopen.107340*

**Figure 4.**

*Comparison of exact and approximate solutions (M = 2, P = 4). The solid line is the exact solution, the dotted line is according to (5).*

$$\frac{U(\mathbf{x})}{\mathbf{x}} = \frac{2}{Pe} \left( \frac{\mathbf{1} - U(\mathbf{x})}{\mathbf{1} - \mathbf{x}} - \frac{U(\mathbf{x})}{\mathbf{x}} \right) \tag{17}$$

From here, we can easily determine *U x*ð Þ:

$$U(\mathbf{x}) = \frac{2\mathbf{x}}{2 + Pe(\mathbf{1} - \mathbf{x})} \tag{18}$$

**Figure 5** shows a comparison of the exact and approximate solutions. The solid line corresponds to the exact solution, and the dotted line corresponds to the solution (8). It can be seen from the graph that numerical diffusion takes place.

For *Ф*ð Þ¼ 0 0, *Ф*ð Þ¼ 1 1 and *S x*ð Þ¼ 5 cos 4*x Pe* ¼ 5, the results of the exact and approximate solutions are shown in **Figure 6**. It can be seen from the graph that there are large errors. Here the Peclet number plays an important role. Indeed, for *Ф*ð Þ¼ 0 0, *Ф*ð Þ¼ 1 1 and *S x*ð Þ¼ 5 cos 4*x Pe* ¼ 0, 1, we obtain solutions shown in **Figure 7**, which shows that the approximate and exact solutions are close.

#### *2.2.5 Equation with variable coefficient*

Consider the equation

$$
\epsilon u''(\mathbf{x}) + 2\kappa u'(\mathbf{x}) = \mathbf{0},\tag{19}
$$

into segments (�1,1) with boundary *u*ð Þ¼� �1 1, *u*ð Þ¼ 1 2 conditions *u*ð Þ¼ �1 �1, *u*ð Þ¼ 1 2*:* The exact solution is determined through the error functions:

$$u(\mathbf{x}) = \frac{\text{erf}(\mathbf{1}/\sqrt{\varepsilon}) + \text{3erf}(\mathbf{x}/\sqrt{\varepsilon})}{2\text{erf}(\mathbf{1}/\sqrt{\varepsilon})}.$$

**Figure 5.** *Comparison of exact and approximate solutions. Pe = 10.*

#### **Figure 6.**

*Comparison of exact and approximate solutions.* Pe *= 5.*

The difference scheme with a moving node for (19) has the form (upwind scheme):

$$\,\_2e\left[\frac{2-U(\mathbf{x})}{\mathbf{1}-\mathbf{x}}-\frac{U(\mathbf{x})+\mathbf{1}}{\mathbf{x}+\mathbf{1}}\right]+\frac{\mathbf{1}}{2}(2\mathbf{x}-|2\mathbf{x}|)\frac{U(\mathbf{x})+\mathbf{1}}{\mathbf{1}+\mathbf{x}}+\frac{\mathbf{1}}{2}(2\mathbf{x}+|2\mathbf{x}|)\frac{2-U(\mathbf{x})}{\mathbf{1}+\mathbf{x}}=\mathbf{0}.$$

*Moving Node Method for Differential Equations DOI: http://dx.doi.org/10.5772/intechopen.107340*

**Figure 7.** *Comparison of exact and approximate solutions.* Pe *= 0.1.*

Solving this equation with respect to *U x*ð Þ, we obtain an approximate analytical solution. **Figure 8** compares the solutions of the exact and approximate analytical solution; the solid line corresponds to the exact solution, and the dotted line corresponds to the approximate one.

Remark 1. In the given examples, the convective term is approximated by the upwind scheme. Other approximations can be used to improve.

Remark 2. In the above examples, the approximation of the term with the source is carried out constant in the considered moving segment. For improvement, other approximations can be used to obtain an improved solution.

### **2.3 Obtaining an analytical solution with several moving nodes**

#### *2.3.1 Moving nodes method for a one-dimensional convective-diffusion problem*

Due to the importance of convective-diffusion problems, we will apply multipoint MNM to such problems [14]:

$$\frac{d\Phi}{d\mathbf{x}} = \frac{1}{Pe} \frac{d^2\Phi}{d\mathbf{x}^2} + \mathcal{S}(\mathbf{x}).\tag{20}$$

Let us take an arbitrary one node inside the segment *x*∈ð Þ *W*, *E* .

Let us consider a difference analog of Eq. (20), in which the convective term is approximated by a one-sided difference relation.

Then the upwind scheme has the form:

$$\operatorname{Pe}\frac{U^1 - U\_W^1}{\varkappa - W} = \frac{2}{(E - W)} \left( \frac{U\_E^1 - U^1}{E - \varkappa} - \frac{U^1 - U\_W^1}{\varkappa - W} \right) + \operatorname{Pe} \cdot \operatorname{S}(\infty). \tag{21}$$

This schema can be rewritten like this:

$$a\_P^1 U^1 = a\_E^1 U\_E^1 + a\_W^1 U\_W^1 + F^1(\infty),\tag{22}$$

Here

$$\begin{aligned} a\_E^1 &= \frac{2}{(E-W)(E-\chi)}, a\_W^1 = \frac{Pe}{(\chi-W)} + \frac{2}{(E-W)(\chi-W)}, a\_P^1 = a\_E^1 + a\_W^1, \\ F^1(\mathbf{x}) &= Pe \cdot S(\mathbf{x}) \end{aligned}$$

Hence, we have

$$U^1 = \frac{2(\varkappa - W)U\_E^1 + (E - \varkappa)(2 + Pe(E - W))U\_W^1}{(E - W)(2 + Pe(E - \varkappa))} + \frac{(\varkappa - W)(E - \varkappa)}{2 + Pe(E - \varkappa)}Pe \cdot \mathsf{S}(\varkappa) \tag{23}$$

When *x*∈ð Þ *W*, *E* changes its position (let us make it moveable within the interval ð Þ *W*, *E* ), based on (23) we obtain the values of the unknown function in each position. In other words, *U*<sup>1</sup> obtained with the help of (23), will give us an approximate solution to the problem. Note that in this case, *U*<sup>1</sup> *<sup>W</sup>* <sup>¼</sup> *<sup>Ф</sup>*ð Þ *<sup>W</sup>* , *<sup>U</sup>*<sup>1</sup> *<sup>E</sup>* ¼ *Ф*ð Þ *E :* The superscript corresponds to the number of nodes being moved.

Adding additional moving nodes *<sup>x</sup>*<sup>1</sup> <sup>¼</sup> *<sup>x</sup>*þ*<sup>W</sup>* <sup>2</sup> , *<sup>x</sup>*<sup>2</sup> <sup>¼</sup> *<sup>x</sup>*þ*<sup>E</sup>* <sup>2</sup> *:*.

Now we have three moving nodes *x*, *x*1, *x*2*:* Note that if *x* changes its position, then *x*<sup>1</sup> and *x*<sup>2</sup> also changes its position.

A scheme of type (21) for a segment ½ � *W*, *x* has the form:

$$\operatorname{Pe}\frac{U\_1^3 - U\_W^3}{(\varkappa - W)/2} = \frac{2}{(\varkappa - W)} \left( \frac{U^3 - U\_1^3}{\varkappa - \varkappa\_1} - \frac{U\_1^3 - U\_W^3}{\varkappa\_1 - W} \right) + \operatorname{Pe} \cdot \operatorname{S}(\infty\_1). \tag{24}$$

Here *U*<sup>3</sup> <sup>1</sup> <sup>¼</sup> *<sup>U</sup>*<sup>3</sup> ð Þ *x*<sup>1</sup> .

A scheme of type (21) for a segment ½ � *x*, *E* has the form

$$\operatorname{Pe}\frac{U\_2^3 - U^3}{(E - \varkappa)/2} = \frac{2}{(E - \varkappa)} \left( \frac{U\_E^3 - U\_2^3}{E - \varkappa\_2} - \frac{U\_2^3 - U^3}{\varkappa\_2 - \varkappa} \right) + \operatorname{Pe} \cdot \operatorname{S}(\infty\_2). \tag{25}$$

Scheme upstream for a segment ½ � *x*1, *x*<sup>2</sup> :

$$Pe\frac{U^3 - U\_1^3}{\varkappa - \varkappa\_1} = \frac{2}{(\varkappa\_2 - \varkappa\_1)} \left(\frac{U\_2^3 - U^3}{\varkappa\_2 - \varkappa} - \frac{U^3 - U\_1^3}{\varkappa - \varkappa\_1}\right) + Pe \cdot S(\varkappa). \tag{26}$$

Here *U*<sup>3</sup> <sup>2</sup> <sup>¼</sup> *<sup>U</sup>*<sup>3</sup> ð Þ *x*<sup>2</sup> .

In (26) we exclude *U*<sup>3</sup> 1, *U*<sup>3</sup> <sup>2</sup> using (24) and (25). Then we get the following diagram:

$$\operatorname{Re}\frac{\mathbf{U}^3 - \mathbf{U}\_W^3}{\frac{(\mathbf{x} - \mathbf{W})}{2} \cdot (\mathbf{1} + \boldsymbol{\tau}\_1)} = \frac{\mathbf{4}}{(E - W)} \left( \frac{\mathbf{U}\_E^3 - \mathbf{U}^3}{\frac{E - \mathbf{x}}{2} \cdot (\mathbf{1} + \boldsymbol{\gamma}\_1)} - \frac{\mathbf{U}^3 - \mathbf{U}\_W^3}{\frac{\mathbf{x} - W}{2} \cdot (\mathbf{1} + \boldsymbol{\tau}\_1)} \right) + F^3(\mathbf{x}) \tag{27}$$

Here we have introduced the notation.

$$\begin{aligned} \pi\_1 &= 2/(2+\sigma), \chi\_1 = (2+\theta)/2, \ \sigma = \text{Pe}\left(\infty - W\right), \theta = \text{Pe}\left(E - \infty\right), \\\ F^3(\mathbf{x}) &= \text{Pe} \cdot \text{S}(\mathbf{x}) + \frac{4 + \text{Pe} \cdot (E - W)}{E - W} \cdot \frac{1 - \tau\_1}{1 + \tau\_1} \cdot \text{S}(\mathbf{x}\_1) + \frac{4}{E - W} \cdot \frac{\gamma\_1 - 1}{\gamma\_1 + 1} \cdot \text{S}(\mathbf{x}\_2). \end{aligned}$$

And *U*<sup>3</sup> *<sup>W</sup>* <sup>¼</sup> *<sup>Ф</sup>*ð Þ *<sup>W</sup>* , *<sup>U</sup>*<sup>3</sup> *<sup>E</sup>* ¼ *Ф*ð Þ *E :* (25) can be rewritten as follows:

$$a\_P^3 U^3 = a\_E^3 U\_E^3 + a\_W^3 U\_W^3 + F^3(\infty),\tag{28}$$

where

 $a\_E^3 = \frac{8}{(E-W)(E-x)(1+\gamma\_1)}$ ,  $a\_W^3 = \frac{2p\_\varepsilon}{(x-W)(1+\tau\_1)} + \frac{8}{(E-W)(x-W)(1+\tau\_1)}$ ,  $a\_P^3 = a\_W^3 + a\_E^3$ . \*\*Increase the number of moved nodes: 
$$\varkappa\_1^- = \frac{\varkappa\_1 + W}{2} = \frac{\varkappa + 3W}{4}, \varkappa\_1^+ = \frac{\varkappa\_1 + x}{2} = \frac{3x + W}{4},$$

$$\begin{aligned} \mathfrak{x}\_1^- &= \frac{\mathfrak{x}\_1 + W}{2} = \frac{\mathfrak{x} + 3W}{4}, \mathfrak{x}\_1^+ = \frac{\mathfrak{x}\_1 + \mathfrak{x}}{2} = \frac{3\mathfrak{x} + W}{4}, \\\mathfrak{x}\_2^- &= \frac{\mathfrak{x}\_2 + \mathfrak{x}}{2} = \frac{3\mathfrak{x} + E}{4}, \mathfrak{x}\_2^+ = \frac{\mathfrak{x}\_2 + E}{2} = \frac{\mathfrak{x} + 3E}{4}. \end{aligned}$$

In the difference scheme (28), the unknown function appears at three nodes: W, x, E. The function S is calculated at points *x*1, *x*, *x*2*:* Let us write a scheme of type (28) for each of the segments ½ � *W*, *x* and ½ � *x*1, *x*<sup>2</sup> *:*

The scheme of type (28) for a segment has the form:

$$a\_{\mathbf{x}\_1}^3 U\_{\mathbf{x}\_1}^3 = a\_{\mathbf{x}}^3 U\_{\mathbf{x}}^3 + a\_{W^-}^3 U\_{W}^3 + F\_-^3(\mathbf{x}\_1),\tag{29}$$

where

$$\begin{aligned} a\_{\mathbf{x}}^{3} &= \frac{8}{(\mathbf{x} - \mathbf{W})(\mathbf{x} - \mathbf{x}\_{1})(\mathbf{1} + \mathbf{y}\_{1}^{-})}, a\_{W-}^{3} = \frac{2Pe}{(\mathbf{x}\_{1} - \mathbf{W})(\mathbf{1} + \mathbf{r}\_{1}^{-})} + \frac{8}{(\mathbf{x} - \mathbf{W})(\mathbf{x}\_{1} - \mathbf{W})(\mathbf{1} + \mathbf{r}\_{1}^{-})}, \\ a\_{\mathbf{x}\_{1}}^{3} &= a\_{\mathbf{x}}^{3} + a\_{W-}^{3}, \\ F\_{-}^{3}(\mathbf{x}\_{1}) &= Pe \cdot \mathbf{S}(\mathbf{x}\_{1}) + \frac{4 + Pe \cdot (\mathbf{x} - \mathbf{W})}{\mathbf{x} - \mathbf{W}} \cdot \frac{1 - \mathbf{r}\_{1}^{-}}{1 + \mathbf{r}\_{1}^{-}} \cdot \mathbf{S}\left(\mathbf{x}\_{1}^{-}\right) + \frac{4}{\mathbf{x} - \mathbf{W}} \cdot \frac{\mathbf{r}\_{1}^{-} - 1}{\mathbf{r}\_{1}^{-} + 1} \cdot \mathbf{S}\left(\mathbf{x}\_{1}^{+}\right), \end{aligned}$$

$$\pi\_1^- = \mathcal{D}/(2+\sigma^-), \chi\_1^- = (2+\theta^-)/2, \ \sigma^- = \text{Pe}\,(\mathbb{x}\_1 - \mathbb{W}), \theta^- = \text{Pe}\,(\mathbb{x} - \mathbb{x}\_1).$$

Similarly, we write a scheme of type (29) for the segments ½ � *x*,*W* and ½ � *x*1, *x*<sup>2</sup> *:* Excluding the obtained three systems of equations *U*<sup>3</sup> *<sup>x</sup>*<sup>1</sup> and *<sup>U</sup>*<sup>3</sup> *<sup>x</sup>*<sup>2</sup> obtain a scheme with seven movable nodes:

where

$$\begin{split} &a\_{\mathrm{E}}^{\mathsf{T}} = \frac{2^{\mathsf{S}}(1-\mathsf{\tau}\_{2})}{(\mathsf{E}-\mathsf{W})(\mathsf{E}-\mathsf{x})\left(1-\mathsf{\tau}\_{2}^{\mathsf{T}}\right)}, a\_{\mathrm{W}}^{\mathsf{T}} = \frac{4\mathsf{Pe}(1-\mathsf{\tau}\_{2})}{(\mathsf{x}-\mathsf{W})\left(1-\mathsf{\tau}\_{2}^{\mathsf{T}}\right)} + \frac{2^{\mathsf{S}}(1-\mathsf{\tau}\_{2})}{(\mathsf{E}-\mathsf{W})(\mathsf{x}-\mathsf{W})\left(1-\mathsf{\tau}\_{2}^{\mathsf{T}}\right)}, a\_{\mathrm{P}}^{\mathsf{T}} = a\_{\mathrm{W}}^{\mathsf{T}} + a\_{\mathrm{E}}^{\mathsf{T}}.\\ &\pi\_{2} = 4/\left(4+\sigma\right), \gamma\_{2} = (4+\theta)/4 \end{split}$$

$$\begin{split} F^{\mathsf{T}}(\mathsf{x}) &= Pe \cdot S(\mathsf{x}) + \frac{8+Pe \cdot (\mathsf{x}-\mathsf{W})}{\mathsf{x}-\mathsf{W}} \cdot \frac{(1-\mathsf{\tau}\_{2})^{2}}{\mathbf{1}-\mathsf{\tau}\_{2}^{\mathsf{T}}} \cdot \sum\_{j=1}^{3} \sum\_{i=1}^{j} \tau\_{2}^{i-1} S\left(W + j\frac{\mathsf{x}-\mathsf{W}}{4}\right) - 1.$$

$$\frac{8}{E-\mathsf{W}} \cdot \frac{(1-\mathsf{\tau}\_{2})^{2}}{\mathbf{1}-\mathsf{\tau}\_{2}^{\mathsf{T}}} \cdot \sum\_{j=1}^{3} \sum\_{i=1}^{j} \tau\_{2}^{i-1} S\left(\mathsf{x} + (4-j)\frac{E-\mathsf{x}}{4}\right). \end{split}$$

Continuing in this way, we can get a scheme with 2*<sup>k</sup>* � 1 moving nodes

*a* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> *<sup>P</sup> <sup>U</sup>* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> <sup>¼</sup> *<sup>a</sup>* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> *<sup>E</sup> <sup>U</sup>* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> *<sup>E</sup>* þ *a* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> *<sup>W</sup> <sup>U</sup>* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> *<sup>W</sup>* <sup>þ</sup> *<sup>F</sup>* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> ð Þ *<sup>x</sup>* , (30) where *a* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> *<sup>E</sup>* <sup>¼</sup> <sup>2</sup>2*k*þ<sup>1</sup> <sup>1</sup>�*γ<sup>k</sup>* ð Þ ð Þ *<sup>E</sup>*�*<sup>W</sup>* ð Þ *<sup>E</sup>*�*<sup>x</sup>* <sup>1</sup>�*γ*2*<sup>k</sup> k* � � , *a* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> *<sup>W</sup>* <sup>¼</sup> <sup>2</sup>2*k*þ1*Pe*ð Þ <sup>1</sup>�*τ<sup>k</sup>* ð Þ *<sup>x</sup>*�*<sup>W</sup>* <sup>1</sup>�*τ*2*<sup>k</sup> k* � � <sup>þ</sup> <sup>2</sup>2*k*þ1ð Þ <sup>1</sup>�*τ<sup>k</sup>* ð Þ *<sup>E</sup>*�*<sup>W</sup>* ð Þ *<sup>x</sup>*�*<sup>W</sup>* <sup>1</sup>�*τ*2*<sup>k</sup> k* � � , *a* <sup>2</sup>*<sup>л</sup>* ð Þ �<sup>1</sup> *<sup>P</sup>* ¼ *a* <sup>2</sup>*<sup>л</sup>* ð Þ �<sup>1</sup> *<sup>W</sup>* þ *a* <sup>2</sup>*<sup>л</sup>* ð Þ �<sup>1</sup> *<sup>E</sup> :τ<sup>k</sup>* <sup>¼</sup> <sup>2</sup>*<sup>k</sup><sup>=</sup>* <sup>2</sup>*<sup>k</sup>* <sup>þ</sup> *<sup>σ</sup>* � �, *<sup>γ</sup><sup>k</sup>* <sup>¼</sup> <sup>2</sup>*<sup>k</sup>* <sup>þ</sup> *<sup>θ</sup>* � �*=*2*<sup>k</sup>*, *<sup>F</sup>* <sup>2</sup>*<sup>k</sup>* ð Þ �<sup>1</sup> ð Þ¼ *<sup>x</sup> Pe* � *S x*ð Þþ <sup>2</sup>*<sup>k</sup>*þ<sup>1</sup> <sup>þ</sup> *Pe* � ð Þ *<sup>E</sup>* � *<sup>W</sup> E* � *W* ð Þ 1 � *τ<sup>k</sup>* 2 <sup>1</sup> � *<sup>τ</sup>*<sup>2</sup>*<sup>k</sup> k* 2 X*k*�1 *j*¼1 X *j i*¼1 *τ<sup>i</sup>*�<sup>1</sup> *<sup>k</sup>* � *S x* þ *j x* � *W* 2*k* � �� 2*<sup>k</sup>*þ<sup>1</sup> *E* � *W* <sup>1</sup> � *<sup>γ</sup><sup>k</sup>* ð Þ<sup>2</sup> <sup>1</sup> � *<sup>γ</sup>*<sup>2</sup>*<sup>k</sup>* 2 X*k*�1 X *j γ<sup>i</sup>*�<sup>1</sup> *<sup>k</sup>* � *S x* <sup>þ</sup> <sup>2</sup>*<sup>k</sup>* � *<sup>j</sup>* � � *<sup>E</sup>* � *<sup>x</sup>* 2*k* � �*:*

**Figures 9** and **10** show graphs of approximate solutions to the problem (18), obtained by (30) for *W* ¼ 0, *E* ¼ 1, with different moving nodes.

*i*¼1

*k*

*j*¼1

#### **Figure 9.**

*Pe = 20, Ф<sup>W</sup>* ¼ 0, *Ф<sup>E</sup>* ¼ 1, *S x*ð Þ¼ 0*. Approximate solutions of the problem. Dotted—at k = 1, dotted—k = 2, dotted-dotted—k = 3, long dotted—k = 4, rarely dotted—k = 5. The solid line is the exact solution.*

*Moving Node Method for Differential Equations DOI: http://dx.doi.org/10.5772/intechopen.107340*

#### **Figure 10.**

*Pe = 20, Ф<sup>W</sup>* ¼ 0, *Ф<sup>E</sup>* ¼ 0, *S x*ð Þ¼ *x*, *. Approximate solutions of the problem. Dotted—at k = 1, dotted—k = 2, dotted-dotted—k = 3, long dotted—k = 4, rarely dotted—k = 5. The solid line is the exact solution.*

It can be seen from the graphs that the approximate solutions give good results. Remark. When obtaining many point-moving nodes, we proceeded from the upwind scheme. It was possible to proceed from the other three-point schemes.

#### *2.3.2 Analytical control volume method for a one-dimensional convective-diffusion problem*

It is known that differential equations are obtained on the basis of the integral conservation law. Therefore, discretization of the equations can be carried out using the approximation of integral conservation laws. This method is called the Finite Volume Method. Another name for the method is integrointerpolation.

Consider a one-dimensional convective-diffusion equation on a finite interval with boundary conditions in the form:

$$\frac{d}{d\mathfrak{x}}(\rho u \Phi) = \frac{d}{d\mathfrak{x}}\left(\Gamma \frac{d\Phi}{d\mathfrak{x}}\right) + \mathcal{S}(\mathfrak{x}) \tag{31}$$

$$
\Phi(W) = \Phi\_W, \quad \Phi(E) = \Phi\_E \tag{32}
$$

where *u* is the flow velocity in the *x* direction, *ρ* is the flow density, *Г* is the diffusion coefficient, *S x*ð Þ is a given function (source), *Ф* an unknown function. It follows from the continuity equation that *F* ¼ *ρu* ¼ *const*.

Consider Eq. (31) into segments ½ � *W*, *E* . To obtain an approximate analytical solution to the problem using the control volume method, we take an arbitrary point *x*∈½ � *W*, *E* and control volume [*w*, *e*] (**Figure 11**). Let us assume that the face *w* is located in the middle between the points *W* and *x*, and the face *e* is in the middle between the points *x* and E. Integrating Eq. (31) over the control volume and replacing the derivatives with the upwind scheme, we obtain the zero approximation.

**Figure 11.** *Control volume [*w*,* e*].*

$$(a\_E + a\_W)\Phi^0 = a\_E \Phi\_E^0 + a\_W \Phi\_W^0 + \frac{E - W}{2} \cdot \mathbf{S}(\mathbf{x}) \tag{33}$$

Here *aE* <sup>¼</sup> *Ге <sup>Е</sup>*�*<sup>х</sup>* <sup>þ</sup> max �*Fe* ð Þ , 0 ; *aW* <sup>¼</sup> *<sup>Г</sup><sup>w</sup> <sup>x</sup>*�*<sup>W</sup>* <sup>þ</sup> maxð Þ *Fw*, 0 *:* Since *<sup>x</sup>*<sup>∈</sup> ½ � *<sup>W</sup>*, *<sup>E</sup>* an arbitrary point from (33), we can determine *Ф*<sup>0</sup> and obtain an approximate analytical solution to problem (31).

Note that, from (33) it follows that, in the absence of a source ( *S x*ð Þ� 0) on the segments ½ � *W*, *E* , the function is monotone.

To improve the approximate solution, we take additional nodes: *<sup>x</sup>*<sup>1</sup> <sup>¼</sup> *<sup>x</sup>*þ*<sup>W</sup>* <sup>2</sup> , *<sup>x</sup>*<sup>2</sup> <sup>¼</sup> *<sup>x</sup>*þ*<sup>E</sup>* <sup>2</sup> . Let us write an upwind scheme of type (33) for the segment ½ � *W*, *x* , ½ � *x*1, *x*<sup>2</sup> , and ½ � *x*, *E* . We get a system of three equations. We exclude the resulting system *<sup>Ф</sup>*<sup>1</sup>ð Þ *<sup>x</sup>*<sup>1</sup> , *<sup>Ф</sup>*<sup>1</sup> ð Þ *x*<sup>2</sup> and as a result, we get an improved scheme:

$$
\left[\frac{\beta\_1^+}{1+\tau\_1} + \frac{a\_1^-}{1+\gamma\_1}\right] \Phi^1 = \frac{\beta\_1^+}{1+\tau\_1} \Phi\_W^1 + \frac{a\_1^-}{1+\gamma\_1} \Phi\_E^1 + \frac{E-W}{4} \cdot \mathbf{S}(\mathbf{x}) + \\
$$

$$
\frac{1}{\mathbf{1} + \tau\_1} \cdot \frac{\mathbf{x} - W}{2} \cdot \mathbf{S}\left(W + \frac{\mathbf{x} - W}{2}\right) + \frac{1}{\mathbf{1} + \gamma\_1} \cdot \frac{E-\mathbf{x}}{2} \cdot \mathbf{S}\left(\mathbf{x} + \frac{E-\mathbf{x}}{2}\right).
$$

where *<sup>τ</sup>*<sup>1</sup> <sup>¼</sup> *<sup>β</sup>*� 1 *β*þ 1 , *<sup>γ</sup>*<sup>1</sup> <sup>¼</sup> *<sup>α</sup>*<sup>þ</sup> 1 *α*� 1 , *β*� <sup>1</sup> ¼ 2*DW* þ *F*�, *β*<sup>þ</sup> <sup>1</sup> ¼ 2*DW* þ *F*þ, *α*� <sup>1</sup> ¼ 2*DE* þ *F*�, *α*<sup>þ</sup> <sup>1</sup> ¼ 2*DE* þ *F*þ, *DE* ¼ *Г=*ð Þ *E* � *x* , *DW* ¼ *Г=*ð Þ *x* � *W* , *F*� ¼ maxð Þ �*F*, 0 , *F*<sup>þ</sup> ¼ maxð Þ *F*, 0 . In (34), *Ф*<sup>1</sup> is the improved value of the unknown function at the nodal point

*x Ф*<sup>1</sup> *<sup>W</sup>* � *<sup>Ф</sup>W*, *<sup>Ф</sup>*<sup>1</sup> *<sup>E</sup>* � *Ф<sup>E</sup>* � �.

where in (34), the improved value of the unknown function at the nodal point is x. Solving (34) with respect to, we obtain an improved analytical solution. Again, to improve the solution, we proceed in a similar way: we write the scheme (34) for the segment ½ � *W*, *x* , ½ � *x*1, *x*<sup>2</sup> and ½ � *x*, *E* , and eliminate the unknowns at the points *x*<sup>1</sup> and *x*2, and so on. Continuing this process, we get.

$$\begin{split} & \left[ \frac{(\mathbf{1} - \tau\_k) \boldsymbol{\theta}\_k^+}{\mathbf{1} - \tau\_k^{2^k}} + \frac{(\mathbf{1} - \boldsymbol{\gamma}\_k) \boldsymbol{a}\_k^-}{\mathbf{1} - \boldsymbol{\gamma}\_k^{2^k}} \right] \boldsymbol{\Phi}^k = \frac{(\mathbf{1} - \tau\_k) \boldsymbol{\theta}\_k^+}{\mathbf{1} - \tau\_k^{2^k}} \boldsymbol{\Phi}\_W^k + \frac{(\mathbf{1} - \boldsymbol{\gamma}\_k) \boldsymbol{a}\_k^-}{\mathbf{1} - \boldsymbol{\gamma}\_k^{2^k}} \boldsymbol{\Phi}\_E^k + \frac{E - W}{2^{k+1}} \cdot \mathbf{S}(\mathbf{x}) \\ & + \frac{\mathbf{1} - \tau\_k}{\mathbf{1} - \tau\_k^{2^k}} \cdot \frac{\mathbf{x} - W}{2^k} \cdot \sum\_{j=1}^{2^k - 1} \sum\_{i=1}^j \tau\_k^{i-1} \mathbf{S} \left( W + j \frac{\mathbf{x} - W}{2^k} \right) \\ & + \frac{\mathbf{1} - \gamma\_k}{\mathbf{1} - \tau\_k^{2^k}} \cdot \frac{E - \mathbf{x}}{2^k} \cdot \sum\_{j=1}^{2^k - 1} \sum\_{i=1}^j \gamma\_k^{j-1} \mathbf{S} \left( \mathbf{x} + \left( 2^k - j \right) \frac{E - \mathbf{x}}{2} \right) . \end{split} \tag{25}$$

(35)

*Moving Node Method for Differential Equations DOI: http://dx.doi.org/10.5772/intechopen.107340*

$$\begin{aligned} \text{Here} \quad \tau\_k &= \frac{\beta\_k^-}{\beta\_k^+}, \gamma\_k = \frac{a\_k^+}{a\_k^-}, \ \beta\_k^- = 2^k D\_W + F^-, \beta\_k^+ = 2^k D\_W + F^+, \ a\_k^- = 2^k D\_E + F^-, \\\ a\_k^+ &= 2^k D\_E + F^+. \end{aligned}$$

In (35), *Ф<sup>k</sup>* is the improved value of the unknown function at the nodal point *x Ф<sup>k</sup> <sup>W</sup>* � *<sup>Ф</sup>W*, *<sup>Ф</sup><sup>k</sup> <sup>E</sup>* � *Ф<sup>E</sup>* . Solving Eq. (35) with respect to *Фk*, we obtain an approximate analytical solution of the original problem.

#### Examples.

**Figure 12** shows solutions to the problem (31) *Г* ¼ *const*, *R* ¼ *ρu=Г* ¼ 20, *S x*ð Þ¼ 0 for segments 0; 1 ½ � with boundary conditions *Ф<sup>W</sup>* ¼ 0, *Ф<sup>E</sup>* ¼ 1*:* **Figure 13** shows

**Figure 12.**

*Comparison of the approximate solutions for* S*(*x*) = 0. Continuous line is exact, point—k = 0, dotted line—k = 1, dot-dotted line—k = 2, long dotted line—k = 4, rare dotted line—k = 6.*

#### **Figure 13.**

*Comparison of the approximate solutions for S(x) = 5cos4x. Continuous line is exact, point—k = 0, dotted line k = 1, dot-dotted line—k = 2, long dotted line—k = 4, rare dotted line—k = 6.*

*Numerical Simulation – Advanced Techniques for Science and Engineering*

#### **Figure 14.**

*Approximate solution for k = 0. Solid curves are exact solutions, point curves are the finite difference method; dotted lines—control volume method.*

solutions to the problem (31) *R* ¼ 50, *S x*ð Þ¼ 5 cos 4*x* for segments 0; 1 ½ � with boundary conditions *Ф<sup>W</sup>* ¼ 0, *Ф<sup>E</sup>* ¼ 1*:* The graph shows that, as k increases, the approximate solutions approach the exact one.

It can be seen from the graphs that, starting from k = 6, the exact and approximate solutions visually coincide.

It is interesting to compare the analytical solution obtained by the finitely different method (30) and the control volume method (R = 10, S(x) = 0).

From **Figures 14** and **15**, it can be seen that the solution obtained by the control volume method is preferable.

#### **Figure 15.**

*Approximate solution for k = 1. Solid curves are exact solutions, point curves are the finite difference method; dotted lines—control volume method.*

#### *2.3.3 Improving accuracy with Richardson extrapolation*

Using the method described, we can improve the accuracy of approximate solutions to the problem [39]. Linear combination *Q*<sup>3</sup> ð Þ¼� *<sup>x</sup>* <sup>1</sup> <sup>3</sup> *<sup>U</sup>*<sup>1</sup> ð Þþ *<sup>x</sup>* <sup>4</sup> <sup>3</sup> *<sup>U</sup>*<sup>3</sup> ð Þ *x* is more accurately approximates the solution. With a linear combination of *U*<sup>1</sup> ð Þ *<sup>x</sup>* , *<sup>U</sup>*<sup>3</sup> ð Þ *x* and *U*7 ð Þ *<sup>x</sup>* in the form *<sup>Q</sup>*<sup>7</sup> ð Þ¼ *<sup>x</sup>* <sup>1</sup> <sup>45</sup> *<sup>U</sup>*<sup>1</sup> ð Þ� *<sup>x</sup>* <sup>4</sup> <sup>9</sup> *<sup>U</sup>*<sup>3</sup> ð Þþ *<sup>x</sup>* <sup>64</sup> <sup>45</sup> *<sup>U</sup>*<sup>7</sup> ð Þ *x* , we obtain a more refined solution to the problem [39].

**Figure 16** shows graphs of approximate solutions to the problem (31) obtained by Richardson's extrapolation for *W* ¼ 0, *E* ¼ 1*:* The solid line in **Figure 16**–**19** is the exact solution.

**Figures 16**–**19** allow us to state that Richardson's extrapolation makes it possible to obtain a more refined solution to the problem.

#### **Figure 16.**

*<sup>Ф</sup><sup>W</sup>* <sup>¼</sup> 0, *<sup>Ф</sup><sup>E</sup>* <sup>¼</sup> 1, *S x*ð Þ¼ 0, *Pe* <sup>¼</sup> <sup>20</sup>*: Comparisons of solutions. Dotted line is U*<sup>3</sup>ð Þ *<sup>x</sup> , point line—Q*<sup>3</sup>ð Þ *<sup>x</sup> , dotdotted line—U*<sup>7</sup>ð Þ *<sup>x</sup> , long dotted line—Q*<sup>7</sup>ð Þ *<sup>x</sup> .*

#### **Figure 17.**

*<sup>Ф</sup><sup>W</sup>* <sup>¼</sup> 0, *<sup>Ф</sup><sup>E</sup>* <sup>¼</sup> 0, *S x*ð Þ¼ *<sup>x</sup>*, *Pe* <sup>¼</sup> <sup>20</sup>*: Comparisons of solutions. Dotted line is U*<sup>3</sup>ð Þ *<sup>x</sup> , point line—Q*<sup>3</sup>ð Þ *<sup>x</sup> , dotdotted line—U*<sup>7</sup>ð Þ *<sup>x</sup> , long dotted line—Q*<sup>7</sup>ð Þ *<sup>x</sup> .*

**Figure 18.** *<sup>Ф</sup><sup>W</sup>* <sup>¼</sup> 0, *<sup>Ф</sup><sup>E</sup>* <sup>¼</sup> 1, *S x*ð Þ¼ 0, *Pe* <sup>¼</sup> <sup>20</sup>*: Comparisons of solutions. Dotted line—U*<sup>15</sup>ð Þ *<sup>x</sup> , dotted line—Q*<sup>15</sup>ð Þ *<sup>x</sup> .*

**Figure 19.** *<sup>Ф</sup><sup>W</sup>* <sup>¼</sup> 0, *<sup>Ф</sup><sup>E</sup>* <sup>¼</sup> 0, *S x*ð Þ¼ *<sup>x</sup>*, *Pe* <sup>¼</sup> <sup>20</sup>*: Comparisons of solutions. Dotted line—U*<sup>15</sup>ð Þ *<sup>x</sup> , dotted line—Q*<sup>15</sup>ð Þ *<sup>x</sup> .*

### **2.4 Moved node method for non-stationary problems**

In the previous paragraphs, the application of the MNM for ordinary differential equations has been considered. Here we consider the application of the MNM for parabolic equations.

An example of a problem that leads to a parabolic partial differential equation is the problem of heat transfer along a long rod, described by the heat transfer (or diffusion) equation.

The problem is to find a function *U*(*x*,*t*) in the region Ω = {(x,t) | W ≤ x ≤ E, 0 ≤ t ≤ T} satisfying the equation.

$$\frac{\partial U}{\partial t} = A \frac{\partial^2 U}{\partial x^2} + f(\mathbf{x}, t), \quad A > 0 \tag{36}$$

*Moving Node Method for Differential Equations DOI: http://dx.doi.org/10.5772/intechopen.107340*

**Figure 20.** *The region of solution*

initial condition

$$U(\mathfrak{x}, \mathfrak{O}) = U^0(\mathfrak{x})$$

and boundary conditions of the first kind

$$U(\mathcal{W}, t) = U\_{\mathcal{W}}(t); \quad U(E, t) = U\_E(t).$$

Let us take an arbitrary point Ω in the area ð Þ *x*, *t* ∈ Ω (**Figure 20**). We will accept this point as moving. We approximate (36) by the implicit scheme

$$\frac{Y(\mathbf{x},t) - U^0(t)}{t} = A \frac{2}{E - W} \left( \frac{U\_E(t) - Y(\mathbf{x},t)}{E - \mathbf{x}} - \frac{Y(\mathbf{x},t) - U\_W(t)}{\mathbf{x} - W} \right) + f(\mathbf{x},t), \tag{37}$$

In (37), *Y x*ð Þ , *t* is an approximate analytical solution. When the point runs through Ω, we get a solution in the area under consideration. From (37), we get

$$Y(\mathbf{x},t) = \frac{(E-\mathbf{x})(\mathbf{x}-\mathbf{W})}{2At + (E-\mathbf{x})(\mathbf{x}-\mathbf{W})}U^{0}(t) + \frac{2At[U\_E(t)(\mathbf{x}-\mathbf{W}) + U\_W(t)(E-\mathbf{x})]}{2At + (E-\mathbf{x})(\mathbf{x}-\mathbf{W})} + \frac{(E-\mathbf{x})(\mathbf{x}-\mathbf{W})}{2At + (E-\mathbf{x})(\mathbf{x}-\mathbf{W})}f(\mathbf{x},t). \tag{38}$$

Consider examples.

#### *2.4.1 Test problems*

Let us consider Eq. (36) 0<*x*<sup>&</sup>lt; 1 with conditions *<sup>U</sup>*<sup>0</sup>ð Þ¼ *<sup>x</sup> <sup>x</sup>*, *UW*ðÞ¼ *<sup>t</sup>* 0, *UE*ðÞ¼ *<sup>t</sup> e*�*<sup>t</sup>* , *f x*ð Þ¼� , *<sup>t</sup> x e*�*<sup>t</sup> :* Exact solution of problem is *U x*ð Þ¼ , *<sup>t</sup> x e*�*<sup>t</sup> :* **Figure 21** presents a comparison of the exact and approximate solutions for the cross-section *x* ¼ 0, 5 and *x* ¼ 0, 2. The solid lines are the exact solution. **Figure 21** shows the closeness of the exact and approximate solutions.

Let us consider Eq. (36)0<sup>&</sup>lt; *<sup>x</sup>*<1 with conditions *<sup>U</sup>*<sup>0</sup>ð Þ¼ *<sup>x</sup>* sin *<sup>π</sup><sup>x</sup>* <sup>þ</sup> *<sup>x</sup>*2, *UW*ðÞ¼ *<sup>t</sup>* 0, *UE*ðÞ¼ *<sup>t</sup>* 1, *f x*ð Þ¼� , *<sup>t</sup>* sin *<sup>π</sup>x e*�*<sup>t</sup>* <sup>þ</sup> *<sup>π</sup>*<sup>2</sup> sin *<sup>π</sup>x e*�*<sup>t</sup>* � <sup>2</sup>*:* Exact solution of problem

**Figure 21.** *Solution comparison of the exact and approximate solutions for the sections* x *= 0, 5 and* x *= 0.2.*

presents a comparison of the exact and approximate solutions for the sections *x* ¼ 0, 1, *x* ¼ 0, 5, and *x* ¼ 0, 8. **Figure 22** shows the closeness of the exact and approximate solutions.

*Moving Node Method for Differential Equations DOI: http://dx.doi.org/10.5772/intechopen.107340*

**Figure 23.** *Comparison of (39) and (41) (red light approx. solution).*
