A space-time spectral method for the 1-D Maxwell equation

Abstract: A Legendre-tau space-time spectral method is established for the 1-D Maxwell equation. The polynomials of different degrees are used to approximate the electric and magnetic fields, respectively, so that they can be decoupled in computation. Also, the time multi-interval Legendre-tau space-time spectral method is considered to keep the long-time computation stable. Error estimates for the method of single and multi-internal are given, respectively. Moreover, the space-time spectral method is applied to the numerical solutions of the 1-D nonlinear Maxwell equation and describes its implicit-explicit iteration scheme. Numerical examples are compared with some other methods, which verifies the effectiveness of the methods for the 1-D Maxwell equation.


Introduction
It is well known that the spectral method has high-order accuracy for smooth problems. The spectral method together with the difference method and the finite element method has become an important method for the numerical solution of partial differential equations (PDEs), and has been successfully applied to solve many practical problems. In recent years, with regard to the differential equations of time evolution, the high-order discrete scheme in time has received widespread attention and has become one of the hot spots in the field of numerical computing. The discontinuous Galerkin method in time is constantly developing, and a better higher-order discrete scheme in time is established [1][2][3]. The explicit, implicit and implicit-explicit Runge-Kutta methods have also made great progress: a local discontinuous Galerkin method with implicit-explicit time-marching is used to solve the multidimensional convection-diffusion problems and time-dependent incompressible fluid flow in [4][5][6]. In [7][8][9], the spectral method in time and the time multi-interval spectral method are also proposed. The single interval and multi-interval Legendre spectral methods in time are established for the parabolic equations, in which the L 2 -optimal error estimate in space is obtained in [10].
The Maxwell equation is a set of important PDEs that describes electromagnetic field phenomena, and some effective numerical methods have been established for the Maxwell equation by scholars [11][12][13]. The finite-difference time-domain method (also called Yee's scheme) for the Maxwell equation is proposed in [14]. In [15,16], an energy-conserved splitting spectral method for solving the Maxwell equation is given. For the 2-D Maxwell equation, a Legendre-Galerkin method in space and the energy-conserved splitting spectral method in time is constructed [17]. In previous work, the different method is used in the time direction. For the 1-D Maxwell equation of inhomogeneous media with discontinuous solutions, the multidomain Legendre-Galerkin and the multidomain Legendre-tau method are established in [18,19], and the optimal error estimates of the semi-discrete schemes are given.
Consider the following 1-D Maxwell equation [20] where I x = (−1, 1), I t = (0, T ], and Ω = I x × I t . E z and H y stand for the electric field and the magnetic field, respectively. The positive constants and µ stand for the electric permeability and the magnetic permeability, respectively. In [21,22], an h-p version of the Petrov-Galerkin time stepping method is used to solve the nonlinear initial value problems by transforming the second-order problem into a first-order system. For the linear second-order wave equation, it is often transformed into the first-order system similar to equation (1.1) by using the substitution v = ∂u ∂t , w = ∂u ∂x [23]. It is interesting to note that some methods use the derivative as the main unknown function, and u is expressed as the integral of w.
In this paper, a Legendre-tau space-time (LT-ST) spectral method is developed to solve the 1-D Maxwell equation (1.1) and a time multi-interval Legendre-tau spectral method is considered. The scheme is based on the Legendre-tau method, which uses polynomials of different degrees are used to approximate the electric field E z and magnetic field H y , respectively, so that they can be decoupled in computation. After decoupling, it is an equation only about E z , which can be solved by the method in [10]. The method is also applied to the numerical solutions of the 1-D nonlinear Maxwell equation.
The paper is organized as follows. In Section 2, a Legendre-tau space-time spectral method for (1.1) is presented, and stability analysis and error estimate are given. In Section 3, a time multi-interval Legendre-tau spectral method is developed, and its error estimate is also obtained. Some numerical results are given in Section 4. Finally, the method is applied to the numerical solution of the 1-D nonlinear Maxwell equation in Section 5.

Legendre-tau space-time spectral method
In this section, a Legendre-tau space-time spectral method is presented for the problem (1.1). Moreover, the stability and the error estimate of this method are given.

Preliminaries
Let (·, ·) Q and · Q be the inner product and the norm of L 2 (Q), where Q stands for Ω, I x and I t , respectively. For a nonnegative integer m, let · m,I and | · | m,I be the norm and the semi-norm of the classical Sobolev space H m (I), where I stands for I x or I t , respectively. Define For a pair of positive integers N and M, define L = (N, M). Let P N (I x ) be the space of polynomials of degree at most N on I x . Define the polynomial space and the approximation space in space Let P M (I t ) be the space of polynomials of degree at most M on I t , we define the approximation space in time be the Chebyshev-Gauss-Lobatto (CGL) points and the corresponding weights on I x . We define the CGL interpolation operator I C N v ∈ V N : Similarly, let x L j and ω L j (0 ≤ j ≤ N) be the Legendre-Gauss-Lobatto (LGL) points and the corresponding weights on I x . I L N v ∈ V N denotes the LGL interpolation operator, and We denote by P N : L 2 (I x ) → V N the L 2 (I x )-Legendre projection operator and define P 1 It is easy to see that Let C be a generic positive constant independent of N, and the following approximation results can be found in [10,24].
Let t C j and ω C j (0 ≤ j ≤ M) be the CGL points and the corresponding weights on I t , and let t L j and ω L j (0 ≤ j ≤ M) be the LGL points and the corresponding weights on I t . We denote by P M : L 2 (I t ) → V M the L 2 (I t )-Legendre projection operator and define P 1 It is easy to find that The following approximation result can be found in [10].
where C is a positive constant independent of M.
The problem (1.1) is expressed in a weak form: (2.9) The LT-ST scheme to the problem (1.1) is: (2.10)

Stability analysis
In the following section, the stability analysis of (2.10) is considered. Suppose that there are perturbationsf i (i = 1, 2) on the right-hand side. For simplicity, the original notations E zL and H yL are used to represent the solutions to the perturbation problem, which satisfies the following perturbation equation: (2.11) Theorem 2.1. Let E zL and H yL are the solutions to (2.11). Suppose thatf i (i = 1, 2) are perturbations on the right-hand side, such that (2.14) By integration by parts, and using the Cauchy-Schwarz inequality (2. 17) and noting that E zL Ω ≤ T Ẽ zL Ω , H yL Ω ≤ T H yL Ω , we get the result of (2.12).

Error estimate
In the following section, the error estimate of (2.10) is given. In order to deal with the error of the initial value, the following auxiliary problem is considered [25] (2.18) Firstly, the estimate between the two solutions to (2.10) and (2.18) is considered. We define By (2.5) and (2.8), we have Let e z = E zL − E a and e y = H yL − H a . By (2.10) and (2.20), the following error equation is obtained (2.21) Similar to the proof of Theorem 2.1, we obtain the following error estimate.
, and then there exists a positive constant C such that Proof. By (2.12) and (2.21), we have According to Lemma 2.1 and 2.2, it follows that , and then there exists a positive constant C such that Then, we consider the inner product on I x According to Lemma 2.1, it follows that (2.32) (2.33) On the other hand, by Lemmas 2.1-2.2, we have

Time multi-interval Legendre-tau spectral method
In this section, a time multi-interval Legendre-tau spectral scheme is developed and its error estimate is obtained.

Preliminaries
Let K be a positive integer and a partition of the computational interval I t is given as Let M = (M 1 , · · · , M K ) and L = (N, M). We define the space of approximate functions in time as where P M k (I k ) denotes the space of polynomials of degree at most M k on I k . We define the space of the test functions in time as where M − 1 = (M 1 − 1, · · · , M K − 1). LetÎ = (−1, 1) be a reference interval,t k j andω k j (0 ≤ j ≤ M k ) be the LGL points and the corresponding weights onÎ. We denote by {t k j } and {ω k j } be the LGL points and the corresponding weights on I k . Next, we define where τ k = a k − a k−1 .
Letting v k ≡ v| I k , for any u, v ∈ C(Ī) and ω k j = 1 2 τ kω k j , we define Similarly, we denotet k,C j andω k,C j be the CGL points and the corresponding weights onÎ. Let {t k,C j } and {ω k,C j } be the CGL points and the corresponding weights on I k . We define LGL interpolation operator I L M : C(Ī) → W M by Similarly, for the CGL interpolation operator I L M : C(Ī) → W M , which satisfies Define the following relation v(t) =v(t), t = 1 2 (τ kt + a k−1 + a k ), a k−1 ≤ t ≤ a k .
LetP M k −1 : L 2 (Î) → P M k −1 the L 2 -Legendre projection operator by P M−1 : L 2 (I t ) → W M−1 such that LetP 1,M k : H 1 (Î) → P M k be the Legendre projection operator, which satisfieŝ and P 1,M be generated by P 1,M k : The following approximation results can be found in [10].
where C is a generic positive constant independent of τ k , M k .
The time multi-interval Legendre-tau spectral method for the problem (1.1) is : (3.5) Let Ω k = I x ×Î k , and (3.5) can be written as:

Error estimate
In the following, we present the error estimate. In order to deal with the error of the initial value, we consider the following auxiliary problems on Ω k , 1 ≤ k ≤ K, (3.7) Similar to the process of the single-interval, we define E k a = P 1 N P 1 M k E k , H k a = P N−1 P 1 M k H k , and denote f k (3.8) For each subinterval in the multi-interval, using Theorem 2.2 and Lemma 3.1, the error estimate between the solution to (3.6) and the projection of the solution to (3.7) is obtained Let e k z = E k − E k z and e k y = H k − H k y , the results are similar to (2.30)-(2.31) for the multi-interval case, Using the triangle inequality, we get √ e k z (0) 2 (3.12) By the Cauchy-Schwarz inequality, k−1 m=1 τ m = a k−1 , and (3.9), we derive According to (2.7) and Lemma 2.1, it follows that (3.14) As (2.32), we have Substituting the above estimation results into (3.10)-(3.11), we obtain (3.15) By (2.7), Lemma 2.1 and 2.2, we get (3.16) If τ k ≡ τ, M k ≡ M for simplicity, and combining (3.9) and (3.15)-(3.16), we get the following error estimate.
Theorem 3.1. Let E z and H y be solutions to (1.1), respectively. Let E K zL and H K yL be solutions to (3.5), respectively. Let E k and H k be solutions to (3.7), respectively. Assuming that σ ≥ 1, r ≥ 2, E z , H y ∈ C([0, T ]; H r (I x )) ∩ L 2 (I x ; H σ (I t )), E k , H k ∈ C([0, τ k ]; H r (I x )) ∩ L 2 (I x ; H σ (Î k )), and then there exists a positive constant C such that (3.17)

Numerical examples
In this section, some numerical results are presented. We define In Figure 1, the values of log 10 E ∞ (E z ) and log 10 E ∞ (H y ) is obtained when t = 1. It can be seen from Figure 1 that the LT-ST method has spectral accuracy both in the time and space, which is consistent with the results of theoretical analysis. To check the high accuracy, we compare the numerical errors of our scheme (2.10) with the Legendre-tau spectral method in space and the leapfrog-Crank-Nicolson method in time (LT-LFCN) [19]. For convenience of notation, let (N, τ) be the degree of the polynomial in the space approximation and the time step for the LT-LFCN method.
The L ∞ -error of the LT-LFCN scheme and our method (2.10) at t = 1 are listed in Table 1. It can be seen from Table 1 that on the same PC machine, the proposed method takes shorter time than the LT-LFCN method. Table 1. L ∞ -error of the LT-LFCN method and the LT-ST method (2.10).

Application to the 1-D nonlinear Maxwell equation
In this section, the proposed method is applied to the numerical solution of the 1-D nonlinear Maxwell equation. The approximating of the nonlinear term is calculated by interpolation at the CGL point, and implemented with the help of Fast Legendre transformation.

Scheme
Now, we apply the LT-ST method to solve the 1-D nonlinear Maxwell equation as [26] where the nonlinear function J(E z ) = σ(|E z |)E z with σ(s) is a real valued function representing the electric conductivity. The problem (5.1) can be written in a weak form: Find E z ∈ H 1 0 (I x ) ⊗ H 1 (I t ) and H y ∈ L 2 (I ∀x ∈ I x .

(5.2)
Combining the interpolation operator both in space and time, a 2-D interpolation is defined as I L (N,M) . The LT-ST method to the problem (5.1) is: The basis functions in time are The approximate solutions and the test functions are expressed as The interpolation polynomial of the nonlinear term can be expressed as I C (N,M) J(E zL ) = Ψ(t)ĴΦ T (x). The following algebraic equation is obtained from (5.3) whereÊ andĤ are matrices composed of coefficients of approximate solutions E zL and H yL , respectively. For simplicity, (5.4) can be rewritten in matrix form as A simple implicit-explicit iteration method is used to solve (5.5). In order to separate the initial conditions from the coefficient matrix,Ê,Ĥ, M t is divided into the following forms aŝ whereÊ i andĤ i are the first rows of the coefficient matrixÊ andĤ respectively, corresponding to the initial value, M t i is the first column of M t . By the properties of the basis function and the orthogonality of Legendre polynomials show that both K t and D are diagonal matrices, and the elements on the diagonal of K t are 2 except that the first element is zero. Thus, (5.5) can be expressed as In computations. We use the following simple explicit-implicit iteration scheme for (5.7), when k = 0, using the initial information of E zL in (5.3), and taking E [0] zL (t) ≡ E zL (0) as the initial guess of the iteration. The iterative scheme (5.9) is a linear equation ofÊ [k+1] 0 , which can be solved by the method in [10].
Combining the interpolation operator in space and the multi-interval interpolation operator in time in Section 3, a 2-D interpolation is defined as I L (N,M) . The time multi-interval Legendre-tau spectral method for (5.1) is: In computation, the interval is shifted toÎ k = (0, τ k ). Let Ω k = I x ×Î k , and then (5.10) can be written as: where E 0 zL (x, τ 0 ) = I L N E z0 (x) and H 0 yL (x, τ 0 ) = P N−1 I L N H y0 (x) when k = 1.

Numerical examples
Example 5.1. The LT-ST method for the 1-D nonlinear Maxwell equation Consider the problem (5.1), and set the right-hand function of the first equation to f (x, t). According to [26], the nonlinear term is given as where I x = (0, 1), I t = (0, 1), Ω = I x × I t , and = µ = 1. The solution is E z (x, t) = cos(3πt)sin(3πx), (x, t) ∈ Ω, H y (x, t) = sin(3πt)cos(3πx), (x, t) ∈ Ω, (5.12) and the right-hand side of the first equation is f (x, t) = cos(3πt) 3 sin(3πx) 3 − cos(3πt) 5 sin(3πx) 5 , (x, t) ∈ Ω. (5.13) The scheme (5.3) is used to solve Example 5.1, and the values of log 10 E ∞ (E z ) and log 10 E ∞ (H y ) are obtained when t = 1. It can be seen from Figure 2 that the method has high accuracy both in time and space. ItNum represents the number of iterations. Further, the method (5.11) is used to solve Example 5.1 in the case of N = M k = 24 and 0 ≤ t ≤ 5, the numerical results are shown in Table 3. Table 3. L ∞ -error of the time five-interval Legendre-tau spectral method (5.11)  Consider the same problem as in Example 5.1, but the nonlinear is given as [26] J(E z ) = |E z | 1 2 E z .

Conclusions
In this paper, the LT-ST method is investigated for the 1-D Maxwell equation and the time multi-interval Legendre-tau spectral method is considered. Error estimates for the method of single and multidomain are given, respectively. Numerical results are consistent with the theoretical analysis. Compared with the LT-LFCN method, the proposed method has advantages in accuracy and computation time. Moreover, the space-time spectral method is developed for the numerical solutions of the 1-D nonlinear Maxwell equation. In the future, the multidomain spectral method in space will be developed to solve the case of inhomogeneous media.