NEW TECHNIQUE FOR SOLVING TIME FRACTIONAL WAVE EQUATION: PYTHON

unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Abstract. In this paper, we develop the fractional order explicit finite difference scheme for time fractional wave equation. Furthermore, we prove the scheme is conditionally stable and convergent. As an application of the scheme numerical solution of the test problem is obtained by Python Programme and represented graphically.


INTRODUCTION
Fractional order partial differential equations are widely used in many areas like physics, engineering, finance, medical sciences etc. [2,8], as they can provide an adequate and precise description of the models, which cannot be revealed by integer-order differential equations.
Recently, the fractional wave equation is occurs in many studies such as acoustics, electromagnetic, seismic study etc [3,10,18]. It also describes the movement of strings, wires and fluid surfaces [12]. Any wave or motion can be express in terms of a sum of sine or sinusoidal waves.
The traveling wave solution of the wave equation was first published by d'Alembert in 1747 [7].
The traveling wave solutions of fractional order partial differential equations are deeply helpful to realise the mechanisms of the phenomena as well as their further application in real-world.
Finite difference method is also one of the very effective method for solving fractional order partial differential equations [1,4,14,15,16,17].
Recently, several authors have developed different numerical techniques for solving differential equations using mathematical software [5,6,11]. Python is a high-level interpreted programming language that has a vast standard library and a lot of modern software engineering tools. It allows fast exploration of various ideas as well as efficient implementation. It has been used for teaching and research in various branches of pure and applied mathematics [19]. Therefore, in this connection we develop the explicit finite difference scheme for time-fractional wave equation and obtain its solution using Python programme.
We organize the paper as follows: In section 2, we develop the explicit finite difference scheme for time fractional wave equation. The section 3 is devoted for stability of solution of the scheme and the convergence is proven in section 4. In section 5, we develop a python programme for the proposed scheme and numerical experiments are performed to confirm stability and convergence of the scheme.
We consider the following time-fractional wave equation with initial and boundary conditions: initial conditions: boundary conditions: where V (x,t) is the amplitude of wave at position x and time t, and C is the velocity of wave.
Here, ∂ α V ∂t α is Caputo time fractional derivative of order α, which is defined as follows [9]:

FINITE DIFFERENCE SCHEME
Let V n i be the numerical approximation of V (x,t) at point (ih, nk), where h and k are spatial and temporal sizes respectively. Let x i = ih, i = 0, 1, 2, . . . , M and t n = nk, n = 0, 1, 2, . . . , N, where h = L M and k = T N . Now, the fractional order wave equation (1) -(3) is discretized by using the second-order accurate central difference formula for the derivative term in space and the Caputo finite difference formula for the time α-order fractional derivative for each interior grid point (ih, nk). We discretized the second order space derivative by second-order accurate central difference formula as follows: and Caputo time fractional derivative as follows: As nk ≤ T is finite, then above formula can be rewritten as Now, putting (4) and (5) in equation (1), we obtain After simplification, we get The initial conditions are approximated as follows: Also, the boundary conditions are approximated as follows: Now, putting n = 0 in equation (6) and using equation (8), we obtain For n = 1, we have The complete discretized time-fractional wave equation with initial and boundary conditions is written as follows: initial condition: boundary conditions: The discretized finite difference scheme (9)-(13) can be written in matrix form as follows: initial condition:

STABILITY
In this section, we discuss the stability of solution of the explicit finite difference scheme are given as where a, b and c may be real or complex [13]. Proof. The eigenvalues of tri-diagonal matrix A 1 are given by, Similarly, eigenvalues of tri-diagonal matrix 2A 1 are given by, Now, the eigenvalues of tri-diagonal matrix A 2 are given by, Therefore, from equations (19), (20) and (21), we prove the spectral radius ρ(A) of matrices Hence, this proves the theorem.

CONVERGENCE
In this section, we discuss the question of convergence. Let V n i be the exact solution of timefractional wave equation (1)-(3) and τ n i be the local truncation error for 1 ≤ i ≤ M. The finite difference scheme (9)-(13) will become and for 2 ≤ n ≤ N − 1, Then there exist a positive constant K independent of h and k such that Proof. Let e n i be the error at each mesh point (x i ,t n ), then Using mathematical induction, we will prove that e n ∞ ≤ K(h 2 + k 2 ). For n = 1, we have max 1≤i≤M−1 where K is independent of h and k. Also for n = 2, we have max 1≤i≤M−1 where K is independent of h and k.
Suppose that for r ≤ n and K is independent of h and k. Consider, where K is a positive constant independent of h and k. Hence, by mathematical induction, for all n = 1, 2, . . . , N, we have Therefore, we conclude that if then e n ∞ → 0 as (h, k) → (0, 0). Therefore, we proves that V n i converges to V n i . This completes the proof.

PYTHON PROGRAMME
We compute V n i at each grid point (x i ,t n ) using proposed scheme by Python. Now, the algorithm for scheme (9)-(13) as follows:

Numerical Solutions:
We consider the following time-fractional wave equation: with initial conditions: and boundary conditions, The exact solution to this problem is V (x, y) = sin(5πx) cos(5πCt) + 2 sin(7πx) cos(7πCt) Using the python programme TFW, we estimate the value of V (x,t) for any time level t n . In Table 1, we compare the exact solution and numerical solution for α = 1.99 with parameters h = 1 100 , k = 1 150 , C = 1 and t = 1. , k = 1 100 ,C = 1, t = 1 and represented graphically in Figure 1. We obtain the numerical solutions for µ = 0.9 and 1.0 with parameters α = 1.5, k = 1 100 ,C = 1, t = 1 and represented graphically using Python programme TFW in Figure 2.
We observe that µ > 0.75 then approximate solution obtained by the develop scheme using Python programme TFW is unstable.  (ii) Theoretically, we proved that the developed scheme is conditionally stable and bound of stability is 1 4 ≤ µ ≤ 3−b 1 4 , where 0 ≤ b 1 ≤ 1. (iii) The convergence of the scheme is theoretically proved by using maximum norm method.
(iv) We successfully develop a python programme for time fractional wave equation.
(v) Analysis shows that the finite difference scheme is numerically stable and the results are compatible with our theoretical analysis.
(vi) We observe that Python is very powerful tool, which allows for the convenient computation of finite difference schemes for solving fractional order differential equations.
The numerical solution of test problem is obtained successfully by Python programme and represented graphically.

CONFLICT OF INTERESTS
The author(s) declare that there is no conflict of interests.