\begin{document}

\title{Automatic smoothness detection of the resolvent Krylov subspace method for the approximation of \boldmath{$C_0$}-semigroups}

\author{ Volker Grimm 
        \and Tanja G\"{o}ckler\thanks{
        Karlsruhe Institute of Technology (KIT),
        Institut f\"{u}r Angewandte und Numerische Mathematik,
	D--76128 Karlsruhe,
        Germany, {\tt volker.grimm | tanja.goeckler@kit.edu}.} 
}

\maketitle

\begin{abstract} 
The resolvent Krylov subspace method builds approximations to operator functions $f(A)$ times a vector $v$. For the semigroup and related operator functions, this method is proved to possess the favorable property that the convergence is automatically faster when the vector $v$ is smoother. The user of the method does not need to know the presented theory and alterations of the method are not necessary in order to adapt to the (possibly unknown) smoothness of $v$. The findings are illustrated by numerical experiments. 
\end{abstract}

\begin{keywords}
Operator functions, resolvent Krylov subspace method, rational Krylov subspace method, semigroup, $\varphi$-functions, rational approximation. 
\end{keywords}

\begin{AMS} (2010) 65F60, 65M15, 65M22, 65J08.
\end{AMS}

\section{Introduction}  \label{sec:Introduction}

Let $X$ be some Banach space with norm $\|\cdot\|$. For $t \geq 0$, we consider a $C_0$-semigroup $e^{tA}$, which is generated by $A$, applied to some initial data $v \in X$, or more exactly, 
\begin{equation} \label{semisol}
   u(t)=e^{tA}v, \quad v \in X\,, \quad t \geq 0\,.
\end{equation}
Due to a standard rescaling argument (cf. Section~2.2 on page 60 in \cite{engelnagel00}), it suffices to study bounded semigroups, that is, semigroups satisfying $\|e^{tA}\| \leq N$ for all $t \geq 0$. The object of interest \eqref{semisol}
is just the (mild) solution of the abstract linear evolution equation 
\begin{equation} \label{abstract_ode}
u'(t)=Au(t), \quad u(0) = v\,,\quad t \in [0,\infty)\,,
\end{equation}
whose effective approximation is important in many applications, especially for the numerical solution of semilinear evolution equations by either splitting methods (e.g. \cite{Thalhammer08, McLachlanQuispel02}) or exponential integrators (e.g. \cite{hoacta10}).
In order to approximate the solution \eqref{semisol} of the abstract evolution equation in an efficient and reliable way, one has to use a method which leads to an error reduction that is independent of the norm of the matrix representing the discretized operator $A$ (see \cite{HaiWaodestiff96}). Such error bounds can therefore be designated as grid-independent, since the refinement of the grid in space does not deteriorate the convergence in time (cf. \cite{GG13, TanjaDiss}). 

In the case of a matrix or a bounded operator $A$, the basic importance of an efficient approximation to $e^{tA}$ and possible

methods for this problem are well reflected in ``Nineteen dubious ways to compute the exponential of a matrix'' \cite{Dubious78} by Moler and van Loan. The subsequent finding that the standard Krylov subspace approximation can be used for the approximation of the matrix exponential times a vector, $e^{tA}v$, led to an updated version ``Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later'' with the Krylov subspace method as twentieth method (see \cite{Dubioustwen03}).

Recently, it becomes more and more apparent, that rational Krylov subspace methods constitute a promising twenty-first possibility that is even suitable for matrices with a large norm or unbounded operators. The use of rational Krylov subspaces for the approximation of matrix/operator functions $f(A)$ times $v$ has been studied and promoted, e.g., in \cite{beckermann_guettel12,Beckermann_Reichel09,BoGriHo13,Botchev16,druskin_Zaslavsky12,GG14,GaGriDo96,GG13,grimm_hochbruck08,guettelpole13,HoPaSchuThaWie15,KniDruZas09,lopez_simoncini06,moret15,moretnovati11,moretnovati04,novati11,simoncini06,marlis_jasper}.

 
In this paper, we will study the approximation of $e^{tA}v$ and products of related operator functions, the so-called $\varphi$-functions, times $v$ in the resolvent Krylov subspace spanned by $(\gamma-A)^{-1}$ and $v$. An efficient approximation of these operator functions is of major importance particularly in the context of exponential integrators.
Our error analysis provides sublinear error bounds for unbounded operators $A$ that translate to error bounds independent of the norm of the discretized operator. That is, the error bounds prove a grid-independent convergence for the discretized problem. Moreover, it turns out that the error reduction correlates with the smoothness of the initial value $v$. A favorable property is that the resolvent Krylov subspace method detects the smoothness of the initial vector by itself and converges the faster the smoother $v$ is. All of this happens automatically, the user of the method does not even need to know the precise smoothness of the initial value.

After this introduction and a motivation in Section~\ref{sec:motivation}, we briefly review a functional calculus in Section~\ref{sec:prelim}. In Section~\ref{sec:approxKry} we prove that any function of the presented functional calculus times a vector can be approximated in the resolvent Krylov subspace spanned by the resolvent and this vector. For the proof of our main results, some smoothing operators are introduced in Section~\ref{sec:smoothing}. In Section~\ref{sec:approxBanach}, the approximation of the semigroup in Banach spaces is considered. Our main theorems can be found in Section~\ref{sec:detect}, where the effect of the smoothness of the vector on the convergence rate for the approximation of the semigroup and related functions in Hilbert spaces is studied. Some numerical illustrations of our results are given in Section~\ref{sec:NumExp}, followed by a conclusion. 

\section{Motivation} \label{sec:motivation}

For a first illustration of this nice feature of the resolvent Krylov subspace method just mentioned above, we consider the one-dimensional Schr\"odinger equation on $L^2(0,2\pi)$
\begin{equation} \label{eq_schroe}
u'(t) = i \tfrac{\partial^2}{\partial x^2} u(t)\,, \quad 
u(0) = u_0
\quad \text{for} \quad 
x \in (0,2\pi)\,,~ t \geq 0\,.
\end{equation}
With $A = \tfrac{\partial^2}{\partial x^2}$, we obtain the abstract equation $u'(t) = iAu(t)$, where the domain of $A$ is the Sobolev space $H^2_\pi(0,2\pi)$ containing all $2\pi$-periodic functions that admit a second order weak derivative. We now discretize \eqref{eq_schroe} by a pseudospectral method. Therefore, we approximate the unknown solution $u$ by a finite linear combination of the basis functions $\phi_k(x) = e^{ikx}$, that is $u(t) \approx \sum_{k=-N/2}^{N/2-1} \psi_k(t) \phi_k$ with $N$ even, and search for coefficients $\psi_k(t)$ such that
\[
\sum_{k=-N/2}^{N/2-1} \psi'_k(t) \phi_k
= \sum_{k=-N/2}^{N/2-1} (-ik^2) \psi_k(t) \phi_k\,.
\]
This ansatz is equivalent to
\begin{equation} \label{schroe_ode}
\Psi'(t) = i A_N \Psi(t)\,, \quad \Psi(0) = \Psi_0
\end{equation}
with solution $\Psi(\tau) = e^{i\tau A_N} \Psi_0$, where the vector $\Psi(t) \in \C^N$ contains the Fourier coefficients $\psi_k(t)$ for $k = -\frac{N}{2}, \ldots, \frac{N}{2}-1$ and the matrix $A_N \in \R^{N \times N}$ is a diagonal matrix with entries $\left(-\frac{N}{2}\right)^2, \left(-\tfrac{N}{2}+1\right)^2, \ldots, \left(\tfrac{N}{2}-1\right)^2$. The discretized initial vector $\Psi_0 = \big(\psi_k(0)\big)$ is given by 
\[
\psi_k(0) = \frac{1}{2\pi} \int_0^{2\pi} u_0(x) e^{-ikx} \,dx\,,
\quad k = -\tfrac{N}{2}, \ldots, \tfrac{N}{2}-1\,.
\]
These coefficients $\psi_k(0)$ can be approximated by a discrete Fourier transform of the discretized function $u_0$. Here, we use the initial data
\[
u^q_0(x) =
\left\{ \begin{array}{l@{\qquad}l}
\left( \tfrac{2}{\pi} \right)^{4q} (x-\pi)^{2q} x^{2q}\,,
& x \in (0, \pi]\,, \\[2ex]
\left( \tfrac{2}{\pi} \right)^{4q} (x-\pi)^{2q} (x-2\pi)^{2q}\,,
& x \in (\pi, 2\pi]\,.
\end{array} \right.
\]
Differentiating this function $2q+1$ times, $\frac{d^{2q+1}}{dx^{2q+1}} u_0^q$ becomes
discontinuous at $x = \pi$ and at $x = 2\pi$, if $u_0^q$ is considered as a $2\pi$-periodic function. So, we have $u_0^q \in \mathcal{D}(A^q)$ but $u_0^q \not\in \mathcal{D}(A^{q+1})$.
By $\Psi_0^q \in \C^N$, we denote the corresponding spectral discretizations of the initial value. The solution $e^{i\tau A_N} \Psi_0^q$ of the discretized initial value problem at time $\tau > 0$ is now approximated in the rational Krylov subspace $\mathcal{K}_n((\gamma-i\tau A_N)^{-1}, \Psi_0^q)$, where $\gamma = 1$.

In Figure~\ref{fig_moti},  the error of the rational Krylov subspace approximation is plotted against the dimension of the Krylov subspace (blue solid lines) for $N = 131072$, $\tau = 0.02$, and smoothness indices $q = 2, 4, 6, 8$. We can observe that $e^{i\tau A_N} \Psi_0^q$ is approximated the better the smoother the continuous initial value $u_0^q$ is, or more exactly, the higher the number $q$ with $u_0^q \in \mathcal{D}(A^q)$ is. Furthermore, we applied for comparison the implicit Euler method to the discretized problem and added the obtained error curves to Figure~\ref{fig_moti} (red dashed lines). 

\begin{figure}
\caption{Plot of the error versus dimension of the Krylov subspace $\mathcal{K}
\label{fig_moti}
\end{figure}

In order to introduce the resolvent Krylov subspace and to get a first idea why this subspace might be a good choice for the approximation of the operator/matrix exponential, we consider  
the implicit Euler scheme, which is, besides the explicit Euler scheme, a standard method to approximate the matrix exponential times a vector. The two methods are based on the relations
\[
\begin{array}{l@{\qquad}l@{\hspace*{0.1cm}}l}
\text{explicit Euler:} & \displaystyle
\lim_{n \to \infty} \left( I + \tfrac{\tau}{n}A \right)^nv &= e^{\tau A}v\,, \\[1ex] 
\text{implicit Euler:} & \displaystyle 
\lim_{n \to \infty} \left( I - \tfrac{\tau}{n}A \right)^{-n}v &= e^{\tau A}v\,.
\end{array}
\]
For matrices with a large norm, the explicit Euler method does not work efficiently. The discretized Schr\"odinger equation is a stiff system of ordinary differential equations. If we increase the number $N$ of basis functions, the norm of the discretization matrix $A_N$ grows. For the discretized problem considered here, the explicit Euler method is therefore not suitable. The situation is even worse for the continuous equation, since the explicit Euler scheme cannot be used unless the initial data is very smooth and lies in $\mathcal{D}(A^\infty) = \cap_{n=1}^\infty \mathcal{D}(A^n)$. The implicit Euler method, however, provides an approximation to the semigroup for all initial vectors $v$ in the associated Banach space~$X$. The resolvent $(I-\frac{\tau}{n}A)^{-1}$ maps $X$ to $\mathcal{D}(A)$ and can thus be seen as a smoothing operator. While the explicit Euler method cannot be applied for initial values $v \not\in \mathcal{D}(A^\infty)$, the implicit Euler method can be proven to possess the convergence rates (see \cite{brenner_thomee79})
\[
\left\| e^{\tau A}v - \left( 1-\tfrac{\tau}{n}A \right)^{-n} v \right\|
\leq
\left\{ \begin{array}{l@{\qquad}l}
C\, \tfrac{\tau}{\sqrt{n}}\, \|A v\|\,, 
& v \in \mathcal{D}(A)\,, \\[2ex]
C\, \tfrac{\tau^2}{n}\, \|A^2 v\|\,, 
& v \in \mathcal{D}(A^2)\,.
\end{array} \right. 
\]
For even smoother data, the implicit Euler method does not converge faster. 
In order to improve both methods, we briefly review the basic idea of Krylov subspace methods. Consider 
$n-1$ steps of the explicit Euler method that can be seen as a product of a polynomial in $A$ and $v$, that is
\[
e^{A}v \approx \bigl( 1+\tfrac{\tau}{n-1}A \bigr)^{n-1}v = a_0 v + a_1 A v + \cdots + a_{n-1} A^{n-1} v = p(A)v\,, 
\quad p \in \mathcal{P}_{n-1}\,,
\]
where $\mathcal{P}_{n-1}$ is the space of polynomials of maximum degree $n-1$. Instead of using a fixed polynomial approximation given by the explicit Euler scheme, it might be better to search a best approximation in the polynomial Krylov subspace
\[
\mathcal{K}_n(A,v)=\mbox{span}\{v, A v, A^2 v, \ldots, A^{n-1} v\}\,.
\]
Using this approximation space for the numerical solution of the discretized Schr\"odinger equation, it turns out that the approximation improves with respect to stability, but a substantial error reduction would just begin after nearly $\|\tau A_N\|$ iteration steps (see \cite{Kry3}), where $\|\tau A_N\|$ becomes large for fine space discretizations. Analogous to the explicit Euler method, the standard polynomial Krylov subspace method is not suitable for a grid-independent approximation of the Schr\"odinger equation.

Instead of applying the implicit Euler method, one can try to find a better approximation of the type
\[
e^A v \approx a_0 v + a_1 (\gamma-A)^{-1} v + \cdots + a_{n-1} (\gamma-A)^{-(n-1)} v = r(A) v\,,
\quad r \in \frac{\mathcal{P}_{n-1}}{(\gamma-\cdot)^{n-1}}\,,
\]
that means, to search a best approximation in the rational Krylov subspace 
\[
  \mathcal{K}_n((\gamma-A)^{-1},v) = \mathrm{span} \{v, (\gamma-A)^{-1}v, (\gamma-A)^{-2}v,\ldots, (\gamma-A)^{-n+1}v \}\,, \quad \gamma > 0\,.
\]
This so-called resolvent Krylov subspace has been proposed by Ruhe in \cite{Ruh84} for eigenvalue computations and is by now a standard technique for this purpose (cf. \cite{tempeigval00}). We will use the resolvent Krylov subspace as approximation space for the approximation of $e^Av$ and related operator functions in the following. Analogous to the implicit Euler method, the approximation based on the resolvent Krylov subspace will be grid-independent but improve on the implicit Euler method with respect to the convergence rate dependent on the smoothness of the vector $v$, as illustrated above (cf. Figure~\ref{fig_moti}).

\section{Preliminaries} \label{sec:prelim}

We briefly review a functional calculus that has been formerly used in \cite{GG13} and \cite{grimm_gugat10}. The Lebesgue space of complex-valued integrable functions defined on $\R$ is denoted by $L^1(\R)$ with norm $\| \cdot \|_1$. By $C(\R)$, we designate the space of continuous functions $f \,:\, \R \to \C$. Moreover, let
\begin{equation} \label{Mplus}
\mathcal{M}_+ = 
\left\{
f \in C(\R) ~ | ~ \mathcal{F} f \in L^1(\R) ~ \mbox{and} ~ 
\supp (\mathcal{F}f) \subseteq [0,\infty)
\right\},
\end{equation}
where $\mathcal{F}f$ is the Fourier transform of $f$ given as
\[
\mathcal{F} f(s) = \frac{1}{2\pi} \int_{-\infty}^\infty e^{-ixs} f(x) \, dx \quad \mbox{for} \quad f \in L^1(\R)\,.
\]
For $f \not \in L^1(\R)$, the Fourier transform is understood in the sense of distributions.
For each function holomorphic in the left half-plane, we denote by $f_{(0)}: \R \rightarrow \C$ the restriction of $f$ to $\mbox{Re}\, z = 0$ so that $f_{(0)}(\xi)=f(i\xi)$, $\xi \in \R$, and we define the algebra
\[
\widetilde{\mathcal{M}} := 
\left\{
f ~ \mbox{holomorphic and bounded for} ~ \mbox{Re} \, z \leq 0 ~ | ~ f_{(0)} 
\in \mathcal{M}_+ \right\}.
\]
Let $A$ generate a bounded strongly continuous semigroup with $\|e^{\tau A}\| \leq N$ on some Banach space $X$. For functions $f \in \widetilde{\mathcal{M}}$, we introduce a functional calculus via
\begin{equation} \label{newcalcdef}
f(A)= \int_0^\infty e^{sA} \, \mathcal{F}f_{(0)}(s) \, ds\,.
\end{equation}
This defines a bounded linear operator $f(A)$ satisfying
$\|f(A)\| \leq N\|\mathcal{F}f_{(0)}\|_1$.
Until we know that the functional calculus is consistent with standard operator functions such as the resolvent and the semigroup, 

we write $\left(f(z) \right)(A)$, when the definition of the operator functions is according to the new calculus \eqref{newcalcdef}, instead of simply $f(A)$. For $f(z)=(z_0-z)^{-k}$ with $\mbox{Re}\, z_0 > 0$ and $k \geq 1$, we have by elementary semigroup theory (cf. Corollary~1.11, pp. 56--57 in \cite{engelnagel00}),
\[
\left( \frac{1}{(z_0-z)^k} \right)(A)  = 
\int_0^\infty e^{sA} e^{-sz_0}\cdot \frac{s^{k-1}}{(k-1)!} \, ds=(z_0-A)^{-k}\,,
\]
that is, the definition via \eqref{newcalcdef} coincides with the definition in terms of the resolvent. Analogously, all rational functions with a smaller degree of the numerator than the denominator and poles in the right complex half-plane are included by our functional calculus so far. 

We will need another extension in order to include the semigroup, i.e., we want that the generator $A$ inserted in the exponential function $e^{tz}$, $t \geq 0$, coincides with the semigroup. Let
\[
\mathcal{M}_0 := \{ f ~ \mbox{holomorphic for} ~ \mbox{Re} \, z \leq 0 ~ | ~ 
\exists \, n \in \N_0: \frac{f(z)}{(1-z)^n} \in \widetilde{M} \}\,.
\]  
For $f \in \mathcal{M}_0$, we set
\begin{equation*} 
f(A):= (1-A)^n \left( \frac{f(z)}{(1-z)^n} \right)(A)\,,
\end{equation*}
where $n$ is such that $\frac{f(z)}{(1-z)^n} \in \widetilde{M}$. Note that the definition does not depend on the choice of $n$ and that the definition results in a closed operator on $X$. Finally, we define the set
\[
\widetilde{\mathcal{M}} \subseteq
\mathcal{M} := 
  \{ f \in \mathcal{M}_0 ~ | ~ f(A): X \rightarrow X ~ \mbox{is bounded} \}
\]
which is sufficient for our purposes. The following lemma can be found as Proposition 1.12 in \cite{Haasethesis}.
\begin{lemma} \label{homomorphy2}
The mapping $f \rightarrow f(A)$ via \eqref{newcalcdef} is a homomorphism of $\mathcal{M}$ into the algebra of bounded linear operators on $X$.
\end{lemma}

We can check, that the semigroup is now included in the extended functional calculus.
\begin{lemma}
For $\tau \geq 0$, we have
\[
  \left( e^{\tau z} \right)(A) = e^{\tau A}\,.
\]
\end{lemma}
\begin{proof}
For $n=1$, one can verify that $\frac{e^{\tau z}}{1-z} \in \widetilde{\mathcal{M}}$. Hence, we have by \eqref{newcalcdef} that
\begin{align*}
  \left( \frac{e^{z\tau}}{1-z} \right)(A) &= \int_0^\infty e^{sA}{\bf 1}_{[\tau,\infty)}(s) e^{\tau-s}\, ds    = \int_{\tau}^\infty e^{sA}e^{\tau-s}\, ds \\
  &= \int_0^\infty e^{(s+\tau)A}e^{-s}\,ds = e^{\tau A} \int_0^\infty e^{sA}e^{-s}\,ds 
  = e^{\tau A}(1-A)^{-1}\,.
\end{align*}
Finally, we conclude
\[
  (1-A) \left( \frac{e^{\tau z}}{1-z} \right)(A)=(1-A)e^{\tau A}(1-A)^{-1}=e^{\tau A}
\]
which proves the assertion.
\end{proof}

For all functions relevant to our discussion, the functional calculus  \eqref{newcalcdef} coincides with the definitions in semigroup theory. From now on, we therefore do not use different notations and simply write $f(A)$ for a function $f$ of an operator $A$ with respect to \eqref{newcalcdef} . We will also need the following lemma of Brenner and Thom\'{e}e (cf. Lemma~4 in \cite{brenner_thomee79}), whose proof extends to our case. 
\begin{lemma} \label{btlemma4}
For $f,g \in \mathcal{M}$ with $f(z)=z^lg(z)$ for some $l>0$ and $\mbox{Re}\,z \leq 0$, we have
\[
f(A)v=g(A)A^lv \quad \text{for} \quad v\in\mathcal{D}(A^l)\,.
\]
\end{lemma}

\section{Approximation in the resolvent Krylov subspace} \label{sec:approxKry}

Here and in the following, we always consider bounded semigroups with generator $A$ on some Banach space $X$ which satisfy $\|e^{tA}\| \leq N$. For bounded semigroups, it is well-known that the right complex half-plane belongs to the resolvent set of the generator $A$ (e.g. Theorem 1.10 on page 55 in \cite{engelnagel00}) which guarantees that the resolvent $(\gamma - A)^{-1}$ exists for all $\gamma > 0$. 

We are interested in the approximation of operator functions, especially the semigroup, times a vector $v \in X$ in the resolvent Krylov space
\begin{equation} \label{reskrysp}
   \mathcal{K}_n((\gamma-A)^{-1},v) := \mathrm{span} \{v, (\gamma-A)^{-1}v, (\gamma-A)^{-2}v,\ldots, (\gamma-A)^{-n+1}v \}\,, \quad \gamma > 0\,.
\end{equation}
For $n = 1, 2, 3, \ldots$, these spaces form a nested sequence of subspaces. If there exists an index $n_0$ for which $\mathcal{K}_{n_0}((\gamma-A)^{-1},v)$ is invariant under $(\gamma-A)^{-1}$, we have $\mathcal{K}_{n_0}((\gamma-A)^{-1},v) = \mathcal{K}_k((\gamma-A)^{-1},v)$ for all $k \geq n_0$.

For a Banach space $X$ of finite dimension, this always happens. At the latest, when $n$ reaches the dimension of $X$. For a Banach space of infinite dimension, this might happen or it might not. In most cases, the spaces build an infinite series of nested spaces that are different. We therefore first discuss the natural question, whether all functions of our functional calculus can be approximated to an arbitrary precision in the space \eqref{reskrysp} when $n$ tends to infinity. For this purpose, we define the maximal resolvent Krylov subspace. 
\begin{definition} The maximal resolvent Krylov subspace for a given vector $v \in X$ and a fixed $\gamma > 0$ is given as the space
\begin{equation} \label{maxresKry}
  \mathcal{K}_\infty((\gamma-A)^{-1},v) := \mathrm{span} \{v, (\gamma-A)^{-1}v, (\gamma-A)^{-2}v,\ldots \}\,.
\end{equation}
We also need the closure of this space that we designate by 
$\overline{\mathcal{K}_\infty((\gamma-A)^{-1},v)} \subseteq X$.
\end{definition}

The following theorem states that all functions that are defined for $A$ via \eqref{newcalcdef} times $v$ are in the closure of the maximal resolvent Krylov subspace \eqref{maxresKry}, that is, $f(A)v$ can be approximated in the Krylov subspace \eqref{maxresKry} to any desired precision. Since the span designates all finite linear combinations, this also means that all functions in our functional calculus can be approximated in the space \eqref{reskrysp} to any arbitrary precision, if we let $n$ go to infinity.
\begin{theorem} \label{fAinclK}
For all $v \in X$ and all functions $f \in \mathcal{M}$, we have
\[
   f(A)v \in \overline{\mathcal{K}_\infty((\gamma-A)^{-1},v)}\,.
\]
\end{theorem}
\begin{proof}
If we define
\[
Y:=\overline{\mathcal{K}_\infty((\gamma-A)^{-1},v)}\,, 
\]
then $Y$ is an invariant subspace of $(\mu-A)^{-1}$ for all $\mu > 0$ (cf. proof of Theorem~4.6.1 in \cite{Mikl98}). Hence, we have 
\[
 (\mu -A)^{-1}y \in Y \quad \mathrm{for~all} \quad y \in Y\,,~ \mu > 0\,.  
\]
Theorem~4.6.1 in \cite{Mikl98} now states that $Y$ is an invariant subspace of our semigroup $e^{tA}$, $t \geq 0$, and $A$. Furthermore, the restriction $\left. e^{tA} \right|_{Y}$ of the semigroup $e^{tA}$ to $Y$ is again a semigroup with generator $\left. A \right|_{Y}$ and $\left. A \right|_{Y}y=Ay$ for all $y \in \mathcal{D}(A) \cap Y =: \mathcal{D}(\left. A \right|_Y)$. For $f \in \widetilde{\mathcal{M}} \subseteq \mathcal{M}$, we thus find
\[
f(A)y=\int_0^\infty e^{sA}y \,\mathcal{F}f_{(0)}(s)\,ds = \int_0^\infty e^{s\left. A \right|_Y} y\, \mathcal{F}f_{(0)}(s)\,ds
= f\left( \left. A \right|_Y \right)y \in Y \quad \mbox{for all} \quad y \in Y.
\]
Since $v \in Y$, we obtain $f(A)v\in Y$. Now we proceed with the case of functions belonging to $\mathcal{M}$. By the definition of $\mathcal{M}$, we have for $f \in \mathcal{M}$ and all $y \in Y$ that
\[
  f(A)y=(1-A)^n \left( \frac{f(z)}{(1-z)^n} \right)(A)y = (1-A)^n g(A)y \quad \mbox{with} \quad g(z)=\frac{f(z)}{(1-z)^n}\,, \quad g \in \widetilde{\mathcal{M}}\,,
\] 
where $n$ has been chosen appropriately. Because of $Y$ being $A$-invariant, we obtain
\[
(\gamma-A)^{l}y=\left(\gamma-\left. A \right|_Y \right)^{l}y \quad \mbox{for all} \quad y \in \mathcal{D}\left( \left( \left. A\right|_Y \right)^l \right), \quad l \in \N\,.
\] 
By the first part of the proof, since $g \in \widetilde{\mathcal{M}}$, we can conclude for $y \in Y$ that
\[
f(A)y = (1-A)^n g(A)y = (1-A)^n g\left( \left. A \right|_Y \right)y= \left( 1-\left. A \right|_Y \right)^n g\left( \left. A \right|_Y \right)y
= f\left(\left. A\right|_Y \right)y \in Y.
\]
Again, due to $v \in Y$, the statement $f(A)v \in Y$ follows.
\end{proof}

In the case that an index $n_0$ exists for which the resolvent Krylov subspace is invariant, we obtain from Theorem~\ref{fAinclK}, that 
\[
   f(A)v \in \mathcal{K}_{n_0}((\gamma-A)^{-1},v)=\overline{\mathcal{K}_\infty((\gamma-A)^{-1},v)}\,.
\]
Thus, $f(A)v$ can  be represented exactly in the finite-dimensional space \eqref{reskrysp} with index $n = n_0$.

We also study subspaces of $X$ of the type 
\begin{equation} \label{smoothiv}
\mathcal{K}_\infty((\gamma-A)^{-1},(\gamma-A)^{-q}v), \qquad q = 1,2,3,\ldots
\end{equation}
with a smoothed initial vector. These spaces are usually different. For example, if $v \in X \backslash \mathcal{D}(A)$ holds true, then $v$ is in the space \eqref{maxresKry}, but $v$ is not in any of the spaces \eqref{smoothiv}, which are all subsets of $\mathcal{D}(A)$. An intriguing fact is that the closures of the spaces \eqref{smoothiv} are identical and coincide with the closure of \eqref{maxresKry}. Hence, from a numerical analyst's point of view, if $w \in X$ can be approximated to an arbitrary precision in any of the spaces \eqref{maxresKry} or \eqref{smoothiv}, then $w$ can be approximated in all spaces to an arbitrary precision.
\begin{lemma} For every $q =1,2,3,\ldots$ and $v \in X$, we have
\[
\overline{\mathcal{K}_\infty((\gamma-A)^{-1},(\gamma-A)^{-q}v)} = \overline{\mathcal{K}_\infty((\gamma-A)^{-1},v)}\,. 
\]
\end{lemma}
\begin{proof}
If we set
\begin{equation} 
Y:=\overline{\mathcal{K}_\infty((\gamma-A)^{-1},(\gamma-A)^{-1}v)}\,,
\end{equation}
then we have, analogously to the previous proof, that
\[
 (\mu -A)^{-1}y \in Y \quad \mathrm{for~all} \quad y \in Y\,,~ \mu > 0\,.  
\]
Obviously, $(\gamma-A)^{-1}v \in Y$ and hence $(\gamma-\mu)(\mu-A)^{-1}(\gamma-A)^{-1}v \in Y$. By the resolvent equation (cf. (1.2) on page 239 in \cite{engelnagel00}), it follows
\[
(\mu-A)^{-1}v = (\gamma-A)^{-1}v+(\gamma-\mu)(\mu-A)^{-1}(\gamma-A)^{-1}v \in Y\,.
\]
Since $\mu > 0$ has been arbitrarily chosen, we have $\mu(\mu-A)^{-1}v \in Y$ for all $\mu > 0$. Due to the well-known fact that
\[
  \lim_{\mu \rightarrow \infty} \mu(\mu-A)^{-1}v=v
\]
(e.g. Lemma 3.4, p.\,73 in \cite{engelnagel00}), we find $v \in Y$, since $\mu(\mu-A)^{-1}v \in Y$ and $Y$ is closed. This immediately shows our assertion for $q=1$. The statement for $q > 1$ now follows by induction.
\end{proof}

\section{Smoothing operators with range in the resolvent Krylov subspace} \label{sec:smoothing}

We study in this section, how well an initial vector $v \in \mathcal{D}(A^q)$ can be approximated in different resolvent Krylov subspaces. These bounds will be necessary to prove our main theorems. The constants occurring in the following bounds and estimates will always be generic constants denoted by $C(param_1, param_2, \ldots)$, where the terms in brackets indicate the parameters on which $C$ depends.

The first lemma provides an error estimate for the approximation of $v \in \mathcal{D}(A^q)$ in the special resolvent Krylov subspace $\mathcal{K}_q((\sqrt{n}-A)^{-1}, (\sqrt{n}-A)^{-q}v)$.

\begin{lemma}\label{smoothop} There are bounded operators $H_{n,q}$ of the form
\[
H_{n,q} = \sum_{k=q}^{2q-1} h_k^q\left( \frac{\sqrt{n}}{\sqrt{n}-A} \right)^k, \quad
h_k^q= \binom{2q-1}{k} \sum_{l=0}^{k-q} \binom{k}{l}(-1)^l=\binom{2q-1}{k}\binom{k-1}{k-q}(-1)^{k-q}\,,
\]
such that, for all $v \in \mathcal{D}(A^q)$, we have
\[
\|H_{n,q}v-v\| \leq \frac{C(q,N)}{n^{\frac{q}{2}}} \|A^qv\|
\quad \text{and} \quad 
\|H_{n,q}\| \leq C(q,N)\,,
\]
where the constants depend only on $q$ and the bound $N$ of the bounded semigroup, but not on $n$. 
\end{lemma}
\begin{proof}
The coefficients $h_k^q$, $k = q, \ldots, 2q-1$, are chosen such that
\[
  g(z) := \frac{1-\sum_{k=q}^{2q-1} h_k^q (1-z)^{-k}}{z^q}
\]
can be continued to a holomorphic function on $\C\backslash \{1\}$. One can check that $g(z)$ is a linear combination of $(1-z)^{-q}, (1-z)^{-(q+1)}, \ldots, (1-z)^{-(2q-1)}$. For any generator $B$ of a bounded semigroup $e^{tB}$ with $\|e^{tB}\| \leq N$, we have $\|(1-B)^{-1}\| \leq N$ (cf. Theorem 1.10 on page 55 in \cite{engelnagel00}) and thus
\[
\left\| \frac{1-\sum_{k=q}^{2q-1} h_k^q (1-B)^{-k}}{B^q}\right\| \leq C(q,N)\,.
\]
We will now use this estimate for $B = \frac{1}{\sqrt{n}} A$, which generates a semigroup satisfying $\|e^{\frac{t}{\sqrt{n}} A}\| \leq N$ to bound the difference $\| H_{n,q}v-v\|$.
Since $g \in \mathcal{M}$, $1 \in \mathcal{M}$ and $\sum_{k=q}^{2q-1} h_k^q (1-z)^{-k} \in \mathcal{M}$ are functions that belong to our extended functional calculus, we obtain according to Lemma~\ref{btlemma4}
\begin{eqnarray*}
\left\| H_{n,q}v-v\right\| &=& 
\left\| 
   \left( 
      1-\sum_{k=q}^{2q-1} h_k^q
	\left(\frac{\sqrt{n}}{\sqrt{n}-A}\right)^k 
   \right)v 
\right\| \\[1ex]
&\leq& 
\left\|
\frac{
      1-\sum_{k=q}^{2q-1} h_k^q
      \left(1-\frac{1}{\sqrt{n}}A\right)^{-k} 
}{
\left( \frac{1}{\sqrt{n}} A\right)^q
}
\right\|  \cdot \left\|\left( \tfrac{1}{\sqrt{n}} A\right)^qv\right\|
\leq  \frac{C(q,N)}{n^{\frac{q}{2}}}\|A^qv\|\,.
\end{eqnarray*}
The bound on $H_{n,q}$ follows, since $\|(\sqrt{n}-A)^{-1}\|\leq N/\sqrt{n}$ (e.g. Theorem~1.10 on page 55 in \cite{engelnagel00}) and therefore $\| \sqrt{n} (\sqrt{n}-A)^{-1} \| \leq N$.
\end{proof}

In the next lemma, we study the best approximation $W_n$ to $\sqrt{n}(\sqrt{n}-A)^{-1}$ in the resolvent subspace
\begin{equation} \label{reskryop}
\mathcal{R}_n(\gamma,A) := \mathrm{span} \left\{ (\gamma-A)^{-1}, (\gamma-A)^{-2}, \ldots, (\gamma-A)^{-n}\right\}, \quad \gamma > 0\,.
\end{equation}

\begin{lemma} \label{smoothapprox}
For any $p \in \N$ and any $n \in \N$, there are operators $W_n$ of the form 
\[
W_n = \sum_{k=1}^n w_k^n \frac{1}{(\gamma-A)^k} 
\in \mathcal{R}_n(\gamma,A)
\quad \text{with} \quad w_k^n \in \C
\]
such that
\[
\left\| \frac{\sqrt{n}}{\sqrt{n}-A}-W_n \right\| 
\leq \frac{C(\gamma,p,N)}{n^{\frac{p}{2}}}
\quad \text{and} \quad \|W_n\| \leq C(\gamma,p,N)
\]
with $n$-independent generic constants $C(\gamma,p,N)$.
\end{lemma}

\begin{proof}
We estimate the best approximation in the space \eqref{reskryop}. This best approximation exists, since the space is finite. By standard calculations with the resolvent, we obtain
\[
\mathcal{R}_m(\gamma,A) = \mathrm{span} \left\{ (\gamma-A)^{-1}, A(\gamma-A)^{-2}, \ldots, A^{m-1}(\gamma-A)^{-m} \right\},
\quad \gamma > 0\,.
\]
\begin{comment}
by standard calculations with the resolvent, namely,
\begin{align*}
\frac{A^{k-1}}{(\gamma-A)^k} 
&= \frac{1}{\gamma-A}\cdot \frac{A^{k-1}}{(\gamma-A)^{k-1}} 
 = \frac{1}{\gamma-A}\left[ \frac{\gamma}{\gamma-A}-I \right]^k 
 = (-1)^{k-1} \sum_{l=0}^{k-1} \binom{k-1}{l} \frac{(-\gamma)^l}{(\gamma-A)^{l+1}} \in \mathcal{R}_k 
\end{align*}
and
\begin{align*}
\frac{1}{(\gamma-A)^k} 
&= \frac{1}{\gamma^{k-1}}\cdot \frac{1}{\gamma-A} \cdot
   \left( \frac{\gamma}{\gamma-A}-I+I \right)^{k-1} 
 = \frac{1}{\gamma^{k-1}}\cdot \frac{1}{\gamma-A} \cdot
   \left( \frac{A}{\gamma-A}+I \right)^{k-1}  \\
&= \frac{1}{\gamma^{k-1}} \sum_{l=0}^{k-1} \binom{k-1}{l} \frac{A^l}{(\gamma-A)^{l+1}} \in 
\mathrm{span} \left\{ (\gamma-A)^{-1}, \ldots, A^{m-1}(\gamma-A)^{-m}\right\}\,.   
\end{align*}
\end{comment}
We now proceed analogously to the proof of Theorem~4.1 in \cite{ratkryphi11}. By using
\begin{align*}
  \frac{\sqrt{n}}{\sqrt{n}-A} &= \sqrt{n} \int_0^\infty e^{sA} e^{-\sqrt{n}s}\,ds\,, \\[1ex]
  \frac{A^{m-1}}{(\gamma-A)^m} &= \int_0^\infty e^{sA} e^{-\gamma s}(-1)^{m-1}L_{m-1}(\gamma s)\,ds
\end{align*}
with the $m$-th Laguerre polynomial
\[
L_m(x)=\sum_{k=0}^m \binom{m}{k} \frac{(-1)^k}{k!}\,x^k,
\]

it follows
\[
\left\| \frac{\sqrt{n}}{\sqrt{n}-A}-\sum_{k=1}^m a_k \frac{A^{k-1}}{(\gamma-A)^k} \right\| 
\leq \frac{N}{\gamma} \cdot E_m \big( e^s \mathcal{F}f_{(0)}(\tfrac{s}{\gamma}) \big)\,, 
\quad e^s\mathcal{F}f_{(0)}(\tfrac{s}{\gamma})=\sqrt{n}e^{(1-\frac{\sqrt{n}}{\gamma})s},
\] 
where $\mathcal{F}f_{(0)}$ is the Fourier transform of $f(z) = \frac{\sqrt{n}}{\sqrt{n}-z}$ restricted to $\text{Re}~z = 0$. It remains to estimate
\[
E_m \big( e^s \mathcal{F}f_{(0)}(\tfrac{s}{\gamma}) \big)
= \inf_{a_1,\ldots,a_m} 
\big\| e^{-s} \big( \sqrt{n}e^{(1-\frac{\sqrt{n}}{\gamma})s} - \sum_{k=1}^m a_k (-1)^{k-1} L_{k-1}(s) \big) \big\|_1\,.  
\]
Let $L_{\omega_0}^1(\R)$ be the space of Lebesgue integrable functions with respect to the weight function $\omega_0$. Moreover, we equip the space $W_r^1(\omega_0) := \left\{ g \in L_{\omega_0}^1(\R)\,:\, \left\| g^{(r)}\varphi^r\omega_0\right\|_1 < \infty \right\}$ with the norm
\[
\|g\|_{W^1_r(\omega_0)} := \| g\omega_0\|_1 + \|g^{(r)}\varphi^r\omega_0 \|_1\,,
\quad \text{where} \quad \varphi(s) = \sqrt{s}\,, \quad \omega_0(s) = e^{-s}.
\]
According to \cite{JoNguy89}, there exists for any $r \geq 1$ a constant $C(r)$ such that we have for any $g \in W_r^1(\omega_0)$
\[
E_m(g) \leq \frac{C(r)}{m^{\frac{r}{2}}} \|g^{(r)}\varphi^r\omega_0\|_1\,, 
\]
where $C(r)$ neither depends on $m$ nor on $g$. Our function 
\[
g(s)=e^s\mathcal{F}f_{(0)}(\tfrac{s}{\gamma})=\sqrt{n}e^{(1-\frac{\sqrt{n}}{\gamma})s}, 
\]
is even smoother and we obtain
\begin{align*}
\| g^{(r)}(s)(\sqrt{s})^r e^{-s} \|_1 
&= 
\sqrt{n}\int_0^\infty \left| e^{-s} \left( 1-\frac{\sqrt{n}}{\gamma} \right)^r s^{ \frac{r}{2}} e^{\left( 1-\frac{\sqrt{n}}{\gamma} \right)s} \right| \,ds \\[1ex]
&=
\sqrt{n} \left|  1-\frac{\sqrt{n}}{\gamma}\right|^r
\int_0^\infty s^{\frac{r}{2}}e^{-\tfrac{\sqrt{n}}{\gamma}s}\,ds \\[1ex]
&=
\sqrt{n} \left|  1-\frac{\sqrt{n}}{\gamma}\right|^r \cdot \frac{\gamma}{\sqrt{n}}\cdot \left(\frac{\gamma}{\sqrt{n}}\right)^{\frac{r}{2}}
\int_0^\infty s^{\frac{r}{2}}e^{-s}\,ds \\[1ex]
&= 
\gamma \left(\frac{\sqrt{n}}{\gamma}\right)^{\frac{r}{2}}
\left|  \frac{\gamma}{\sqrt{n}}-1\right|^r \Gamma\left( \tfrac{r}{2}+1\right).
\end{align*}
Hence, we have
\[
E_m(g) \leq C(\gamma,r) \left( \frac{\sqrt{n}}{m}\right)^{\frac{r}{2}}  \left|  \frac{\gamma}{\sqrt{n}}-1\right|^r \Gamma\left( \tfrac{r}{2}+1\right)
\]
and therefore with the choice $r=2p$ and $m=n$
\[
E_n(g) \leq C(\gamma,2p) \frac{p!}{n^{\frac{p}{2}}}  \left| \frac{\gamma}{\sqrt{n}}-1\right|^{2p} \leq \frac{C(\gamma,p)}{n^{\frac{p}{2}}}\,.
\]
Choosing the coefficients $a_k$ in accordance with the coefficients $w_k^n$ that belong to a best approximation, the first statement is proved. Since
\[
\left\| \sum_{k=1}^n w_k^n \frac{1}{(\gamma-A)^k} \right\|
\leq
\left\| \frac{\sqrt{n}}{\sqrt{n}-A}\right\| + 
\left\| 
\frac{\sqrt{n}}{\sqrt{n}-A}-\sum_{k=1}^n w_k^n \frac{1}{(\gamma-A)^k}
\right\| \leq N+C(\gamma,p) = C(\gamma,p,N)
\]
the second statement is an immediate consequence.
\end{proof}

The choice $\gamma=\sqrt{n}$ in Lemma~\ref{smoothapprox} obviously gives error zero, since the resolvent $\sqrt{n}(\sqrt{n}-A)^{-1}$ can be represented exactly in the resolvent subspace $\mathcal{R}_n(\sqrt{n},A)$.

We now continue with two further lemmas that state how well a vector $v \in \mathcal{D}(A^q)$ can be approximated in resolvent Krylov subspaces of type \eqref{smoothiv}. 

\begin{lemma} \label{smoothprep} There exist operators $\tilde{S}_{n,q}$ with 
\[
\tilde{S}_{n,q}v \in \mathcal{K}_{(2q-1)(n-1)+q}((\gamma-A)^{-1}, (\gamma-A)^{-q}v)
\]
such that for all $v \in \mathcal{D}(A^q)$ and $n \in \N$ the bounds
\[
\|\tilde{S}_{n,q} v - v\| 
\leq \frac{C(\gamma,q,N)}{n^{\frac{q}{2}}}( \|v\|+\|A^qv\|)\,,
\quad \|\tilde{S}_{n,q}\| \leq C(\gamma,q,N)\,,
\]
hold true with constants $C(\gamma,q,N)$ not depending on $n$. Moreover, we have
\[
A^l\tilde{S}_{n,q} v=\tilde{S}_{n,q}A^lv 
\quad \mbox{for} \quad v \in \mathcal{D}(A^l)\,.
\]
\end{lemma}

\begin{proof}
We choose the coefficients $h_k^q$ as in Lemma~\ref{smoothop} and set
\[
\tilde{S}_{n,q} = \sum_{k=q}^{2q-1} h_k^q W_n^k\,,
\quad h_k^q = \binom{2q-1}{k} \binom{k-1}{k-q} (-1)^{k-q}\,,
\]
where the $W_n^k$ are the $k$-th powers of the operators $W_n$ in Lemma~\ref{smoothapprox}. Since these operators $W_n$ are uniformly bounded according to Lemma~\ref{smoothapprox}, it is clear that the operators $\tilde{S}_{n,q}$ are uniformly bounded with respect to $n$ as well. From the definition of $W_n$, we conclude
\[
A^l W_n v = W_n A^l v
\quad \mbox{for all} \quad v \in \mathcal{D}(A^l)\,,
\]
and hence the same holds true for $\tilde{S}_{n,q}$. For fixed $q$, let now $v \in \mathcal{D}(A^q)$ be arbitrary. It follows
\[
\|\tilde{S}_{n,q}v-v\| 
\leq \|\tilde{S}_{n,q}-H_{n,q}\| \|v\|+ \|H_{n,q}v-v\| 
\leq \|\tilde{S}_{n,q}-H_{n,q}\| \|v\| + \frac{C(q,N)}{n^{\frac{q}{2}}} \|A^qv\|
\]
with Lemma~\ref{smoothop}. Since we can write
\[
W_n^k - \left( \frac{\sqrt{n}}{\sqrt{n}-A} \right)^k=\sum_{l=0}^{k-1} W_n^{k-l-1}\left( W_n- \frac{\sqrt{n}}{\sqrt{n}-A} \right)
\left( \frac{\sqrt{n}}{\sqrt{n}-A}\right)^l,
\]
and since $W_n$ and $\sqrt{n}(\sqrt{n}-A)^{-1}$ are bounded independently of $n$, we obtain with Lemma~\ref{smoothapprox} 
\[
\biggl\|W_n^k-\left( \frac{\sqrt{n}}{\sqrt{n}-A}\right)^k\biggr\| 
\leq \frac{C(\gamma,q,N)}{n^{\frac{q}{2}}} \quad \mbox{for}\quad k=q,\ldots,2q-1\,,
\]
and therefore
\[
\|\tilde{S}_{n,q}-H_{n,q}\| \leq \frac{C(\gamma,q,N)}{n^{\frac{q}{2}}}\,.
\]
Altogether, the first bound in our lemma is proved. Due to the special form of the operators $W_n$, the statement
$\tilde{S}_{n,q}v \in \mathcal{K}_{(2q-1)n-(q-1)}((\gamma-A)^{-1}, (\gamma-A)^{-q}v)$
is clear.
\end{proof}

\begin{lemma} \label{smoothfinal} There exist operators $S_{n,q}$ with 
\[
S_{n,q}v \in \mathcal{K}_{\lfloor\frac{n}{2}\rfloor}((\gamma-A)^{-1}, (\gamma-A)^{-q}v)
\]
such that for all $v \in \mathcal{D}(A^q)$ and $n \geq 2q$, we have
\[
\|S_{n,q} v - v\| \leq \frac{C(\gamma,q,N)}{n^{\frac{q}{2}}}\left( \|v\|+\|A^qv\|\right)\,,
\quad \|S_{n,q}\| \leq C(\gamma,q,N)
\]
with $n$-independent constants and
\[
A^l S_{n,q} v = S_{n,q} A^l v 
\quad \mbox{for} \quad v \in \mathcal{D}(A^l).
\]
\end{lemma}

\begin{proof}
This is an immediate result of Lemma~\ref{smoothprep} by setting
$S_{n,q}:= \tilde{S}_{\lfloor\frac{n-2q}{2(2q-1)}\rfloor+1,q}$.
\end{proof}

Lemma~\ref{smoothfinal} basically says that one can approximate a vector $v \in \mathcal{D}(A^q)$ in about half of the Krylov subspace $\mathcal{K}_n((\gamma-A)^{-1},(\gamma-A)^{-q}v)$ and retaining a convergence according to the smoothness of $v$. The operator $S_{n,q}$ might therefore be seen as a smoothing projecting operator because of $S_{n,q}v \in \mathcal{D}(A^{2q})$ for $v\in \mathcal{D}(A^q)$.

\section{Approximation properties of the semigroup in Banach spaces} \label{sec:approxBanach}

We study in this section the best approximation of $e^Av$ in the resolvent Krylov subspace $\mathcal{K}_n((\gamma-A)^{-1},v)$ dependent on the smoothness of the vector $v$. 
\begin{theorem} \label{theo_bestapprox_expA}
Let $A$ be the generator of a bounded semigroup with bound $N$. Then we have 
\[
\inf_{r \in \frac{\mathcal{P}_{n-1}}{(\gamma-\cdot)^{n-1}}} \|e^{A}v-r(A)v \| 
\leq \frac{C(\gamma,q,N)}{n^{\frac{q}{2}}} (\|v\|+\|A^qv\|)
\quad \mathrm{for~all} \quad v \in \mathcal{D}(A^q)\,,
\]
where $C(\gamma,q,N)$ does not depend on $n$.
\end{theorem}

\begin{proof} With the smoothing operator $\tilde{v}_n:=S_{n,q}v$, $n \geq 2q$, from Lemma \ref{smoothfinal}, it follows
\begin{align*}
\| e^{A}v - r(A)v \| 
&\leq \|e^{A} (S_{n,q}v-v)\| + \|e^{A}\tilde{v}_n-r(A)v\| \\[1ex]
&\leq \frac{C(\gamma,q,N)}{n^\frac{q}{2}} (\|v\|+\|A^qv\|) + \|e^{A}\tilde{v}_n-r(A)v\|
\end{align*}
and thus
\[
\inf_{r \in \frac{\mathcal{P}_{n-1}}{(\gamma-\cdot)^{n-1}}} \|e^{A}v-r(A)v\| 
\leq \frac{C(\gamma,q,N)}{n^\frac{q}{2}} (\|v\| + \|A^qv\|) 
+ \inf_{r \in \frac{\mathcal{P}_{n-1}}{(\gamma-\cdot)^{n-1}}} \|e^{A}\tilde{v}_n-r(A)v\|\,.
\]
It remains to bound the second term on the right. Since $\tilde{v}_n \in \mathcal{K}_{\lfloor\frac{n}{2}\rfloor}((\gamma-A)^{-1}, (\gamma-A)^{-q}v)$,
we have for arbitrary coefficients $b_0,\ldots,b_{q-1}$, $a_1,\ldots,a_{\lfloor\frac{n}{2}\rfloor-q} \in \C$ that
\[
r(A)v = b_0 \tilde{v}_n + b_1 A \tilde{v}_n + \cdots + b_{q-1} A^{q-1} \tilde{v}_n 
+ \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} a_k \frac{1}{(\gamma-A)^k} A^q \tilde{v}_n
\in \mathcal{K}_n((\gamma-A)^{-1},v)\,.
\]
In the following, we use an approximation result given in \cite{ratkryphi11} for the so-called $\varphi$-functions
\begin{equation} \label{eq_phi}
\varphi_k(z) = \frac{1}{z^k} \biggl( e^z - \sum_{j=0}^{k-1} \frac{z^j}{j!} \biggr)\,,
\quad k = 1, 2, \ldots\,,
\end{equation}
that belong to $\widetilde{\mathcal{M}}$ and fit in the functional calculus introduced above. We leave $a_1,\ldots,a_{\lfloor\frac{n}{2}\rfloor-q}$ arbitrary and choose $b_j = 1/j!$, $j = 0, \ldots, q-1$, according to the sum in \eqref{eq_phi} to obtain
\begin{align*}
e^A \tilde{v}_n 
&- 
( b_0 + b_1 A \tilde{v}_n + \cdots + b_{q-1} A^{q-1} \tilde{v}_n )
- \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} a_k \frac{1}{(\gamma-A)^k} A^q \tilde{v}_n \\[-1ex]
&= 
\varphi_q(A) A^q \tilde{v}_n 
- \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} a_k \frac{1}{(\gamma-A)^k} A^q \tilde{v}_n\,.
\end{align*}
Now we have for $n > 2q+1$ the estimate
\begin{align*}
\biggl\| 
\varphi_q(A) A^q \tilde{v}_n
- \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} a_k \frac{1}{(\gamma-A)^k} A^q \tilde{v}_n \biggr\|
&\leq 
\biggl\| 
\varphi_q(A) - \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} a_k \frac{1}{(\gamma-A)^k}
\biggr\|
\| A^q \tilde{v}_n \| \\[1ex]
&\leq 
\frac{C(\gamma,q)}{\left(\lfloor\frac{n}{2}\rfloor-q\right)^{\frac{q}{2}}}
 \| A^q \tilde{v}_n \|
\leq 
\frac{C(\gamma,q,N)}{n^{\frac{q}{2}}} \| A^q \tilde{v}_n \|\,,
\end{align*}
where we used Theorem 4.2 in \cite{ratkryphi11} for the second inequality. Due to
\[
A^q \tilde{v}_n = A^q S_{n,q} v = S_{n,q} A^q v 
\quad \text{and} \quad
\|A^q\tilde{v}_n\| = \|S_{n,q}A^qv\| \leq C(\gamma,q,N) \|A^qv\|\,,
\]
we find for $ n > 2q+1$ that
\[
\inf_{r \in \frac{\mathcal{P}_{n-1}}{(\gamma-\cdot)^{n-1}}} 
\|e^{A} \tilde{v}_n - r(A)v\| 
\leq \frac{C(\gamma,q,N)}{n^{\frac{q}{2}}} \|A^qv\| 
\leq \frac{C(\gamma,q,N)}{n^{\frac{q}{2}}} (\|v\|+\|A^qv\|)\,. 
\]
Since this bound holds true up to finitely many numbers, adjusting the constant renders the bound true for all $n \in \N$ and our theorem is proved. 
\end{proof}

\begin{remark}
A discussion on a suitable choice of the shift $\gamma$ in the resolvents of the rational approximations to the $\varphi$-functions can be found in \cite{GG13}. 
\end{remark}

\section{Smoothness-detection by the resolvent Krylov subspace method} \label{sec:detect}

Let $A$ be a linear operator on a Hilbert space $H$ with $\mathrm{Range}(\lambda-A)=H$ for some $\lambda$ with $\mathrm{Re}\,\lambda >0$ and
\[
\mbox{Re}\,(Ax,x) \leq 0\
\quad \text{for all} \quad x \in \mathcal{D}(A)\,.
\]
By the Lumer-Phillips theorem for Hilbert spaces (e.g. Corollary 4.3.11 on page 186 in \cite{Mikl98}), $A$ is the generator of a contraction $C_0$-semigroup with
\[
\|e^{tA}\| \leq 1
\quad \text{for all} \quad t \geq 0\,,
\]
i.e. a bounded semigroup with $N=1$.
We designate by $P_n$ the orthogonal projection onto $\mathcal{K}_n((\gamma-A)^{-1},v)$ and by $\An=P_nAP_n$ the restriction of $A$ to this subspace. For simplicity, we assume in this section that $v \in \mathcal{D}(A)$, and therefore $\mathcal{K}_n((\gamma-A)^{-1},v) \subseteq \mathcal{D}(A)$. Then $\An$ also satisfies
\[
\mbox{Re}\,(\An x,x) \leq 0 
\quad \text{for all} \quad x \in \mathcal{K}_n((\gamma-A)^{-1},v)
\]
as well as $\mathrm{Range}(\lambda-\An)=H$ for some $\lambda$ with $\mathrm{Re}\,\lambda >0$, and therefore generates a contraction semigroup. Hence, our functional calculus can be applied to functions of $A$ as well as $\An$. 

The next theorem gives an upper bound for the approximation of the operator $\varphi$-function of $A$ times $v \in \mathcal{D}(A^q)$ in the resolvent Krylov subspace $\mathcal{K}_n((\gamma-A)^{-1},v)$. More precisely, we approximate $\varphi_j(A)v$ by $\varphi_j(\An)v$, where $\varphi_j$ is for $j = 1, 2, \ldots$ the $\varphi$-function defined above in \eqref{eq_phi} and $\varphi_0$ denotes the exponential function.

\begin{theorem} \label{theo_detect} Let $\An=P_nAP_n$, where $P_n$ is the orthogonal projection onto the resolvent Krylov subspace 
$\mathcal{K}_n((\gamma-A)^{-1},v)$. For $v \in \mathcal{D}(A^q)$ and $j \geq 0$, we have
\[
\|\varphi_j(A)v-\varphi_j(\An)v\| 
\leq \frac{C(\gamma,q,j)}{n^{\frac{j+q}{2}}} (\|v\|+\|A^qv\|)\,,
\]
where $C(\gamma,q,j)$ does not depend on $n$.
\end{theorem}

\begin{proof} Let $v \in \mathcal{D}(A^q)$ and $k \geq 0$ be arbitrary. To bound $\|\varphi_j(A)v-\varphi_j(\An)v\|$, we use as a first step our smoothing operator $\tilde{v}_n:=S_{n,q}v$, $n > 2q+1$ w.l.o.g., and turn this difference into
\begin{equation} \label{split_difference}
\| \varphi_j(A)v - \varphi_j(\An)v \| 
\leq \| \varphi_j(A)\tilde{v}_n - \varphi_j(\An) \tilde{v}_n \|
+ \| \big[ \varphi_j(A) - \varphi_j(\An)\big] (\tilde{v}_n-v) \|.
\end{equation}
In the following, both terms will be bounded separately. We start with the second term. Since
\[
\tilde{v}_n-v \in \mathcal{K}_{\lfloor\frac{n}{2}\rfloor+q}((\gamma-A)^{-1},v)\,,
\]
and since the resolvent Krylov subspace approximation is exact for every rational function $r(z) = p_{n-1}(z)/(\gamma-z)^{n-1}$, $p_{n-1}(z) \in \mathcal{P}_{n-1}$ (see \cite{Beckermann_Reichel09}), we have for every function $r_1(z)$ of the form
\[
r_1(z) = \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} a_k \frac{z^{k-1}}{(\gamma-z)^k}
\]
that
\[
r_1(A) (\tilde{v}_n-v)
= \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k \frac{A^{k-1}}{(\gamma-A)^k} (\tilde{v}_n-v)
= \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k \frac{\An^{k-1}}{(\gamma-\An)^k} (\tilde{v}_n-v)
= r_1(\An) (\tilde{v}_n-v)\,.
\]
Choosing $r_1$ as the best approximation to $\varphi_j$ in the sense of our functional calculus, we can estimate
\begin{align*}
\left\| \big[ \varphi_j(A) - \varphi_j(\An) \big] (\tilde{v}_n-v) \right\| 
& \leq 
\big( \|\varphi_j(A) - r_1(A)\| + \|\varphi_j(\An) - r_1(\An)\| \big) \| \tilde{v}_n-v \|  \\

& \leq \frac{C(\gamma,j)}{\left(\lfloor\frac{n}{2}\rfloor-q\right)^{\frac{j}{2}}}
\| \tilde{v}_n-v \| 
\leq 
\frac{C(\gamma,q,j)}{n^{\frac{j}{2}}} \| \tilde{v}_n - v \|\,,
\end{align*}
where we used Theorem~4.2 in \cite{ratkryphi11} for the second inequality.
Note that for the case $j = 0$ the terms $\|e^A-r_1(A)\|$ and $\|e^{\An}-r_1(\An)\|$ are just bounded by generic constants $C(\gamma,q)$. With Lemma \ref{smoothfinal}, we finally obtain
\begin{equation} \label{maintheo:eq1}
\left\| \big[ \varphi_j(A) - \varphi_j(\An) \big] (\tilde{v}_n-v) \right\| 
\leq \frac{C(\gamma,q,j)}{n^{\frac{j}{2}}} \| S_{n,q}v-v \|
\leq \frac{C(\gamma,q,j)}{n^{\frac{j+q}{2}}} (\|v\|+\|A^qv\|)\,.
\end{equation}
It remains to bound the first term on the right-hand side of \eqref{split_difference}. For this purpose, we first remark that we have
\[
b_0 \tilde{v}_n + b_1 A \tilde{v}_n + \cdots + b_{q-1} A^{q-1} \tilde{v}_n
+ \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k \frac{1}{(\gamma-A)^k} A^q \tilde{v}_n \in \mathcal{K}_n((\gamma-A)^{-1},v)
\]
due to the special choice of our smoothing operator $\tilde{v}_n$. We define a second function $r_2(z)$ by
\[
r_2(z) 
= b_0 + b_1 z + \cdots + b_{q-1} z^{q-1} + r_1(z)
= b_0 + b_1 z + \cdots + b_{q-1} z^{q-1} +
\sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} a_k \frac{z^{k-1}}{(\gamma-z)^k}\,.
\]
Then the exactness property of the resolvent Krylov subspace approximation yields
for an arbitrary choice of the coefficients $b_k$ and $a_k$ that

\[
r_2(A) \tilde{v}_n = r_2(\An) \tilde{v}_n
\]
and therefore 
\[
\| \varphi_j(A) \tilde{v}_n - \varphi_j(\An) \tilde{v}_n \| 
\leq \| \varphi_j(A) \tilde{v}_n - r_2(A)\tilde{v}_n\|
+ \| \varphi_j(\An) \tilde{v}_n - r_2(\An) \tilde{v}_n \|\,.
\]
We now choose $b_0,\ldots,b_{q-1}$ according to the Taylor series of $\varphi_j$ and obtain with 
\[
\varphi_j(z) - \sum_{k=0}^{q-1} \frac{z^k}{(j+k)!} = z^q \varphi_{j+q}(z)
\]
and Lemma~\ref{btlemma4} that 
\begin{align*}
\varphi_j(A) \tilde{v}_n - r_2(A) \tilde{v}_n 

&= 
\varphi_{j+q}(A) A^q \tilde{v}_n 
- \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k \frac{A^{k-1}}{(\gamma-A)^k} A^q \tilde{v}_n\,, \\
\varphi_j(\An) \tilde{v}_n - r_2(\An) \tilde{v}_n 
&= 

\varphi_{j+q}(\An) \An^q \tilde{v}_n
- \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k \frac{\An^{k-1}}{(\gamma-\An)^k} \An^q \tilde{v}_n\,.
\end{align*}
Hence, we have with our functional calculus
\begin{align*}
\| \varphi_j(A) \tilde{v}_n - r_2(A) \tilde{v}_n \| 
& \leq 
\biggl\| \varphi_{j+q}(A) - \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k \frac{A^{k-1}}{(\gamma-A)^k} \biggr\| 
\| A^q \tilde{v}_n \| \\
& \leq 
\| \mathcal{F}\varphi_{j+q,(0)}(s) - 
\sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k(-1)^{k-1} e^{-\gamma s} L_{k-1}(\gamma s) \|_1 
\| A^q \tilde{v}_n \|\,.
\end{align*}
Exactly the same calculation holds true for $\An$ and we conclude altogether
\begin{align*}
& \| \varphi_j(A) \tilde{v}_n - \varphi_j(\An) \tilde{v}_n \| \\ 
& \leq \| \mathcal{F}\varphi_{j+q,(0)}(s) 
- \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k(-1)^{k-1} e^{-\gamma s} L_{k-1}(\gamma s) \|_1 
\big( \| A^q \tilde{v}_n \| + \| \An^q \tilde{v}_n \| \big)
\end{align*}
for all choices of the coefficients $a_k$. By the exactness property, we have $\An^q\tilde{v}_n = A^q\tilde{v}_n$ and hence 
\[
\| \varphi_j(A) \tilde{v}_n - \varphi_j(\An) \tilde{v}_n \| 
\leq 2 \| \mathcal{F}\varphi_{j+q,(0)}(s) 
- \sum_{k=1}^{\lfloor\frac{n}{2}\rfloor-q} 
a_k(-1)^{k-1} e^{-\gamma s} L_{k-1}(\gamma s) \|_1 
\| A^q \tilde{v}_n \|\,.
\]
By using Theorem 4.2. in \cite{ratkryphi11}, we thus obtain
\[
\| \varphi_j(A) \tilde{v}_n - \varphi_j(\An) \tilde{v}_n \| 
\leq
\frac{C(\gamma,j)}{\left(\lfloor\frac{n}{2}\rfloor-q\right)^{\frac{j+q}{2}}}
\| A^q \tilde{v}_n \|
\leq
\frac{C(\gamma,q,j)}{n^{\frac{j+q}{2}}} \| A^q \tilde{v}_n \|\,.
\]
Since 
\[
A^q \tilde{v}_n = A^q S_{n,q}v = S_{n,q}A^qv\,, 
\quad \| A^q \tilde{v}_n \| \leq C(\gamma,q) \| A^qv \|,
\]
we finally have
\begin{equation} \label{maintheo:eq2}
\| \varphi_j(A) \tilde{v}_n - \varphi_j(\An) \tilde{v}_n \|
\leq \frac{C(\gamma,j,q)}{n^{\frac{j+q}{2}}} \| A^q v \| 
\leq \frac{C(\gamma,j,q)}{n^{\frac{j+q}{2}}} \big( \|v\| + \|A^qv\| \big)\,.
\end{equation}
With \eqref{maintheo:eq1} and \eqref{maintheo:eq2}, our statement is proved.
\end{proof}

How $\varphi_k(\An)v$ can be represented with the help of quasi-matrices when an orthonormal basis of the approximation space $\mathcal{K}_n((\gamma-A)^{-1},v)$ is known, is described in \cite{GG13}.

In view of abstract evolution equations, we are usually interested in the approximation of $e^{\tau A}v$ or $\varphi_j(\tau A)v$ for $v \in \mathcal{D}(A^q)$ and $\tau > 0$. In this case, all the above results remain valid, we only have to replace $A$ by $\tau A$ anywhere. 

Moreover, all presented results for the semigroup $e^{\tau A}$ applied to some initial data $v~\in~\mathcal{D}(A^q)$ transfer to the discrete case, that is, to the approximation of $e^{\tau A_N}\Psi_0$, where $A_N$ is the discretization matrix of the differential operator $A$ and $\Psi_0$ is the discretized initial value $v$. Since the error bounds do not depend on $\|A\|$, we obtain a convergence rate that is independent of the spatial grid.

\section{Numerical experiments} \label{sec:NumExp}

We illustrate our theoretical findings by a finite-difference discretization in Subsection~\ref{subsec:FD} as well as by a finite-element discretization of a wave equation in Subsection~\ref{subsec:FE}. Besides these illustrations, our theory provides an explanation for the behavior observed in several applications. For example, the grid-independent convergence of the rational Krylov method for the solution of Maxwell's Equations in photonic crystal modeling in \cite{Botchev16} is explained by our analysis. 

\subsection{Finite-difference discretization of the wave equation} \label{subsec:FD}

We consider the standard wave equation on the unit square $\Omega=(0,1)^2$ with homogeneous Dirichlet boundary conditions written as a system of first-order
\begin{equation} \label{wavestd_1storder}
y'(t) = \left[ \begin{array}{c}
           u(t) \\
           u'(t)
        \end{array} \right]'
      = \left[ \begin{array}{cc}
            0 & I \\
            \Delta & 0
        \end{array} \right]
        \left[ \begin{array}{c}
           u(t) \\
           u'(t)
        \end{array} \right]
      = A y(t)\,, \quad
y(0) = y_0 = \left[ \begin{array}{c}
                u_0 \\
                u_0'
             \end{array} \right].
\end{equation}
The operator $A$ on the Hilbert space  $\mathcal{D}(\sqrt{-\Delta})\times L^2(\Omega)$ equipped with the inner product  
\begin{equation} \label{skalprodhomwave}
  (v,w)=(\sqrt{-\Delta}\,v_1,\sqrt{-\Delta}\,w_1)_{L^2(\Omega)}+(v_2,w_2)_{L^2(\Omega)}\,,
\end{equation}
where $v=[v_1,v_2]^T$ and $w=[w_1,w_2]^T$, satisfies the properties of Section~\ref{sec:detect} and therefore generates a contraction semigroup (or more exactly, a $C_0$-group). The domain of the operator $A$ reads $\mathcal{D}(A)=\mathcal{D}(\Delta) \times \mathcal{D}(\sqrt{-\Delta})$ and, with standard Sobolev spaces, $\mathcal{D}(A)=(H^2(\Omega)\cap H_0^1(\Omega) ) \times H_0^1(\Omega)$. By $\| \cdot \|$, we denote the norm induced by the inner product defined in \eqref{skalprodhomwave}. 
The $q$-dependent initial values $y_0^q$ with $u_0 = u'_0 = g_0^q / \|[g_0^q, g_0^q]^T\|$, where
\[

g_0^q : \left\{
  \begin{array}{rcl}
     (0,1)^2 & \rightarrow & \R\,, \\[1ex]
     (x,y) & \mapsto & x^{2q}(1-x)^{2q}y^{2q}(1-y)^{2q}\,,
  \end{array}
\right.
\]

satisfy $y_0^q \in \mathcal{D}(A^q)$ and  $y_0^q \not\in \mathcal{D}(A^{q+1})$.

In order to illustrate and verify our theory numerically, we discretize the operator $A$ via finite differences on the grid $(ih,jh)$, $i,j=1,\ldots,d$ with $h=\frac{1}{d+1}$, which leads to a system of the type above with the matrix
\[
A_{N}=\left[
   \begin{array}{cc}
    0 & I_{N} \\
   \Delta_{N} & 0
   \end{array} 
\right] \in \R^{2N \times 2N}, \quad 
\Delta_{N}=\frac{1}{h^2}(T_d \otimes I_d + I_d \otimes T_d)\,, \quad 
T_d=\mbox{tridiag}(1,-2,1),
\]
where $\otimes$ is the Kronecker product. The matrix $\Delta_{N} \in \R^{N \times N}$ is the standard discretization with the five-point stencil for the Laplacian. We deal with the space $\R^{2N}$ equipped with the inner product  
\begin{equation} \label{skalprodfd}
  (\Psi,\Theta)_h=h^2(\sqrt{-\Delta_{N}}\,\Psi_1,\sqrt{-\Delta_{N}}\,\Theta_1)_2+h^2(\Psi_2,\Theta_2)_2 =h^2(-\Delta_{N}\,\Psi_1,\Theta_1)_2+h^2(\Psi_2,\Theta_2)_2\,,
\end{equation}
where $\Psi=[\Psi_1,\Psi_2]^T$ and $\Theta=[\Theta_1,\Theta_2]^T$, $\Psi_i, \Theta_i \in \R^{N}$, $i=1,2$, and $(\cdot, \cdot)_2$ designates the standard Euclidean inner product in $\R^{N}$. The matrix $A_{N}$ also satisfies the assumptions in Section~\ref{sec:detect}.
We define discretizations of the initial values $y_0^q$ by
\[
\Psi^q = \left[
  \begin{array}{c}
   \Psi_{1}^q \\[1ex]
   \Psi_{2}^q
  \end{array}
\right], \quad 
\Psi_i^q = \frac{1}{\|[g_0^q, g_0^q]^T\|} \big( g_0^q(ih,jh) \big)_{i,j=1}^d \in \R^{N}
\quad \text{for} \quad i =1, 2\,.
\]

For these initial values, we have 
\[
\|\Psi^q\|_h \leq C\|y_0^q\| 
\quad \text{and} \quad
\|A_{N}^q \Psi^q \|_h \leq C\|A^qy_0^q\|\,, 
\] 
where $\|\cdot\|_h$ is the norm induced by the inner product \eqref{skalprodfd} and $C$ is a generic constant that does not depend on $N$. Therefore, the error of the resolvent Krylov subspace approximation to the matrix exponential measured in the discrete norm is bounded independently of $N$ according to our Theorem~\ref{theo_detect} as
\[
 \|e^{\tau A_{N}}\Psi^q-e^{\tau \An}\Psi^q\|_h \leq \frac{C(\gamma,q)}{n^{\frac{q}{2}}}(\|y_0^q\|+\tau^q\|A^qy_0^q\|)
\]
with $\An = P_n A_N P_n$, where $P_n$ is the orthogonal projection onto $\mathcal{K}_n( (\gamma-\tau A_N)^{-1}, \Psi^q)$. 
Note that the right-hand side with the continuous values, does not depend on $N$.
This worst case sublinear convergence can be clearly observed in the numerical results in Figure~\ref{fig_fd_limit} with $\tau=0.5$, where the error in the discrete norm is shown over the dimension of the Krylov subspace for discretizations of $A$ with $d=15,31,127,255,511,1023,2047$, leading to matrices $A_{N}$ from size $450 \times 450$ to size $8,380,418 \times 8,380,418$. For the smaller matrices with $d=15$ and $d=31$, the convergence is faster than predicted. For the remaining matrices up to size $8,380,418 \times 8,380,418$, the predicted sublinear convergence can be seen. Furthermore, the convergence is faster for the smoother initial value $\Psi^4$ on the right-hand side of Figure~\ref{fig_fd_limit} compared to $\Psi^2$ on the left-hand side, which also fits perfectly to our theorem. For a suitable space discretization, this behavior is always to be expected. In Figure~\ref{fig_fdmg_timings}, the error of the backward Euler method and the resolvent Krylov subspace method, respectively, is shown versus the computing time in minutes for the discretization with dimension $8,380,418$. The resolvents have been computed by a multigrid method and the exact solution for the computation of the error has been calculated by a discrete fast Fourier transform.  
\begin{figure}
\caption{Error versus Krylov subspace dimension for the approximation of $e^{\tau A_{N}
\label{fig_fd_limit}
\end{figure}

\begin{figure}
\caption{Error versus time in minutes for the approximation of $e^{\tau A_{N}
\label{fig_fdmg_timings}
\end{figure}

\subsection{Finite-element discretization of a wave equation on a non-standard domain} \label{subsec:FE}

For a trapezoidal domain $\Omega$ with a slit in the upper half, we consider the two-dimensional wave equation
\[
u''(t) = \Delta u(t) - u(t)\,, \quad u(0) = u_0\,, \quad u'(0) = u'_0
\]
with homogeneous Neumann boundary conditions which can be represented by the first-oder system 
\begin{equation} \label{wave_1storder}
y'(t) = \left[ \begin{array}{c}
           u(t) \\
           u'(t)
        \end{array} \right]'
      = \left[ \begin{array}{cc}
            0 & I \\
            \Delta - I & 0
        \end{array} \right]
        \left[ \begin{array}{c}
           u(t) \\
           u'(t)
        \end{array} \right]
      = A y(t)\,, \quad
y(0) = y_0 = \left[ \begin{array}{c}
                u_0 \\
                u_0'
             \end{array} \right],
\end{equation}
where $\Delta$ is the Laplacian including the boundary conditions. 
It can be shown that $A$ is the generator of a contraction semigroup with respect to the inner product analogous to \eqref{skalprodhomwave}, where the operator $\sqrt{-\Delta}$ is replaced by $\sqrt{I-\Delta}$. The domain of $A$ is given by $\mathcal{D}(A) = \mathcal{D}(\Delta) \times \mathcal{D}(\sqrt{I-\Delta})$. We use here the equivalent norms that are commonly used for finite elements. For $v = [ v_1, v_2 ]^T$ and $w = [ w_1, w_2 ]^T$ with $v_1, w_1 \in H^1(\Omega)$, $\nabla_n v_1 = \nabla_n w_1 = 0$ on $\partial \Omega$ and $v_2, w_2 \in L^2(\Omega)$, the inner product reads
\[
(v,w)= (\nabla v_1, \nabla w_1)_{L^2(\Omega)}+ (v_1,w_1)_{L^2(\Omega)} + (v_2,w_2)_{L^2(\Omega)}\,.
\]
We solve equation \eqref{wave_1storder} numerically by using finite elements with $N$ linear nodal basis functions $\phi_k \in H^1(\Omega)$, $k = 1, \ldots, N$. This leads to the semi-discrete formulation
\begin{equation} \label{wave_discrete}
\left[ \begin{array}{cc}
   M & 0 \\
   0 & M        
\end{array} \right]
\left[ \begin{array}{c}
   \Psi_1(t) \\
   \Psi_2(t)       
\end{array} \right]'
=
\left[ \begin{array}{cc}
   0 & M \\
   S-M & 0        
\end{array} \right]
\left[ \begin{array}{c}
   \Psi_1(t) \\
   \Psi_2(t)       
\end{array} \right], \quad
\left[ \begin{array}{c}
   \Psi_1(0) \\
   \Psi_2(0)       
\end{array} \right]
=
\left[ \begin{array}{c}
   \Psi_{1,0} \\
   \Psi_{2,0}       
\end{array} \right],
\end{equation}
where the vectors $\Psi_1(t), \Psi_2(t) \in \R^N$ are the coordinate vectors for $u(t)$ and $u'(t)$. The mass matrix $M \in \R^{N \times N}$ and the stiffness matrix $S \in \R^{N \times N}$ are defined by $(M)_{jk} = (\phi_j,\phi_k)_{L^2(\Omega)}$ and $(S)_{jk} = -(\nabla\phi_j,\nabla\phi_k)_{L^2(\Omega)}$ for $j, k = 1, \ldots, N$. Multiplying \eqref{wave_discrete} from the left with the inverse of the block diagonal matrix $\text{diag}(M,M)$, we end up with the initial value problem 
\[
\Psi'(t) = A_N \Psi(t)\,, \quad \Psi(0) = \Psi_0
\]
with $\Psi(t) = [ \Psi_1(t), \Psi_2(t) ]^T$ and $\Psi_0 = [ \Psi_{1,0}, \Psi_{2,0} ]^T$. For the initial data $y_0^q$ in \eqref{wave_1storder}, we choose $u_0 = u'_0 = g_0^q/\|[g_0^q,g_0^q]^T\|$ with
\[
g_0^q : \left\{
  \begin{array}{rcl}
     \Omega & \rightarrow & \R\,, \\[1ex]
     (x,y) & \mapsto & (x+1)^{2q} (x-1)^{2q} (y-1)^{2q} (y-2)^{2q}\,,
  \end{array}
\right.
\]
where $y_0^q \in \mathcal{D}(A^q)$ but $y_0^q \not\in \mathcal{D}(A^{q+1})$. For the initial data used in our numerical experiment, we evolved $y_0^q$ with the given wave equation for time $\tau = 0.5$. Its discrete counterpart, depicted in Figure~\ref{fig_wave_initial&tau3} on the left-hand side, we denote by $\Psi_0^q$. Moreover, we show on the right-hand side the numerical solution for time $\tau = 3$. In Figure~\ref{fig_wave_error}, the obtained error curves are plotted for a coarse grid with 31,232 triangles and 160,323 nodes as well as a fine grid with 499,712 triangles and 251,520 nodes. As parameters, we have chosen the time step size $\tau = 0.05$ and the smoothness indices $q=1$ and $q=3$.

In Figure~\ref{fig_wave_error}, the obtained error curves for the approximation of $e^{\tau A_N} \Psi_0^q$ in the Krylov subspace $\mathcal{K}_n((15-\tau A_N)^{-1}, \Psi_0^q)$ are plotted for the coarse grid as well as for the a fine grid. As parameters, we have chosen the time step size $\tau = 0.05$ and the smoothness indices $q = 1$ and $q = 3$. The linear systems with the matrix $15 - \tau A_N$ were solved again by a multigrid method.

\begin{figure}
\caption{Initial value $\Psi_{1,0}
\label{fig_wave_initial&tau3}
\end{figure}

\begin{figure}
\caption{Plot of the error versus dimension of the Krylov subspace $\mathcal{K}
\label{fig_wave_error}
\end{figure}

 

\section{Conclusion} \label{sec:conclusion}

In this work, we could show that the resolvent Krylov subspace method is suitable for the approximation of a large set of operator functions. For the semigroup and related operator functions, convergence rates dependent on the smoothness of the initial data have been presented. In contrast to standard methods, the faster convergence for smoother initial data is automatic, that is, the method does not need to be altered in any way to achieve the faster convergence for smoother initial data. The theoretical findings have been illustrated by numerical experiments.   

 

\end{document}