# Preface

This section presents some applications of power series method in numerical approximation of solutions to systems of ordinary differential equations.

Introduction to Linear Algebra

# Klein--Gordon equation

The Klein--Gordon and sine-Gordon equations are a two nonlinear hyperbolic partial differential equations that model problems in classical and quantum mechanics, solitons, and condensed matter physics. Let us consider the Klein--Gordon equation
$u_{tt} - y_{xx} + b\, u + g(u) = f(x,t) ,$
and sine-Gordon equation
$u_{tt} - y_{xx} + \alpha\, \sin (u) = f(x,t) ,$
subject to the initial conditions
$u(x,0) = f_0 (x), \qquad u_t (x,0) = f_1 (x) .$

Example: Consider the linear Klein--Gordon equation

$\frac{\partial^2 u}{\partial t^2} = \frac{\partial^2 u}{\partial x^2} +u ,$
subject to the initial conditions
$u(x,0) = 1 + \sin x, \qquad u_t (x,0) =0.$
■

Example: Consider the following nonlinear Klein--Gordon equation:

$\frac{\partial^2 u}{\partial t^2} = \frac{\partial^2 u}{\partial x^2} - \left( u(x,t) \right)^2 + x^2 t^2 ,$
subject to the initial conditions
$u(x,0) =0, \qquad u_t (x,0) = x.$
We seek solution in the form:
$u(x,t) = \sum_{j\ge 0} \sum_{j\ge 0} a_{i,j} x^i t^j .$
Then
\begin{align*} \frac{\partial^2 u}{\partial t^2} &= \sum_{j\ge 0} \sum_{j\ge 0} \left( j+1 \right) \left( j+2 \right) a_{i,j+2} x^i t^j , \\ \frac{\partial^2 u}{\partial x^2} &=\sum_{j\ge 0} \sum_{j\ge 0} \left( i+1 \right) \left( i+2 \right) a_{i+2,j} x^i t^j , \\ u^2 (x,t) &= \sum_{j\ge 0} \sum_{j\ge 0} A_{i,j} x^i t^j , \end{align*}
where
$A_{i,j} = \frac{1}{i!\,j!} \left. \frac{\partial^{i+j}}{\partial x^i \,\partial t^j} \, u^2 (x,t) \right\vert_{x=0, t=0} , \qquad A_{0,0} = a_{0,0}^2 .$
In particular,
\begin{align*} A_{0,1} &= 2\,a_{0,0} a_{0,1} , \\ A_{0,2} &= 2\,a_{0,0} a_{0,2} + a_{0,1}^2 , \\ \vdots & \quad \vdots \\ A_{1,0} &= 2\,a_{0,0} a_{1,0} , \\ A_{1,1} &= 2\,a_{0,0} a_{1,1} + 2\,a_{0,1} a_{1,0} \\ \vdots & \quad \vdots \\ A_{2,0} &= 2\,a_{0,0} a_{2,0} + a_{1,0}^2 , \end{align*}
and so on. Then, by substituting these formulas into the given equation, we obtain
$\sum_{j\ge 0} \sum_{j\ge 0} \left( j+1 \right)\left( j+2 \right) a_{i,j+2} x^i t^j = \sum_{j\ge 0} \sum_{j\ge 0} \left( i+1 \right) \left( i+2 \right) a_{i+2,j} x^i t^j - \sum_{j\ge 0} \sum_{j\ge 0} A_{i,j} x^i t^j + x^2 t^2 ,$
and by equating like powers, we get
$\left( j+1 \right)\left( j+2 \right) a_{i,j+2} = \left( i+1 \right) \left( i+2 \right) a_{i+2,j} - A_{i,j} + \delta_{i-2, j-2} ,$
where
$\delta_{\nu , \mu} = \begin{cases} 1 , & \ \mbox{ if } \nu = \mu =0 , \\ 0, & \ \mbox{ otherwise} \end{cases}$
is the Kronecker's delta. Now we take into account the initial conditions
\begin{align*} u(x,0) &= \sum_{i\ge 0} a_{i,0} x^i =0 \qquad \Longrightarrow \qquad a_{i,0} =0; \\ u_t (x,0) &= \sum_{i\ge 0} a_{i,1} x^i = x \qquad \Longrightarrow \qquad a_{i,1} = \delta_{i-1} . \end{align*}
This allows us to determine explicitly the values of coefficients and obtain
$u(x,t) = xt .$
■

1. Yousif, M.A. and Mahmood, B.A., Approximate solutions for solving theKlein–Gordon and sine-Gordon equations, Journal of the Association of Arab Universities forBasic and Applied Sciences, 2017, Vol. 22, pp. 83--90.