text:
\section{Case Studies}
\label{sec:case}
One of our main results is proving linear dependence of the sample complexity on the state space dimensions (with all other variables fixed).

To validate this phenomenon empirically, we generate a sequence of closed-loop matrices $(\hat{A}_{1}^{\pi} (n),\hat{A}_{2}^{\pi} (n))_{n \in \mathbb{N}}$ such that $\hat{A}_{1}^{\pi} (n) =\gamma I_n$, and $\hat{A}_{2}^{\pi} (n)=c I_n$, where we assign $\gamma=0.9$ and $c=2$,
as well as $\varrho:=10$ (as defined in Theorem~\ref{thm:t1}).
Specifically, we consider the SLDSs \eqref{eq:slcs}, with size of the state space $n$ varying from $n=1:2000$, with increments of 50, and $M=2$ state regions, resulting in
\begin{align*}
x_{t+1} (n)&=\hat{A}_{1}^{\pi} (n)x_{t}(n) +w_{t}^1(n), \qquad \text{if } \|x_{t}(n)\|>\varrho \\ x_{t+1}(n)&=\hat{A}_{2}^{\pi} (n) x_{t}(n)+w_{t}^2(n), \qquad \text{ if }  \|x_{t}(n)\|\leq \varrho,
\end{align*}
where $w_{t}^1(n)$ and $w_{t}^2(n)$ are appropriate $n$ dimensional Gaussians as discussed in Section~\ref{sec:mixing}.
With an accuracy parameter $\epsilon:=1e-10$ (from~\eqref{eq:t-d-N}) we define our pseudo sample complexity for state space of size $n$  as the smallest $N(n) \in \mathbb{N}$ such that \begin{equation}
\left|\frac{1}{N(n)} \sum_{t=0}^{N(n)}r(x_{t}(n))-\frac{1}{N(n)+1} \sum_{t=0}^{N(n)+1}r(x_{t}(n))\right| < \epsilon.
\end{equation}

We simulated 100000 independent trials for every considered size of the state space varying from $n=1:2000$ and averaged the pseudo sample complexity for a more accurate description i.e, $N^{a}(n) := \frac{\sum_{i=1}^{100000} N_{i}(n) }{100000}$, where `$i$' represents each independent trial. As shown in Figure~\ref{fig:2figsA}, in higher dimensions sample complexity depends linearly on dimensions of the state space.
Another important factor is the dependence on `$\gamma$'. We repeated the aforementioned procedure with $10000$ independent trials and same system dynamics, but with `$\gamma$'  varied from $0.5$ to $0.9$ with increments of $0.05$; the obtained results are shown in Figure~\ref{fig:2figsB}. Our results from Figure~\ref{fig:2figsB} validate that the sample complexity degrades with an increase in $\gamma$ as captured in Theorem~\ref{thm:thm3}.

\begin{figure}[!t]
\centering
\parbox{6.6cm}{
\includegraphics[width=6.6cm]{lubbar.eps}
\vspace{-12pt}
\caption{Average pseudo-sample complexity v.s. the state-space dimension.}
\label{fig:2figsA}}
\hspace{6pt}
\begin{minipage}{6.8cm}
\includegraphics[width=6.8cm,height=4.0cm]{dimgamf.eps}
\caption{Average pseudo-sample complexity v.s. `$\gamma$, for varying state-space dimension}
\label{fig:2figsB}
\end{minipage}
\end{figure}

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

We showed existence of invariant ergodic measure for closed-loop switched linear dynamical systems, which are stable in an unbounded subset of the state-space. In addition, we derived non-asymptotic bounds for learning the expected reward from time-averages.
With all other parameters fixed, we showed that the  sample complexity of learning the expected reward (w.r.t the ergodic invariant measure the closed-loop switched linear dynamical systems mixes to) is linear to the state-space size and inverse quadratic in the approximation error $\epsilon$ (i.e.,~$\Omega(\frac{n}{\epsilon^2})$); hence, extending existing  non-asymptotic results to a class of nonlinear dynamical systems. By learning the expected reward instead of a value function parameterized by a discount factor, we provided a non-asymptotic analysis that is  valid for applications that require minimizing asymptotic~rewards.

\section{Acknowledgement}
This work is sponsored in part by the AFOSR under award number FA9550-19-1-0169, as well as the NSF CNS-1652544 and CNS-1837499 awards.

config: arxiv


TITLE: Polynomial map on sphere is smooth
QUESTION [0 upvotes]: This is from Problem 2 from Milnor's "Topology from a differentiable viewpoint".

Show that every complex polynomial of degree $n$ gives rise to a smooth map from the Gauss sphere $S^2$ to itself of degree $n$.

My candidate for the desired map $f$ is the natural one: We can project $S^2\backslash\{N\}$ ($N$ is the North pole) onto the plane via the stereographic projection from $N$, do the polynomial map, then take the inverse projection. Then define $N\mapsto N$. It is clear that $f$ is smooth everywhere away from $N$.
To show that $f$ is smooth at $N$, I tried to consider the other chart of this map, by projecting $S^2\backslash \{S\}$ from the South pole $S$. If we decompose the polynomial map $P:\mathbb{C}\to \mathbb{C}$ to $(Q,R):\mathbb{R}^2\to \mathbb{R}^2$, then the map $f$ on this chart is
$$(x,y)\mapsto \begin{cases} \left(\frac{Q(\frac{x}{x^2+y^2},\frac{y}{x^2+y^2})}{Q(\frac{x}{x^2+y^2},\frac{y}{x^2+y^2})^2+R(\frac{x}{x^2+y^2},\frac{x}{x^2+y^2})^2},\frac{R(\frac{x}{x^2+y^2},\frac{y}{x^2+y^2})}{Q(\frac{x}{x^2+y^2},\frac{y}{x^2+y^2})^2+R(\frac{x}{x^2+y^2},\frac{x}{x^2+y^2})^2}\right) &\text{ if }(x,y)\neq (0,0)\\
(0,0) &\text{ if }(x,y)=(0,0)\end{cases}.$$
Maybe we can discuss the derivatives at $(0,0)$, but I can't see a clean argument in this way. I also think that there maybe something about an analytic continuation to $(0,0)$ since the function defined on $\mathbb{R}^2\setminus (0,0)$ is rational, but I am not familiar with this type of argument.
Any help to find a smooth map/show that my map is smooth at $(0,0)$ is greatly appreciated!

REPLY [1 votes]: The resulting rational function is much easier to analyze in complex form, where the transition map $\tau$ between the two steriographic projections has the form $\tau(z)=z/|z|^2$, or, more simply $\tau(z)=1/\overline{z}$, where $\overline{z}$ is the complex conjugate of $z$. Let $P(z)=p_0+p_1z+\cdots+p_dz^d$ be the polynomial of interest (with $p_d\neq 0$), and $Q=\tau\circ P\circ\tau$. We then have
$$
Q(z)=\frac{1}{\overline{P(1/\overline{z})}}=\frac{1}{\sum_{n=0}^d\overline{p}_n/z^n}=\frac{z^d}{\sum_{n=1}^d\overline{p}_nz^{d-n}}
$$
We see that the resulting function is a complex rational, and the constant term in the denominator is $\bar{p}_d\neq 0$. Clearly, then, there is no issue extending $Q$ smoothly to $0$.


TITLE: How does ZFC define functions?
QUESTION [2 upvotes]: I found the following definition on Wikipedia.
Is it the most common definition?
How is the definition usually notated?

A function f from X to Y is a subset of the Cartesian product X × Y subject to the following condition: every element of X is the first component of one and only one ordered pair in the subset. In other words, for every x in X there is exactly one element y such that the ordered pair (x, y) is contained in the subset defining the function f. This formal definition is a precise rendition of the idea that to each x is associated an element y of Y, namely the uniquely specified element y with the property just mentioned.

REPLY [10 votes]: $\sf ZFC$ doesn't define anything. It's just a mathematical theory, whose language includes only one extralogical binary relation symbol denoted by $\in$.
Mathematicians, in particular set theorists, define things in the language of $\sf ZFC$ which are interpreted as functions.
Set theorists see functions as sets of ordered pairs. We say that $f$ is a function if:

$f$ is a set of ordered pairs.
If $(x,y)$ and $(x,z)$ are both in $f$, then $y=z$.

Then we write $f\colon X\to Y$ if:

$f$ is a subset of the cartesian product $X\times Y$, which is the same as saying that $(x,y)\in f$, then $x\in X$ and $y\in Y$.
$f$ is a function.
For every $x\in X$ there is some $y$ such that $(x,y)\in f$. We also denote this $y$ as $f(x)$.

So how do we define ordered pairs? Well, there are several ways, the best known is the definition given by Kuratowski:
$$(x,y) = \biggl\{\{x\},\{x,y\}\biggr\}$$
We can check to see that this definition satisfies all the properties of an ordered pair, and therefore it is a good definition. Now the definition of a function is complete. We have the properties that we want, and we have the implementation of these properties.
However! Note that the definition of an ordered pair, or even a function, is just an abstract definition. There are just some properties that we want a function to satisfy, and any interpretation which adheres to these "axioms" or "definition" is worthy of the name function (or ordered pair).
So whenever we write a proof in set theory, we really write a schema for a proof, where one later on plugs in the definition of an ordered pair, and the definition of a function, and so on and so forth. Occasionally we will require a particular interpretation, but as long that we know that such interpretation exists it's fine.

REPLY [5 votes]: ZFC doesn't define anything; it's just a theory of sets. In particular, every object in a model of the theory of sets is (by definition) a set.
The idea is: there is a notion of 'function' inherent to mathematics: a function $f$ is an entity which associates two sets, say $X$ and $Y$, by assigning to each element $x \in X$ an element $f(x) \in Y$. Simple as that.
The problem is that 'entity' isn't good enough, we need it to be a set. How do we formalise this notion? Well associated with every function $f : X \to Y$ is its graph. In the case of $f : \mathbb{R} \to \mathbb{R}$ this really is its graph: you draw a pair of axes, which give you the plane $\mathbb{R}^2$, and then the graph of $f$ is a certain subset of $\mathbb{R}^2$. Every function has a graph, and given the graph of a function we can recover the function from the graph, so identifying a function with its graph seems like a sensible thing to do.
So, when we formalise the notion of a 'function' in the language of set theory, we can define it to be a subset $f \subseteq X \times Y$ satisfying precisely the conditions needed for this subset to be the graph of a function. We can then think of $\langle x,y \rangle \in f$ as meaning $y=f(x)$, because the graph is precisely the set of pairs $\langle x, f(x) \rangle$ for $x \in X$.
What this means is that: $f$ is a function $X \to Y$ if and only if $f \subseteq X \times Y$ such that, for each $x \in X$, there is a unique $y \in Y$ such that $\langle x,y \rangle \in f$.
This is probably the most common formalisation of a function in ZFC. But theoretically, any formalisation that allows you to (reversibly) encode the essence of being a function (i.e. assigning to each element of the domain an element of the codomain) would be just as good a formlisation as this one.

Another possible definition would use the cograph, which a partition of $X \sqcup Y$ (the disjoint union of $X$ and $Y$), all of whose components contain exactly one element of $Y$. Then $f(x)=y$ if and only if $x$ and $y$ lie in the same subset of the partition. (This is dual in a very precise sense to the graph.)

REPLY [1 votes]: A relation $R$ on $A,B$ is just an subset of $A\times B$, or we can say a relation is just a set with a bunch of ordered pairs.
A function $F$ is a relation with the following additional requirement:
$\forall x\forall y\forall z(\langle x,y\rangle\in F\wedge\langle x,z\rangle\in F\rightarrow y=z)$.
That is, the "value"  of $F$ to each $x$ must be unique. Then we may use the notation $F(x)$ to denote that unique object.


TITLE: Functions of Matrices History
QUESTION [1 upvotes]: I'm currently looking for some books or papers that talk about the history of the functions of matrices. Specifically, I'm looking for the history regarding sine and cosine of a matrix. I've already looked into the book by Nick Higham, Functions of Matrices.
Does anyone have any suggestions? Thanks!

REPLY [0 votes]: What about Schaums Outline Series??


TITLE: Exists infinitely many as a numerical-quantifier
QUESTION [3 upvotes]: On notation, at first I just write $\exists^{!\infty}$, later I changed to $\exists^\infty$, which one should I use $?$
And I'm thinking what does this really mean in first-order-logic$\dots$
My attempts (first formalize at least, at most, exact)
$\text{Let n $\in\mathbb{N}$, then }\exists^{\ge n}x,p(x) \text{ if and only if :}$
$$\exists x_1\dots x_n \text{ s.t.}\underbrace{(p(x_1)\wedge\dots\wedge p(x_n))}_{\text{$x_1\dots x_n$ satisfy $p$}}
\wedge\underbrace{(x_1\neq x_2\land\dots\land x_1\neq x_n)\wedge\dots\wedge(x_{n-1}\neq x_n)}_{\text{$x_1\dots x_n$ are distinct}}$$
$$\Leftrightarrow\underset{i=1}{\overset{n}{\exists}} x_i,(\bigwedge_{i=1}^np(x_i))\wedge(\bigwedge_{i=1}^{n-1}(\bigwedge_{j=i+1}^nx_i\neq x_j))$$
$\exists^{\le n}x,p(x) \text{ if and only if :}$
$$\exists^{<n+1}x,p(x)$$
$$\Leftrightarrow\neg(\exists^{\ge n+1}x,p(x))$$
$$\Leftrightarrow \underset{i=1}{\overset{n+1}{\forall}}x_i,(\bigvee_{i=1}^{n+1}\neg p(x_i))\vee(\bigvee_{i=1}^n(\bigvee_{j=i+1}^{n+1}x_i=x_j))$$
$\exists^{!n}x,p(x) \text{ if and only if :}$
$$\exists^{\ge n}x,p(x)\wedge\exists^{\le n}x,p(x)$$
$$\Leftrightarrow\exists^{\ge n}x,p(x)\wedge\neg(\exists^{\ge n+1}x,p(x))$$
$$\Leftrightarrow \underset{i=1}{\overset{n}{\exists}}x_i\forall x_{n+1}(p(x_{n+1})\leftrightarrow(\bigvee_{i=1}^nx_i=x_{n+1}))\wedge\bigwedge_{i=1}^{n-1}(\bigwedge_{j=i+1}^nx_i\neq x_j)$$

The idea is first we define at least $n$, then we notice that at most $n$ is just not (at least $n+1$), also notice exactly $n$ is just at least $n$ and at most $n$.

Then, to express exists infinitely many we can write
$\exists^{\infty}x,p(x)$ if and only if: $$\forall n\in\mathbb{N},\exists^{\ge n}x,p(x)$$
$$\Leftrightarrow \forall n\in\mathbb{N},\underset{i=1}{\overset{n}{\exists}} x_i,(\bigwedge_{i=1}^np(x_i))\wedge(\bigwedge_{i=1}^{n-1}(\bigwedge_{j=i+1}^nx_i\neq x_j))$$
And by taking negation, exists finitely many can be expressed as
$\exists^{<\infty} x, p(x)$ if and only if:
$$\exists n\in\mathbb{N},s.t.\exists^{\le n-1},p(x)$$
$$\Leftrightarrow \exists n\in\mathbb{N},s.t.\underset{i=1}{\overset{n}{\forall}}x_i,(\bigvee_{i=1}^{n} \neg p(x_i))\vee(\bigvee_{i=1}^{n-1}(\bigvee_{j=i+1}^{n}x_i=x_j))$$
Is this correct, any suggestion would be appreciated.

REPLY [8 votes]: The standard notation in logic would be $\exists^\infty$.
The exclamation mark ! is used to indicate uniqueness, $\exists^{!n} x\,\phi(x)$ being "there are exactly $n$ distinct elements $x$ such that $\phi(x)$". So, the standard reading of $\exists^{!\infty}x\,\phi(x)$ would be "there are exactly infinitely many $x$ such that..." which is awkward, as it is not very exact to simply say "infinitely many", since there are many options here. And if you are in a setting where the universe of discourse is countably infinite, for instance, then the "exactly" part is superfluous anyway.
You are correct that $\exists^{\infty}x\,\phi(x)$ is the same as $\forall n\,\exists^{\ge n}x\,\phi(x)$. This is the case regardless of whether you are in a situation where the axiom of choice holds. I mention this because using choice, $\exists^{\infty}x\,\phi(x)$ is equivalent to $Q_{\aleph_0}x\,\phi(x)$, where $\aleph_0=|\mathbb N|$ and, for a cardinal $\kappa$, $Q_\kappa x\,\phi(x)$ means that there are at least $\kappa$ distinct values of $x$ such that ... (The $Q_\kappa$ are called cardinality quantifiers in the literature.) However, if choice fails, a set may be infinite without containing a countably infinite subset.
(And just to avoid confusion, let me add the remark mentioned in comments: Although each $\exists^{\ge n}$ is first-order definable as shown in the question, $\exists^\infty$ is a genuinely new quantifier, meaning that it is not first-order definable by a formula. Otherwise, its negation ("there are only finitely many") would also be first-order definable, and an easy compactness argument gives us a contradiction: the theory $$\{\lnot\exists^\infty x\,(x=x)\land\exists^{\ge n}x\,(x=x)\mid n\in\mathbb N\}$$ is inconsistent but any finite subset is consistent.)


TITLE: Confusing situation while determining the range of a function containing a quadratic expression.
QUESTION [0 upvotes]: I am facing this problem in common for this type of functions. But let me pick an example to describe that. Say $f:R\rightarrow R,f(x)=x/(1+x^2)$. To find it's range, I am going to find the domain of the inverse function. $$y=x/(1+x^2)$$$$yx^2-x+y=0$$$$x=(1±\sqrt(1-4y^2))/2y...(1)$$ Here $1-4y^2$ must be greater or equal to zero for x being a real output.$$1-4y^2≥0$$$$-1/2≤y≤1/2$$So, this is the domain of my inverse function thus the range of f(x). But wait a minute, in this range, $y=0$ is also included. But that would make $x=0/0$ in $eq (1)$. which is indetermined. So I can't have $y=0$ in my domain of inverse function thus the range of the main function. But if $f(x) =x/(1+x^2)$ then $f(0)=0$, so there is no reason why I should leave out 0 from my range. And again from the definition of inverse function, we know that the range of the main function would be the domain of the inverse function. So $0$ being present in range f but being absent in the domain of inverse function doesn't seem acceptable. For every function that includes this type of quadratic equation in the denominator, I find this problem.

REPLY [1 votes]: The issue is the assumption you make when using the quadratic formula: specifically that it's being applied to a quadratic. Remember, $ax^2 + bx + c$ is a quadratic provided $a \neq 0$. If $a = 0$, the solution is radically different: $x = \frac{-c}{b}$, and nothing else. So, when you get to the step
$$yx^2 - x + y = 0,$$
before busting out the quadratic formula, ask first what happens in the case $y = 0$. You'll find that the one solution is $x = 0$. Otherwise, the equation is a quadratic, and you get
$$x = \frac{1 \pm \sqrt{1 - 4y^2}}{2y}$$
as before.
If you're careful to deal with edge cases like these, then you won't lose possibilities like $y = 0$.


text:
\section{Subset Product of Subgroups}
Tags: Subgroups, Subset Products, Subset Product of Subgroups

\begin{theorem}
Let $\struct {G, \circ}$ be a [[Definition:Group|group]].
Let $H, K$ be [[Definition:Subgroup|subgroups]] of $G$.
Then $H \circ K$ is a [[Definition:Subgroup|subgroup]] of $G$ {{iff}} $H$ and $K$ are [[Definition:Permutable Subgroups|permutable]].
That is:
$H \circ K$ is a [[Definition:Subgroup|subgroup]] of $G$ {{iff}}:
:$H \circ K = K \circ H$
where $H \circ K$ denotes [[Definition:Subset Product|subset product]].
\end{theorem}

config: wiki


text:
\begin{document}

\title[Magnetic virial. Morawetz, smoothing and Strichartz estimates]
{Magnetic virial identities, weak dispersion and Strichartz
inequalities}

\begin{abstract}
  We show a family of virial-type identities for the Schr\"odinger
  and wave equations with electromagnetic potentials. As a
  consequence, some weak dispersive inequalities in space dimension $n\geq3$,
  involving Morawetz
  and smoothing estimates, are proved; finally, we apply them to prove Strichartz
  inequalities for the wave equation with a non-trapping  electromagnetic
  potential with almost Coulomb decay.
\end{abstract}

\date{\today}

\author{Luca Fanelli}
\address{Luca Fanelli:
SAPIENZA Unversit$\grave{\text{a}}$ di Roma, Dipartimento di
Matematica, Piazzale A.~Moro 2, I-00185 Roma, Italy}
\email{fanelli@mat.uniroma1.it}

\author{Luis Vega}
\address{Luis Vega: Universidad del Pais Vasco, Departamento de
Matem$\acute{\text{a}}$ticas, Apartado 644, 48080, Bilbao, Spain}
\email{luis.vega@ehu.es}

\subjclass[2000]{35J10, 35L05, 58J45.}

\keywords{magnetic potentials, virial identities, weak dispersive
estimates, Strichartz estimates, Schr\"odinger equation, wave
equation}

\maketitle

\section{Introduction}\label{sec.introd}

In this paper, we consider electromagnetic Hamiltonians in the
standard covariant form
\begin{equation}\label{eq.H}
  H=-\nabla_A^2+V(x),
\end{equation}
where
\begin{equation}\label{eq.nablaa}
 \nabla_A=\nabla-iA,
 \qquad
 A=(A^1,\dots,A^n):\R^n\to\R^n
\end{equation}
and $V:\R^n\to\R$; the magnetic potential $A$ satisfies the Coulomb
gauge condition
\begin{equation}\label{eq.gauge}
  \text{div}A=0.
\end{equation}
Related to these Hamiltonians, we study the magnetic Schr\"odinger
equation
\begin{equation}\label{eq.schro}
  \begin{cases}
    iu_t(t,x)-Hu(t,x)=0
    \\
    u(0,x)=f(x),
  \end{cases}
\end{equation}
and the magnetic wave equation
\begin{equation}\label{eq.wave}
  \begin{cases}
    u_{tt}(t,x)+Hu(t,x)=0
    \\
    u(0,x)=f(x)
    \\
    u_t(0,x)=g(x),
  \end{cases}
\end{equation}
where in both cases the unknown is a function $u:\R^{1+n}\to\C$. We
are interested in weak dispersive phenomena for equations
\eqref{eq.schro} and \eqref{eq.wave}; in particular, we will point
our attention on the structures of $A$ and $V$ which allow the weak
dispersion.

In the family of weak dispersive estimates we find, among the
others, Morawetz and smoothing estimates.

For the free case $A\equiv 0\equiv V$, the Morawetz estimates are,
for $n\geq3$,
\begin{equation}\label{eq.morschrofree}
    \int_0^{+\infty}\int_{\R^n}\frac{\left|\partial_\tau
    e^{it\Delta}f\right|}{|x|}\leq\|f\|_{\dot H^\frac12}
\end{equation}
\begin{equation}\label{eq.morwavefree}
    \int_0^{+\infty}\int_{\R^n}\frac{\left|\partial_\tau
    e^{it\sqrt{-\Delta}}f\right|}{|x|}\leq\|f\|_{\dot H^1},
\end{equation}
where $\partial_\tau$ is the tangential derivative. Inequality
\eqref{eq.morwavefree} was proved in \cite{mor} for the Klein-Gordon
equation first, and then extended to the Schr\"odinger equation. We
also recall the smoothing estimates for the free equations
\begin{equation}\label{eq.smooschrofree}
    \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left|\nabla e^{it\Delta}f\right|^2\leq\|f\|_{\dot H^\frac12}
\end{equation}
\begin{equation}\label{eq.smoowavefree}
    \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left(\left|\partial_te^{it\sqrt{-\Delta}}f\right|^2
    +\left|\nabla e^{it\sqrt{-\Delta}}f\right|^2\right)\leq\|f\|_{\dot
    H^1}.
\end{equation}
Inequality \eqref{eq.smooschrofree} was proved independently in
\cite{cs}, \cite{s} and \cite{v}, and the proof can be easily
generalized to obtain \eqref{eq.smoowavefree}. We also mention the
paper \cite{pv}, in which  a proof of \eqref{eq.smoowavefree} for
the nonlinear wave equation based on a modification of Morawetz
ideas \cite{mor} is given. Extensions to the Schr\"odinger equation
were considered in \cite{brv} . However not so many results are
available for the magnetic case $A\neq0$; we mention \cite{brv1} \cite{pda-lf2},
\cite{ges}, \cite{GST} and \cite{ste} where Strichartz and smoothing
estimates for the magnetic Schr\"odinger and wave equations are
proved.

The aim of this paper  is to show, for non-trapping magnetic Hamiltonians, the relation
between virial identities and weak dispersion, in analogy with the
results in \cite{pv},  \cite{brv}, and \cite{brvv}.

All through the paper we will assume some regularity
assumptions on the Hamiltonian $H$.

{\bf (H1)} The Hamiltonian $H_A=-\nabla_A^2$ is essentially
self-adjoint on $L^2(\R^n)$, with form domain
\begin{equation*}
  D(H_A)=\left\{f: f\in L^2, \int|\nabla_Af|^2<\infty\right\}.
\end{equation*}

{\bf (H2)} The potential $V$ is a perturbation of $H_A$ in the
Kato-Rellich sense, i.e. there exists a small $\epsilon>0$ such that
\begin{equation}
  \|Vf\|_{L^2}\leq(1-\epsilon)\|H_Af\|_{L^2}+C\|f\|_{L^2},
\end{equation}
for all $f\in D(H_A)$.

Assumptions (H1), (H2) have several consequences about the existence
theory for equations \eqref{eq.schro}, \eqref{eq.wave}. First of
all, they imply the self-adjointness of $H$, by standard
perturbation techniques (see e.g. \cite{CFKS}); hence by the spectral
theorem we can define the Schr\"odinger and wave propagators
$S(t)=e^{itH}$, $W(t)=H^{-\frac12}e^{it\sqrt H}$. Moreover we can
define for any $s$ the distorted norms
\begin{equation*}
  \|f\|_{\dot{\mathcal H}^s}=\|H^{\frac s2}f\|_{L^2}.
  \qquad
  \|f\|_{\mathcal H^s}=\|f\|_{L^2}+\|H^{\frac s2}f\|_{L^2}.
\end{equation*}
Since $H$ and $H^s$ commute with each other, for any $s\geq0$, the
Schr\"odinger propagator $S(t)$ satisfy the family of conservation
laws
\begin{equation*}
  \|e^{itH}f\|_{\dot{\mathcal H}^s}=\|f\|_{\dot{\mathcal H}^s},
  \qquad
  s\geq0,
\end{equation*}
for all $t\in\R$. Similarly, the distorted wave energy
\begin{equation*}
  E(t)=\frac12\|u_t\|_{L^2}^2+\frac12\|u\|_{\dot{\mathcal H}^1}
\end{equation*}
is conserved on solutions of \eqref{eq.wave}.

For the validity of (H1) and (H2) see the standard reference
\cite{CFKS}.

In space dimension $n=3$ the magnetic field $B=\text{curl}A$ is a
physically relevant quantity for equations \eqref{eq.schro} and
\eqref{eq.wave}. In order to continue, we need to define the
analogous of $\text{curl}A$ in any space dimension; we give the
following definition.
\begin{definition}\label{def.B}
  For any $n\geq2$ the matrix-valued
  field $B:\R^n\to\mathcal M_{n\times n}(\R)$ is defined by
  \begin{equation*}
    B:=DA-DA^t,
    \qquad
    B_{ij}=\frac{\partial A^i}{\partial x^j}-\frac{\partial
    A^j}{\partial x^i}.
  \end{equation*}
  We also define the vector field $B_\tau:\R^n\to\R^n$ as follows:
  \begin{equation*}
    B_\tau=\frac{x}{|x|}B.
  \end{equation*}
\end{definition}
Hence $B$ is defined in terms of the anti-symmetric gradient of $A$.
In dimension $n=3$, the previous definition identifies
$B=\text{curl}\,A$, namely
  \begin{equation*}
    Bv=\text{curl}A\wedge v,
    \qquad
    \forall v\in\R^3.
  \end{equation*}
In particular, we have
  \begin{equation}\label{eq.curl}
    B_\tau=\frac{x}{|x|}\wedge\text{curl}\,A,
    \qquad n=3.
  \end{equation}
Hence $B_\tau(x)$ is the projection of $B=\text{curl}A$ on the
tangential space in $x$ to the sphere of radius $|x|$, for $n=3$.
Observe also that $B_\tau\cdot x=0$ for any $n\geq2$, hence $B_\tau$
is a tangential vector field in any dimension. Also notice that $A$
and $A+\nabla\psi$ produce the same $B$, for any $n\geq2$; actually,
in order to preserve the gauge invariance of our results, it is our
interest to give always assumptions in terms of $B$.

We can now state our main results.
\subsection{Magnetic virial identities}\label{subsec.virial}
They are convexity (in time) properties for certain relevant
quantities related to the solutions of these equations. A 3D-version
of the virial identity for the magnetic Schr\"odinger equation
appears in \cite{gon}, \cite{gon2}; in Theorem \ref{thm.virialS} we
present the generalization to any space dimension, while in Theorem
\ref{thm.virialW} we give the analogous identity for the magnetic wave
equation \eqref{eq.wave}.

We start with the Schr\"odinger equation.
\begin{theorem}[Virial for magnetic Schr\"odinger]\label{thm.virialS}
  Let $\phi:\R^n\to\R$ be a radial, real-valued multiplier,
  $\phi=\phi(|x|)$, and let
  \begin{equation}\label{eq.tetaS}
    \Theta_S(t)=\int_{\R^n}\phi|u|^2\,dx.
  \end{equation}
  Then, for
  any solution $u$ of the magnetic Schr\"odinger equation \eqref{eq.schro} with
  initial datum $f\in L^2,\ H_Af\in L^2$, the following virial-type identity holds:
  \begin{align}
    \ddot\Theta_S(t)= & 4\int_{\R^n}
    \nabla_AuD^2\phi\overline{\nabla_Au}\,dx-\int_{\R^n}|u|^2\Delta^2\phi\,dx
    \nonumber
    \\
    & -2\int_{\R^n}\phi'V_r|u|^2\,dx+4\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_Au}\,dx,
    \label{eq.virialS}
  \end{align}
  where
  \begin{equation*}
    \left(D^2\phi\right)_{jk}=\frac{\partial^2}{\partial x^j\partial
    x^k}\phi,
    \qquad
    \Delta^2\phi=\Delta(\Delta\phi),
  \end{equation*}
  for $j,k=1,\dots,n$, are respectively the Hessian matrix and the
  bi-Laplacian of $\phi$.
\end{theorem}
The analogous result for the wave equation \eqref{eq.wave} is the
following.
\begin{theorem}[Virial for magnetic wave]\label{thm.virialW}
  Let $\phi,\Psi:\R^n\to\R$, be  two radial, real-valued multipliers,
  and let
  \begin{equation}\label{eq.tetaW}
    \Theta_W(t)=\int_{\R^n}\left(\phi|u_t|^2+\phi|\nabla_Au|^2
    -\frac12(\Delta\phi)|u|^2\right)\,dx+\int|u|^2\phi V\,dx+\int|u|^2\Psi\,dx.
  \end{equation}
  Then, for any solution $u$ of the magnetic wave equation
  \eqref{eq.wave} with initial data $f,g\in L^2,\ H_Af,H_Ag\in L^2$,
  the following virial-type identity holds:
  \begin{align}
    \ddot\Theta_W(t)= & 2\int_{\R^n}\nabla_AuD^2\phi\overline{\nabla_Au}\,dx
    -\frac12\int_{\R^n}|u|^2\Delta^2\phi\,dx
    \nonumber
    \\
    &
    +2\int|u_t|^2\Psi\,dx-2\int|\nabla_Au|^2\Psi\,dx
    +\int|u|^2\Delta\Psi\,dx
    \nonumber
    \\
    &
    -\int\phi'V_r|u|^2\,dx+2\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_Au}\,dx.
    \label{eq.virialW}
  \end{align}
\end{theorem}

We give two immediate corollaries of the previous theorems.

\begin{corollary}\label{cor.var}
  Let $u$ be a solution of the magnetic Schr\"odinger
  equation \eqref{eq.schro} with $f\in L^2,\ H_Af\in L^2$. Then the {\it variance}
  \begin{equation*}
    Q(t)=\int_{\R^n}|x|^2|u|^2\,dx
  \end{equation*}
  satisfies the identity
  \begin{equation}\label{eq.variance}
    \ddot Q(t)=8\int_{\R^n}\left|\nabla_Au\right|^2\,dx
    -4\int_{\R^n}|x|V_r|u|^2\,dx
    +8\Im\int_{\R^n}|x|uB_\tau\cdot\overline{\nabla_Au}\,dx.
  \end{equation}
\end{corollary}

For the magnetic wave equation we have the following analogous
result:

\begin{corollary}\label{cor.onde}
  Let $u$ be a solution of the magnetic wave
  equation \eqref{eq.wave} with $f,g\in L^2,\ H_Af,H_Ag\in L^2$. Then the quantity
  \begin{equation*}
    Q(t)=\int_{\R^n}\left\{|x|^2\left(|u_t|^2+\left|\nabla_Au\right|^2+|u|^2V\right)-(n-1)|u|^2\right\}\,dx
  \end{equation*}
  satisfies the identity
  \begin{equation}\label{eq.ondevar}
    \ddot Q(t)=2\int_{\R^n}|u_t|^2+\left|\nabla_Au\right|^2\,dx-2\int
    V_r|u|^2\,dx
    +4\Im\int_{\R^n}uB_\tau\cdot\overline{\nabla_Au}\,dx.
  \end{equation}
\end{corollary}

The proofs of the corollaries are immediate applications of
identities \eqref{eq.virialS} and \eqref{eq.virialW} with the choice
$\phi(x)=|x|^2$, $\Psi\equiv1$.

The previous identities suggest that it is relevant to show examples
of potentials $A$ for which $B_\tau\equiv0$; we will focus our
attention on the 3D case.
\begin{example}\label{ex.coulomb}
 First we consider some singular potentials. Take
  \begin{equation}\label{eq.example}
    A=\frac1{x^2+y^2+z^2}(-y,x,0)=\frac{1}{x^2+y^2+z^2}(x,y,z)\wedge(0,0,1).
  \end{equation}
  We can check that
  \begin{equation*}
    \nabla\cdot A=0,
    \qquad
    B=-2\frac{z}{(x^2+y^2+z^2)^2}(x,y,z),
    \qquad
    B_\tau=0.
  \end{equation*}

  Another (more singular) example is the following:
  \begin{equation}\label{eq.example2}
    A=\left(\frac{-y}{x^2+y^2},\frac{x}{x^2+y^2},0\right)=
    \frac{1}{x^2+y^2}(x,y,z)\wedge(0,0,1).
  \end{equation}
  Here we have $B=(0,0,\delta)$, with $\delta$ denoting Dirac's delta function. Again we have $B_\tau=0$ .
\end{example}

\begin{example}\label{ex.biot}
  Now we show a natural generalization of the previous examples.
  Assume that $B=\text{curl}\,A:\R^3\to\R^3$ is known; since $\text{div}A=0$, we
  can reconstruct the potential $A$ using the {\it Biot-Savart}
  formula
  \begin{equation}\label{eq.BS}
    A(x)=\frac1{4\pi}\int\frac{x-y}{|x-y|^3}\wedge B(y)\,dy.
  \end{equation}
  Assume now that $B_\tau=0$, namely $x\wedge B(x)=0$; by
  \eqref{eq.BS} we have
  \begin{equation}\label{eq.BS2}
    A(x)=\frac x{4\pi}\wedge\int\frac{B(y)}{|x-y|^3}\,dy.
  \end{equation}
  To have $B_\tau=0$ it is necessary $B(y)=
  g(y)\frac{y}{|y|}$, for some scalar function $g:\R^3\to\R$. Since we want
  $A\neq0$, $g$ has not to be radial. As an example we
  consider
  \begin{equation*}
    g(y)=h\left(\frac{y}{|y|}\cdot\omega\right)|y|^{-\alpha},
  \end{equation*}
  for some fixed $\omega\in S^2$, where $h$ is homogeneous of degree
  0 and $\alpha\in\R$; consequently, the vector field $B$ is homogeneous of degree
  $-\alpha$. By \eqref{eq.BS2} we have
  \begin{equation}\label{eq.BS3}
    A(x)=\frac x{4\pi}\wedge\int\frac{h\left(\frac{y}{|y|}\cdot\omega\right)}
    {|x-y|^3|y|^\alpha}y\,dy.
  \end{equation}
  The potential $A$ is homogenous of degree $1-\alpha$, and by
  symmetry we have that $A(\omega)=0$. These examples can be easily extended to higher dimensions.
\end{example}

\subsection{Applications to dispersive estimates}\label{subsec.appl}
We pass to some applications of Theorems \ref{thm.virialS} and
\ref{thm.virialW} to weak dispersive estimates for \eqref{eq.schro}
and \eqref{eq.wave}. All the following results hold in dimension
$n\geq3$.

We need to introduce the following family of norms:
\begin{definition}\label{def.normetriple}
  For any $f:\R^3\to\R$ and $\alpha\in\R$ we define
  \begin{equation}\label{eq.normetriple}
    |||f|||_\alpha:=\int_0^{+\infty}\rho^{\alpha}\sup_{|x|=\rho}|f|\,d\rho.
  \end{equation}
\end{definition}
We state the following theorems.
\begin{theorem}[Weak dispersion for 3D Schr\"odinger]\label{thm.smooschro}
Let $n=3$; assume that
\begin{equation}\label{eq.small}
  |||B_\tau^2|||_3+|||V_r^+|||_2\leq\frac12.
\end{equation}
Then, for any solution $u$ of \eqref{eq.schro} with $f\in L^2,\
H_Af\in L^2$, the following estimate holds:
\begin{equation}\label{eq.smooschro}
  \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left|\nabla_Au\right|^2\,dx\,dt\leq
    C\|f\|^2_{\dot{\mathcal H}^{\frac12}}
\end{equation}
for some $C>0$. Moreover, if the strict inequality holds in
\eqref{eq.small}, we also have
\begin{align}
  & \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left|\nabla_Au\right|^2\,dx\,dt
    +\epsilon\int_0^{+\infty}\int_{\R^n}\frac{|\nabla_A^\tau u|^2}{|x|}\,dx\,dt
    \label{eq.smooschro+}
    \\
  &
  +\epsilon\sup_{R>0}\frac1{R^2}\int_0^{+\infty}\int_{|x|=R}|u|^2\,d\sigma\,dt
    \leq
    C\|f\|^2_{\dot{\mathcal H}^{\frac12}},
    \nonumber
\end{align}
for some $\epsilon>0$.
\end{theorem}
In higher dimension we prove the following Theorem.
\begin{theorem}[Weak dispersion for higher dimensional Schr\"odinger]\label{thm.smooschro4}
  Let $n\geq4$;
  assume that
  \begin{equation}\label{eq.ipbfin}
    |B_\tau(x)|\leq\frac{C_1}{|x|^2},
    \qquad
    |V_r^+(x)|\leq\frac{C_2}{|x|^3},
    \qquad
    C_1^2+2C_2\leq\frac23(n-1)(n-3),
  \end{equation}
  for all $x\in\R^n$. Then, for any solution of \eqref{eq.schro} with $f\in L^2,\ H_Af\in L^2$,
  the following estimate holds:
  \begin{equation}\label{eq.smoo4}
    \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq
    R}|\nabla_Au|^2\,dx\,dt
    \leq C\|f\|^2_{\dot{\mathcal H}^{\frac12}},
    \nonumber
  \end{equation}
  for some $C>0$. Moreover, if the strict inequality holds in
  \eqref{eq.ipbfin}, we also have
  \begin{align}
    & \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq
    R}|\nabla_Au|^2\,dx\,dt
    +\epsilon\int_0^{+\infty}\int_{\R^n}
    \frac{\left|\nabla_A^\tau u\right|^2}{|x|}\,dx\,dt
    \label{eq.smoo42}
    \\
    & +\epsilon\frac{(n-1)(n-3)}{2}\int_0^{+\infty}\int\frac{|u|^2}{|x|^3}\,dx\,dt\leq C\|f\|^2_{\dot{\mathcal H}^{\frac12}},
    \nonumber
  \end{align}
  for some $\epsilon>0$.
\end{theorem}
For the 3D magnetic wave equation we have the following result.
\begin{theorem}[Weak dispersion for 3D wave]\label{thm.smoowave}
  Let $n=3$, and assume that
\begin{equation}\label{eq.smallw}
  |||B\||_3+|||V_r^+|||_2\leq\frac12.
\end{equation}
Then, for any solution $u$ of \eqref{eq.wave} with $f,g\in L^2,\
H_Af,H_Ag\in L^2$, the following estimate holds:
\begin{equation}\label{eq.smoowave}
  \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left(|u_t|^2+\left|\nabla_Au\right|^2\right)\,dx\,dt\leq
    CE(0),
\end{equation}
where the energy $E$ is defined by
\begin{equation*}
    E(t)=\frac12\|u_t\|_{L^2}^2+\frac12\|u\|^2_{\dot{\mathcal H}^1}.
\end{equation*}
Moreover, if the strict inequality holds in \eqref{eq.small}, we
also have
\begin{align}
  & \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left(|u_t|^2+\left|\nabla_Au\right|^2\right)\,dx\,dt
    +\epsilon\int_0^{+\infty}\int_{\R^n}\frac{|\nabla_A^\tau u|^2}{|x|}\,dx\,dt
    \label{eq.smoowave+}
    \\
  &
  +\epsilon\sup_{R>0}\frac1{R^2}\int_0^{+\infty}\int_{|x|=R}|u|^2\,d\sigma\,dt
    \leq
    CE(0),
    \nonumber
\end{align}
for some $C>0$ and $\epsilon>0$ small.
\end{theorem}
The analogous in higher dimension is the following.
\begin{theorem}[Weak dispersion for higher dimensional wave]\label{thm.smoowave4}
  Let $n\geq4$, and assume that
  \begin{equation}\label{eq.ipbfinw}
    |B_\tau(x)|\leq\frac{C_1}{|x|^2},
    \qquad
    |V_r^+(x)|\leq\frac{C_2}{|x|^3},
    \qquad
    C_1^2+2C_2\leq\frac23(n-1)(n-3),
  \end{equation}
  for all $x\in\R^n$. Then, for any solution on \eqref{eq.schro} with $f,g\in L^2,\ H_Af,H_Ag\in L^2$,
  the following estimate holds:
  \begin{equation}\label{eq.smoow4}
    \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left(|u_t|^2+\left|\nabla_Au\right|^2\right)\,dx\,dt
    \leq CE(0),
  \end{equation}
  for some $C>0$. Moreover, if the strict inequality holds in
  \eqref{eq.ipbfinw}, we also have
  \begin{align}
    & \sup_{R>0}\frac1R\int_0^{+\infty}\int_{|x|\leq R}
    \left(|u_t|^2+\left|\nabla_Au\right|^2\right)\,dx\,dt
    +\epsilon\int_0^{+\infty}\int_{\R^n}
    \frac{\left|\nabla_A^\tau u\right|^2}{|x|}\,dx\,dt
    \label{eq.smoow42}
    \\
    & +\epsilon\frac{(n-1)(n-3)}{2}\int_0^{+\infty}\int_{|x|\geq
    R}\frac{|u|^2}{|x|^3}\,dx\,dt\leq CE(0),
    \nonumber
  \end{align}
  for some $\epsilon>0$.
\end{theorem}

\subsection{Strichartz estimates for the magnetic wave
equation}\label{subsec.stri} It is more or less standard to prove
Strichartz estimates as applications of Theorems \ref{thm.smoowave},
\ref{thm.smoowave4}; we do it in Theorem \ref{thm.striwave}. The key points are the estimates obtained in
the previous section and to write \eqref{eq.wave} as
\begin{equation}
  \begin{cases}\label{eq.waveF}
    u_{tt}-\Delta u=F(t,x)
    \\
    u(0)=f
    \\
    u_t(0)=g,
  \end{cases}
\end{equation}º
whereº
\begin{equation}\label{eq.F}
  F=-2iA\cdot\nabla_Au-A^2u-Vu.
\end{equation}
We
recall that a couple $(p,q)$ is said to be {\it wave admissible} if
\begin{equation}\label{eq.wavead}
  \frac2p+\frac{n-1}{q}=\frac{n-1}{2},
  \qquad
  2\leq p\leq\infty,
  \qquad
  \frac{2(n-1)}{n-3}\geq q\geq2,
  \quad
  q\neq\infty.
\end{equation}
If $(p,q)$ is a wave admissible couple, we say that it is an {\it
endpoint couple} if $p=2$. We can state the following theorem.
\begin{theorem}[Strichartz for wave]\label{thm.striwave}
  Let $n\geq3$; assume (H1), (H2) and either \eqref{eq.smallw} or \eqref{eq.ipbfinw}. Moreover  assume that
  \begin{equation}\label{eq.ipBstri}
    |B(x)|\leq\frac{C}{(1+|x|)^{2+\delta}},
    \qquad
    |V(x)|\leq\frac{C}{(1+|x|)^{2+\delta}},
  \end{equation}
  for some $C>0$ and some  $\delta>0$. If $u$ is a solution of
  \eqref{eq.wave} and $(p,q)$ is any non endpoint wave admissible
  couple, then the following Strichartz estimate holds:
  \begin{equation}\label{eq.striwave}
    \|u\|_{L^p_t\dot H^\sigma_q}\lesssim \|f\|_{\dot{\mathcal H^1}}+\|g\|_{L^2},
  \end{equation}
  where the gap of derivatives is $\sigma=\frac1q-\frac1p+\frac12$.
\end{theorem}

\begin{remark}\label{rem.schlag}
  It is interesting to compare this result with the ones in
  \cite{pda-lf2}, \cite{ges}, \cite{GST} and \cite{ste}. Assumption \eqref{eq.ipBstri}
  is made in terms of $B$; since it is the anti-symmetric gradient of $A$ and $\text{div}\,A=0$, \eqref{eq.ipBstri}
  implies that
  \begin{equation}\label{eq.ipAstri}
    A\leq\frac{C}{(1+|x|)^{1+\epsilon}}.
  \end{equation}
  It is relevant to notice that
  \eqref{eq.ipBstri} is gauge invariant, while it is
  not the same for \eqref{eq.ipAstri}. Also the non-trapping and repulsivity conditions given by \eqref{eq.smallw} and \eqref{eq.ipbfinw} imply the non-existence either of 0-resonances or eiegenvalues.
\end{remark}

\begin{remark}\label{rem.biot}
  Also notice that \eqref{eq.ipBstri}
  requires $\alpha>2$ in the homogeneous example \ref{ex.biot}.
  For these examples $A^2$ is homogeneous of degree strictly bigger than two.
From the counterexamples  given in \cite{gvv} it is natural to
expect that Strichartz estimates will fail if $\alpha<2$. Notice
that in \ref{ex.biot}, $A^2(\omega)=0=\min_{|x|=1}A^2(x)$, and this
is a necessary condition for the results in  \cite{gvv} to
hold.\end{remark}

\begin{remark}\label{rem.extend}
  It would be interesting to extend this result to the magnetic
  Schr\"odinger equation \eqref{eq.schro}. In order to do that, we
  should prove the versions of Theorems \ref{thm.smooschro},
  \ref{thm.smooschro4} with $L^2$-initial data. This will be done
  elsewhere.
\end{remark}

\section{Virial identities: proofs of Theorems \ref{thm.virialS} and \ref{thm.virialW}}
\label{sec.vir}

This section is devoted to the proofs of the
virial identities for the magnetic equations, Theorems
\ref{thm.virialS} and \ref{thm.virialW}. Let us start with the
magnetic Schr\"odinger equation.

\begin{proof}[{\bf Proof of Theorem \ref{thm.virialS}}]
Let us start by considering a solution $u\in\mathcal H^{\frac32}$ of
\eqref{eq.schro}. Using equation \eqref{eq.schro} in the form
\begin{equation}\label{eq.schro2}
  u_t=-iHu,
\end{equation}
we can easily compute
\begin{align}
  \dot\Theta_S(t) & =-i\left\langle u,[H,\phi]u\right\rangle
  \label{eq.teta1S}
  \\
  \ddot\Theta_S(t) & =-\left\langle u,[H,[H,\phi]]u\right\rangle,
  \label{eq.teta2S}
\end{align}
where the brackets $[,]$ are the commutator and the brackets
$\langle,\rangle$ are the hermitian product in $L^2$. In order to
simplify the notations, let us denote by
\begin{equation}\label{eq.T}
  T=-[H,\phi].
\end{equation}
By the Leibnitz formula
\begin{equation}\label{eq.leib}
  \nabla_A(fg)=g\nabla_Af+f\nabla g,
\end{equation}
which implies that
\begin{equation}\label{eq.leibH}
  H(fg)=(Hf)g+2\nabla_Af\cdot\nabla g+f(\Delta g),
\end{equation}
we can write explicitly
\begin{equation}\label{eq.T2}
  T=2\nabla\phi\cdot\nabla_A+\Delta\phi.
\end{equation}
Observe that $T$ is anti-symmetric, namely
\begin{equation*}
  \langle f,Tg\rangle=-\langle Tf,g\rangle;
\end{equation*}
moreover, in the case $A\equiv0$ the operator $T$ coincides with the
usual one introduce by Morawetz in \cite{mor}, which is
$2\nabla\phi\cdot\nabla+\Delta\phi$.

Hence we can rewrite \eqref{eq.teta2S} in the following form
\begin{equation}\label{eq.2teta2S}
  \ddot\Theta_S(t)=\left\langle u,[H,T]u\right\rangle,
\end{equation}
where $T$ is given by \eqref{eq.T2}.

We can compute explicitly the commutator $[H,T]$; by \eqref{eq.T2}
we have
\begin{equation}\label{eq.HT}
  [H,T]=-[\nabla_A^2,2\nabla\phi\cdot\nabla_A]-[\nabla_A^2,\Delta\phi]+[V,T]=:I+II+III.
\end{equation}
Let us introduce the following notations: for $f:\R^n\to\C$,
\begin{align*}
  f_j & =\frac{\partial f}{\partial x^j};
  \\
  f_{\widetilde j} & =f_j-iA^jf;
  \\
  f_{\widetilde j^\star} & =f_j+iA^jf.
\end{align*}
With these notations we have
\begin{equation*}
  (fg)_{\widetilde j}=f_{\widetilde j}g+fg_j;
\end{equation*}
moreover, the formula of integrations by parts is
\begin{equation*}
  \int_{\R^n}f_{\widetilde j}(x)g(x)\,dx=-\int_{\R^n}f(x)g_{\widetilde
  j^\star}(x)\,dx.
\end{equation*}
Now we compute the terms $I$, $II$ and $III$ in
\eqref{eq.HT}.

The term $III$ in \eqref{eq.HT} is easily computed:
\begin{equation}\label{eq.nuovaV}
  III=[V,T]=2[V,\nabla_A\cdot\nabla]=-2\nabla\phi\cdot\nabla V=-2\phi'V_r.
\end{equation}
For $I$, we have
\begin{align}
  -I = & 2\sum_{j,k=1}^n\left(\partial_{\widetilde j}\partial_{\widetilde j}\phi_k\partial_{\widetilde k}
  -\phi_k\partial_{\widetilde k}\partial_{\widetilde j}\partial_{\widetilde j}\right)
  \nonumber
  \\
  = & \sum_{j,k=1}^n\left(2\phi_{kjj}\partial_{\widetilde k}+4\phi_{jk}
  \partial_{\widetilde j}\partial_{\widetilde k}+2\phi_k(\partial_{\widetilde j}\partial_{\widetilde j}
  \partial_{\widetilde k}-\partial_{\widetilde k}\partial_{\widetilde j}\partial_{\widetilde
  j})\right).
  \label{eq.Iuno}
\end{align}
Notice that
\begin{align*}
  \partial_{\widetilde j}\partial_{\widetilde k}-\partial_{\widetilde k}\partial_{\widetilde j}= &
  i\left(A^j_k-A^k_j\right),
  \\
  \partial_{\widetilde j}\partial_{\widetilde j}\partial_{\widetilde k}
  -\partial_{\widetilde k}\partial_{\widetilde j}\partial_{\widetilde
  j} = &
  i\left(A^k_j-A^j_k\right)_j+2i\left(A^k_j-A^j_k\right)\partial_{\widetilde
  j};
\end{align*}
hence, by \eqref{eq.Iuno} we obtain
\begin{equation}\label{eq.Idue}
  -I=\sum_{j,k=1}^n\left(2\phi_{kjj}\partial_{\widetilde k}+4\phi_{jk}
  \partial_{\widetilde j}\partial_{\widetilde
  k}+2i\phi_j\left(A^j_k-A^k_j\right)_k+4i\phi_j\left(A^j_k-A^k_j\right)\partial_{\widetilde
  k}\right)
\end{equation}

For the term $II$ in \eqref{eq.HT} we compute
\begin{align}
  -II & =
  \sum_{j,k=1}^n\left(\partial_{\widetilde k}\partial_{\widetilde k}\phi_{jj}-
  \phi_{jj}\partial_{\widetilde k}\partial_{\widetilde k}\right)
  \nonumber
  \\
  & =\sum_{j,k=1}^n\left(\phi_{jjkk}+2\phi_{jjk}\partial_{\widetilde k}\right).
  \label{eq.II}
\end{align}
By \eqref{eq.Idue} and \eqref{eq.II} we can write
\begin{align}
  \langle u,[\nabla_A^2,T]u\rangle = &
  \sum_{j,k=1}^n\int_{\R^n}\left(2u\phi_{kjj}\overline{u_{\widetilde k}}
  +4u\phi_{jk}\overline{\partial_{\widetilde j}\partial_{\widetilde k}u}
  +2u\phi_{kjj}\overline{u_{\widetilde k}}\right)\,dx
  \nonumber
  \\
  & +\sum_{j,k=1}^n\int_{\R^n}\left(2i\phi_j\left(A^j_k-A^k_j\right)_k|u|^2
  +4iu\phi_j\left(A^j_k-A^k_j\right)\overline{u_{\widetilde
  k}}\right)\,dx
  \label{eq.III}
  \\
  & +\int_{\R^n}|u|^2\Delta^2\phi\,dx.
  \nonumber
\end{align}
Observe that
\begin{equation*}
  \overline{\partial_{\widetilde j}\partial_{\widetilde k}u}=
  \partial_{\widetilde j^\star}\partial_{\widetilde
  k^\star}\overline u;
\end{equation*}
as a consequence, integrating by parts the first three terms of
\eqref{eq.III} we have
\begin{align}
  \sum_{j,k=1}^n\int_{\R^n} & \left(2u\phi_{kjj}\overline{u_{\widetilde k}}
  +4u\phi_{jk}\overline{\partial_{\widetilde j}\partial_{\widetilde k}u}
  +2u\phi_{kjj}\overline{u_{\widetilde k}}\right)\,dx
  \label{eq.IV}
  \\
  & =\sum_{j,k=1}^n\int_{\R^n}-4u_{\widetilde j}\phi_{jk}\overline{u_{\widetilde
  k}}\,dx=-4\int_{\R^n}\nabla_A uD^2\phi\overline{\nabla_A u}\,dx.
  \nonumber
\end{align}

For the 4th and 5th term in \eqref{eq.III} we notice that
\begin{equation*}
  \sum_{j,k=1}^n\phi_{jk}\left(A^j_k-A^k_j\right)=0,
\end{equation*}
and integrating by parts we obtain
\begin{align}
  \sum_{j,k=1}^n\int_{\R^n} & \left(2i\phi_j\left(A^j_k-A^k_j\right)_k|u|^2
  +4iu\phi_j\left(A^j_k-A^k_j\right)\overline{u_{\widetilde
  k}}\right)\,dx &
  \label{eq.V}
  \\
  & =4\Im\sum_{j,k=1}^n\int_{\R^n}u\phi_j\left(A^j_k-A^k_j\right)\overline{u_{\widetilde
  k}}\,dx
  \nonumber
  \\
  & =4\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_{A}u}\,dx,
\end{align}
whit $B_tau$ as in Definition \ref{def.B}.

By \eqref{eq.nuovaV}, \eqref{eq.III}, \eqref{eq.IV} and \eqref{eq.V}
we conclude that
\begin{align}
  \langle u,[H,T]u\rangle = &
  4\int_{\R^n}\nabla_A uD^2\phi\overline{\nabla_A u}
  -\int_{\R^n}|u|^2\Delta^2\phi
  \label{eq.HT2}
  \\
  & -2\int_{\R^n}\phi'V_r|u|^2
  +4\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_{A}u}.
  \nonumber
\end{align}
Identities \eqref{eq.2teta2S} and \eqref{eq.HT2} prove
\eqref{eq.virialS}.

\begin{remark}\label{rem.reg}
  In the above arguments the highest order term in $u$ that appears is of
  the form
  \begin{equation*}
    \int\nabla_A^2u\nabla\phi\cdot\overline{\nabla_Au};
  \end{equation*}
  it makes sense thanks to assumption (H2) and the condition $f\in
  L^2,\ H_Af\in L^2$, which implies $H_Ae^{itH}f\in L^2$, and by interpolation $\nabla_Ae^{itH}f\in
  L^2$. Consequently, all the performed integration by parts  are
  permitted.
\end{remark}

\end{proof}

\begin{proof}[{\bf Proof of Theorem \ref{thm.virialW}}]

The proof of Theorem \ref{thm.virialW} is analogous to the previous
one. Let us write
\begin{equation}\label{eq.tetaW1}
  \Theta_W(t)=\langle u_t,\phi u_t\rangle+\langle\phi\nabla_A u,\nabla_A u\rangle
  -\frac12\langle u\Delta\phi,u\rangle+\langle u,\phi Vu\rangle+\langle u,\Psi u\rangle.
\end{equation}
Differentiating in \eqref{eq.tetaW1} with respect to time and using
equation \eqref{eq.wave} we obtain
\begin{align*}
  \frac{d}{dt}\langle u_t,\phi u_t\rangle & =-2\Re\langle u_t,\phi
  Hu\rangle=2\Re\langle u_t,\phi
  \nabla_A^2u\rangle-2\Re\langle u_t,\phi
  Vu\rangle,
  \\
  \frac{d}{dt}\langle\phi\nabla_A u,\nabla_A u\rangle & =-2\Re\langle u_t,\phi
  \nabla_A^2u\rangle-2\Re\langle u_t,\nabla\phi\cdot\nabla_A u\rangle,
  \\
  -\frac{d}{dt}\frac12\langle u\Delta\phi,u\rangle & =-\Re\langle
  u_t,(\Delta\phi)u\rangle,
  \\
  \frac{d}{dt}\langle u,\phi Vu\rangle & =2\Re\langle u_t,\phi
  Vu\rangle
  \\
  \frac{d}{dt}\langle u,\Psi u\rangle & =2\Re\langle u_t,\Psi u\rangle.
\end{align*}
Hence, recalling the operator
$T=-[H,\phi]=2\nabla\phi\cdot\nabla_A+\Delta\phi$, we have by
\eqref{eq.tetaW1}
\begin{equation}\label{eq.1tetaW2}
  \dot\Theta_W(t)=-\Re\langle u_t,Tu\rangle+2\Re\langle u_t,\Psi u\rangle.
\end{equation}
Consider  the first term on the RHS of \eqref{eq.1tetaW2}, differentiating
and using the equation we see that
\begin{equation}\label{eq.2tetaW}
  -\frac{d}{dt}\langle u_t,Tu\rangle=\langle
  u,HTu\rangle-\langle u_t,Tu_t\rangle.
\end{equation}
Since $T$ is anti-symmetric, we have
\begin{equation}\label{eq.1}
  \Re\langle u_t,Tu_t\rangle=0;
\end{equation}
moreover
\begin{equation*}
  \langle u,HTu\rangle=\langle
  u,THu\rangle+\langle u,[H,T]u\rangle=-
  \langle HTu,u\rangle+\langle u,[H,T]u\rangle,
\end{equation*}
and then
\begin{equation}\label{eq.2}
  \Re\langle u,HTu\rangle=\frac12\langle u,[H,T]u\rangle.
\end{equation}
Recollecting \eqref{eq.2tetaW}, \eqref{eq.1} and \eqref{eq.2} we
arrive at
\begin{equation}\label{eq.3}
  \frac{d}{dt}\Re\langle u_t,Tu\rangle=\frac12\langle
  u,[H,T]u\rangle.
\end{equation}
For the second term on the RHS of \eqref{eq.1tetaW2}, we observe
that
\begin{equation}\label{eq.simm}
  \frac{d}{dt}2\Re\langle u_t,\Psi u\rangle=2\langle u_t,\Psi
  u_t\rangle+2\Re\langle Hu,\Psi u\rangle.
\end{equation}
By integration by parts we see that
\begin{equation}\label{eq.simm2}
  \Re\langle Hu,\Psi
  u\rangle =-\int|\nabla_Au|^2\Psi-\Re\int\nabla_Au\cdot\nabla\Psi
  \overline u.
\end{equation}
Moreover,
\begin{equation*}
  \int\nabla_Au\cdot\nabla\Psi
  \overline u=-\int|u|^2\Delta\Psi-\int\overline{\nabla_Au}\cdot\nabla\Psi
  u,
\end{equation*}
and consequently
\begin{equation}\label{eq.simm3}
  \Re\int\nabla_Au\cdot\nabla\Psi
  \overline u=-\frac12\int|u|^2\Delta\Psi.
\end{equation}
In conclusion, by \eqref{eq.simm}, \eqref{eq.simm2} and
\eqref{eq.simm3} we obtain
\begin{equation}\label{eq.simmfin}
  \frac{d}{dt}2\Re\langle u_t,\Psi u\rangle=2\int|u_t|^2\Psi-2\int|\nabla_Au|^2\Psi
  +\int|u|^2\Delta\Psi.
\end{equation}

Finally, by \eqref{eq.1tetaW2}, \eqref{eq.3} and \eqref{eq.simmfin}
we conclude that
\begin{equation}\label{eq.4}
  \ddot\Theta_W(t)=\frac12\langle
  u,[H,T]u\rangle+2\int|u_t|^2\Psi-2\int|\nabla_Au|^2\Psi
  +\int|u|^2\Delta\Psi.
\end{equation}
The term $[H,T]$ on the RHS of \eqref{eq.4} has been already
computed in the previous section, modulo the constant $1/2$. The
analogous to Remark \ref{rem.reg} concludes the proof of
\eqref{eq.virialW}.

\end{proof}

\section{Proofs of the smoothing estimates}\label{sec.dim}

We devote this section to the proofs of Theorems
\ref{thm.smooschro}, \ref{thm.smooschro4}, \ref{thm.smoowave},
\ref{thm.smoowave4}. The proofs are based on suitable choices of the
multiplier $\phi$ in the virial identities \eqref{eq.virialS} and
\eqref{eq.virialW}. As we see in the following, the choice of the
multipliers is different in the cases $n=3$ and $n\geq4$, and it
follows the ideas of the paper \cite{brv}. We start with the
Schr\"odinger equation in space dimension $n=3$.

\subsection{Proof of Theorem \ref{thm.smooschro}}\label{sec.proof1}

Recalling \eqref{eq.teta2S} and \eqref{eq.T},
  let us rewrite identity \eqref{eq.virialS} as follows
  \begin{equation*}
    \frac{d}{dt}\dot\Theta_S(t) = -\langle u,[H,T]u\rangle.
  \end{equation*}
  By \eqref{eq.teta1S} and \eqref{eq.T2}, integrating by parts we
  see that
  \begin{equation*}
    \dot\Theta_S(t)=2\Im\int_{\R^n}\overline
    u(x,t)\nabla_Au(x,t)\cdot\nabla\phi(x)\,dx.
  \end{equation*}
  Hence we can rewrite
  \eqref{eq.virialS} as follows
  \begin{align}
    &  2\int_{\R^n}
    \nabla_AuD^2\phi\overline{\nabla_Au}-\frac12\int_{\R^n}|u|^2\Delta^2\phi
    -\int_{\R^n}\phi'V_r|u|^2
    \label{eq.virialS2}
    \\
    & +2\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_Au}=\mathcal R(t),
    \nonumber
  \end{align}
  for all $t>0$, where
  \begin{equation*}
  \mathcal R(t)=\frac d{dt}\left(\Im\int_{\R^n}\overline u(x,t)\nabla_Au(x,t)\cdot\nabla\phi(x)\,dx
    \right),
\end{equation*}

   We start with an interpolation Lemma that will be
  used for the estimate of the right hand side of
  \eqref{eq.virialS2}.
\begin{lemma}\label{lem.interpol}
  Let $\phi=\phi(|x|):\R^n\to\R$, $n\geq3$, be a radial function such that
  $\phi'(r)$ and $r\phi''(r)$ are bounded; then the
  following estimate holds:
  \begin{equation}\label{eq.interpol}
    \left|\int_{\R^n}\overline u(x,t)\nabla_Au(x,t)\cdot\nabla\phi(x)\,dx\right|
    \leq C\|f\|_{\dot{\mathcal H}^{\frac12}}.
  \end{equation}
\end{lemma}

\begin{proof}
  Let us consider the quadratic form
  \begin{equation*}
    T(f,g)=\int_{\R^n}\overline
    f(x)\nabla_Ag(x)\cdot\nabla\phi(x)\,dx.
  \end{equation*}
  Since $\phi'$ is bounded, we have the inequality
  \begin{equation}\label{eq.www}
    \left|T(f,g)\right|\leq C_1\|f\|_{L^2}\|\nabla_Ag\|_{L^2}.
  \end{equation}
  By integration by parts, we see that
  \begin{equation}\label{eq.qqq}
    T(f,g)=-\int_{\R^n}
    g(x)\nabla_A\overline
    f(x)\cdot\nabla\phi(x)\,dx-\int_{\R^n}\overline
    fg\Delta\phi\,dx;
  \end{equation}
  under the assumptions on $\phi$ we have that $\Delta\phi(x)\leq
  C/|x|$, hence using the magnetic Hardy's inequality \eqref{eq.hardy}
  we have by \eqref{eq.qqq} that
  \begin{equation}\label{eq.rrr}
    \left|T(f,g)\right|\leq C_2\|g\|_{L^2}\|\nabla_Af\|_{L^2}.
  \end{equation}
  By interpolation between \eqref{eq.www} and
  \eqref{eq.rrr} we get
  \begin{equation*}
    \left|T(f,g)\right|\leq C\|f\|_{\mathcal H^{1/2}}
   \|g\|_{\mathcal H^{1/2}}.
  \end{equation*}

\end{proof}

Now we choose an explicit multiplier $\phi$. For some $M>0$, let us
consider
\begin{equation*}
  \phi_0(x)=\int_0^x\phi_0'(s)\,ds,
\end{equation*}
where
\begin{equation*}
  \phi'_0=\phi'_0(r)=
  \begin{cases}
    M+\frac13r,
    \qquad
    r\leq1
    \\
    M+\frac12-\frac1{6r^2},
    \qquad
    r>1.
  \end{cases}
\end{equation*}
A direct computation shows that
\begin{equation*}
  \phi_0''(r)=
  \begin{cases}
    \frac13,
    \qquad
    r\leq1
    \\
    \frac1{3r^3},
    \qquad
    r>1
  \end{cases}
\end{equation*}
and the bilaplacian is given by
\begin{equation*}
  \Delta^2\phi_0(r)=-4\pi\delta_{x=0}-\delta_{|x|=1},
\end{equation*}
where ot the right hand side we have the Dirac masses concentrated
at zero and on the unit sphere, respectively. By scaling, for any
$R>0$ we define
\begin{equation*}
  \phi(r)=R\phi_0\left(\frac rR\right),
\end{equation*}
hence
\begin{equation}\label{eq.fi1}
  \phi'(r)=
  \begin{cases}
    M+\frac r{3R},
    \qquad
    r\leq R
    \\
    M+\frac12-\frac{R^2}{6r^2},
    \qquad
    r>R
  \end{cases}
\end{equation}
\begin{equation}\label{eq.fi2}
  \phi''(r)=
  \begin{cases}
    \frac1{3R},
    \qquad
    r\leq R
    \\
    \frac1R\cdot\frac{R^3}{3r^3},
    \qquad
    r>R
  \end{cases}
\end{equation}
\begin{equation}\label{eq.fibi}
  \Delta^2\phi(r)=-4\pi\delta_{x=0}-\frac1{R^2}\delta_{|x|=R}.
\end{equation}
Observe that the assumptions of Lemma \ref{lem.interpol} are
satisfied by $\phi$.

We can pass to the estimate on the left hand side of
\eqref{eq.virialS2}. Let us introduce the following formula, which
holds in any dimension:
\begin{equation}\label{eq.formula}
    \nabla_AuD^2\phi\overline{\nabla_Au}=
    \phi''\left|\nabla_A^ru\right|^2
    +\frac{\phi'}{r}\left|\nabla_A^\tau u\right|^2.
\end{equation}
Here $\nabla_A^\tau$ is the projection of $\nabla_A$ on the tangent
  plane to the sphere, such that
  \begin{equation*}
    \left|\nabla_A^\tau u(x)\right|^2+\left|\nabla_A^r u(x)\right|^2=
    \left|\nabla_A u(x)\right|^2,
  \end{equation*}
  \begin{equation*}
    \nabla_A^ru(x)=\left(\nabla_A u(x)\cdot\frac{x}{|x|}\right)\frac{x}{|x|},
    \qquad
    \nabla_A^\tau u\cdot\nabla_A^r u\equiv0.
  \end{equation*}
Now we insert \eqref{eq.fi1}, \eqref{eq.fi2} and \eqref{eq.fibi} in
\eqref{eq.virialS2}; neglecting the negative part $V_r^-$ of the
electric potential, we have
\begin{align}
    &  \frac{2}{3R}\int_{|x|\leq R}
    \left|\nabla_Au\right|^2\,dx
    +2M\int_{\R^n}
    \frac{|\nabla_A^\tau u|^2}{|x|}\,dx
    +\frac1{2R^2}\int_{|x|=R}|u|^2\,d\sigma
    \label{eq.virialS3}
    \\
    &
    -\int_{\R^n}\phi'V_r^+|u|^2\,dx
    +2\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_Au}\,dx
    \nonumber
    \\
    & \leq\frac d{dt}\left(\Im\int_{\R^n}\overline u(x,t)\nabla_Au(x,t)\cdot\nabla\phi(x)\,dx
    \right),
    \nonumber
  \end{align}
for all $R>0$. Let us now consider the term involving $B_\tau$ on
the left hand side of \eqref{eq.virialS3}; since the vector field
$B_\tau$ is tangential, by \eqref{eq.fi1} we can estimate
\begin{align}
  2\Im & \int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_Au}\,dx \geq
  -2\left|\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_Au}\,dx\right|
  \label{eq.radi}
  \\
  &\geq-2\left(M+\frac12\right)\int_{\R^n}|u|\cdot|B_\tau|\cdot|\nabla_A^\tau
  u|\,dx
  \nonumber
  \\
  & \geq-2\left(M+\frac12\right)\left(\int_{\R^n}\frac{|\nabla_A^\tau
  u|^2}{|x|}\,dx\right)^{\frac12}\left(\int_0^{+\infty}\,d\rho\int_{|x|=\rho}|x|\cdot|u|^2\cdot|B_\tau|^2
  \,d\sigma\right)^{\frac12}
  \nonumber
  \\
  & \geq-2\left(M+\frac12\right)K_1\left(\int_0^{+\infty}\,d\rho\left(
  \sup_{|x|=\rho}|B_\tau|^2|x|^3\right)\frac1{\rho^2}\int_{|x|=\rho}|u|^2
  \,d\sigma\right)^{\frac12}
  \nonumber
  \\
  & \geq-2\left(M+\frac12\right)K_1\left(\sup_{R>0}\frac1{R^2}\int_{|x|=R}|u|^2
  \,d\sigma\right)^{\frac12}\left(\int_0^{+\infty}\sup_{|x|=\rho}|B_\tau|^2|x|^3\,d\rho\right)^{\frac12}
  \nonumber
  \\
  & =-2\left(M+\frac12\right)K_1K_2|||B_\tau^2|||_3^{1/2},
  \nonumber
\end{align}
where
\begin{equation*}
  K_1=\left(\int_{\R^n}\frac{|\nabla_A^\tau
  u|^2}{|x|}\,dx\right)^{\frac12},
\end{equation*}
\begin{equation*}
  K_2=\left(\sup_{R>0}\frac1{R^2}\int_{|x|=R}|u|^2
  \,d\sigma\right)^{\frac12},
\end{equation*}
and we recall the definition
\begin{equation*}
  |||B_\tau^2|||_3=\int_0^{+\infty}\rho^3\sup_{|x|=\rho}|B_\tau|^2\,d\rho.
\end{equation*}
In an analogous way we treat the term involving $V_r^+$ in
\eqref{eq.virialS3}:
\begin{align}
  -\int\phi' & V_r^+|u|^2\,dx\geq
  -\left|\int\phi'V_r^+|u|^2\,dx\right|
  \label{eq.radiV}
  \\
  &
  \geq-\left(M+\frac12\right)\int_0^{+\infty}d\rho\int_{|x|=\rho}|V_r^+|\cdot|u|^2\,d\sigma
  \nonumber
  \\
  & \geq -\left(M+\frac12\right)\int_0^{+\infty}d\rho
  \left(\sup_{|x|=\rho}(|V_r^+|\cdot|x|^2)\frac1{\rho^2}\int_{|x|=\rho}|u|^2\,d\sigma\right)
  \nonumber
  \\
  & \geq-\left(M+\frac12\right)\left(\int_0^{+\infty}
  \sup_{|x|=\rho}|V_r^+|\cdot|x|^2\,d\rho\right)\cdot\left(\sup_{R>0}\frac1{R^2}
  \int_{|x|=\rho}|u|^2\,d\sigma\right)
  \nonumber
  \\
  & =-\left(M+\frac12\right)|||V_r^+|||_2K_2^2,
  \nonumber
\end{align}
where $K_2$ is as before and
\begin{equation*}
  |||V_r^+|||_2=\int_0^{+\infty}
 \rho^2 \sup_{|x|=\rho}|V_r^+\,d\rho.
\end{equation*}
Using \eqref{eq.radi}, \eqref{eq.radiV} and taking the supremum over
$R>0$ in \eqref{eq.virialS3}, we obtain
\begin{align*}
  \sup_{R>0}\frac{2}{3R} & \int_{|x|\leq R}
    \left|\nabla_Au\right|^2+2MK_1^2+\frac12K_2^2
    \\
    & \leq\mathcal
    R(t)+\left(M+\frac12\right)\cdot\left(2K_1K_2|||B_\tau^2|||_3^{1/2}+K_2^2|||V_r^+|||_2\right),
\end{align*}
or equivalently
\begin{equation}\label{eq.111}
  \sup_{R>0}\frac{2}{3R}\int_{|x|\leq R}
    \left|\nabla_Au\right|^2\,dx+
    C(M,K_1,K_2,B)\leq\mathcal
    R(t),
\end{equation}
where
\begin{align*}
  C(M,K_1,K_2,B)= & 2MK_1^2+\left[\frac12-\left(M+\frac12\right)|||V_r^+|||_2
  \right]K_2^2
  \\
  & -2\left(M+\frac12\right)|||B_\tau^2|||_3^{1/2}
  K_1K_2.
\end{align*}
Notice that all the quantities that appear in the above calculation are finite thanks to the assumptions (H1) and (H2) and the diamagnetic inequality.
In order to conclude the proof, it is sufficient now to optimize the
smallness condition on $|||B_\tau^2|||_3$ and $|||V_r^+|||_2$ under
which we can ensure that $C(M,K_1,K_2,B)\geq0 $.

Due to the homogeneity of $C$, it is not restrictive to fix $K_1=1$
and impose that
\begin{equation*}
\left[\frac12-\left(M+\frac12\right)|||V_r^+|||_2
  \right]K_2^2-2\left(M+\frac12\right)|||B_\tau^2|||_3^{1/2}
  K_2+2M>0,
\end{equation*}
for all $K_2>0$. This gives the following condition:
\begin{equation}\label{eq.ellisse}
  \frac{\left(M+\frac12\right)^2}{M}|||B_\tau^2|||_3
  +2\left(M+\frac12\right)|||V_r^+|||_2\leq1.
\end{equation}
In order to optimize \eqref{eq.ellisse} in terms of the size of $B$,
we choose $M=1/2$, such that the coefficient of $|||B_\tau^2|||_3$
is the minimum possible. Hence we obtain
\begin{equation}\label{eq.small2}
  |||B_\tau^2|||_3
  +|||V_r^+|||_2\leq\frac12\quad
  \Rightarrow
  \quad
  C(M,K_1,K_2,B)\geq0.
\end{equation}
As a consequence, if \eqref{eq.small} is satisfied we have by
\eqref{eq.111} and \eqref{eq.small2} that
\begin{equation*}
  \sup_{R>0}\frac1R\int_{|x|\leq R}
    \left|\nabla_Au\right|^2\,dx\leq C\mathcal
    R(t),
\end{equation*}
for some $C>0$. Moreover, if the strict inequality holds in
\eqref{eq.small}, we also have
\begin{align*}
  & \sup_{R>0}\frac1R\int_{|x|\leq R}
    \left|\nabla_Au\right|^2\,dx
    +\epsilon\int_{\R^n}\frac{|\nabla_A^\tau u|^2}{|x|}\,dx
    \\
  & +\epsilon\sup_{R>0}\frac1{R^2}\int_{|x|=R}|u|^2\,d\sigma
    \leq C\mathcal
    R(t),
\end{align*}
for some $\epsilon>0$.

At this point, the thesis immediately follows by integrating in time
the two last inequalities and applying Lemma \ref{lem.interpol} and
the conservation of the $\dot{\mathcal H}^{\frac12}$-norm to the
right hand side.

\subsection{Proof of Theorem \ref{thm.smooschro4}}\label{sec.proof2}

For the proof of the higher dimensional Theorem
\ref{thm.smooschro4}, we use the same techniques of the previous
one, but with different multipliers. First of all, let us start
again from \eqref{eq.virialS2}. We divide the estimate of the left
hand side into two steps, choosing two different multipliers.

{\bf Step 1.} Let us consider the multiplier $\phi(x)=|x|$, for
which

\begin{equation*}
  \phi'(r)=1,
  \qquad
  \phi''(r)=0,
  \qquad
  \Delta^2\phi(r)=-\frac{(n-1)(n-3)}{r^3}.
\end{equation*}

With this choice, by \eqref{eq.formula} we can rewrite
\eqref{eq.virialS2} as follows:

\begin{align}
  & 2\int_{\R^n}\frac{\left|\nabla_A^\tau u\right|^2}{|x|}\,dx
  +\frac{(n-1)(n-3)}{2}\int_{\R^n}\frac{|u|^2}{|x|^3}\,dx
  \label{eq.virialS5}
  \\
  &
  -\int_{\R^n}V_r|u|^2\,dx
  +2\Im\int_{\R^n}uB_\tau\cdot\overline{\nabla_A
  u}\,dx=\mathcal R(t).
  \nonumber
\end{align}

Here we used again the same notations of the previous Section. As in
the previous case, the main goal is to prove the positivity of the
left hand side. Let us assume that
\begin{equation*}
  |B_\tau(x)|\leq\frac{C_1}{|x|^2}
\end{equation*}
and estimate
\begin{align}
  -\left|2\Im\int_{\R^n}uB_\tau\cdot\overline{\nabla_A
  u}\,dx\right| &
  \geq-2\left(\int_{\R^n}\frac{|u|^2}{|x|^3}\,dx\right)^{\frac12}
  \left(\int_{\R^n}|x|^3|B_\tau|^2\left|\nabla_A^\tau u\right|^2\,dx\right)^{\frac12}
  \label{eq.virial10}
  \\
  & \geq-2C_1K_1K_2,
  \nonumber
\end{align}
where
\begin{align*}
  K_1 & =\left(\int_{\R^n}\frac{|u|^2}{|x|^3}\,dx\right)^{\frac12}
  \\
  K_2 & =\left(\int_{\R^n}\frac{\left|\nabla_A^\tau
  u\right|^2}{|x|}\,dx\right)^{\frac12}.
\end{align*}
Analogously, assume that
\begin{equation*}
  |V_r^+(x)|\leq\frac{C_2}{|x|^3}
\end{equation*}
and estimate
\begin{equation*}
  -\int_{\R^n}V_r|u|^2\,dx\geq -C_2K_1^2,
\end{equation*}
where $K_1$ is as before.

Consequently, for the left hand side of \eqref{eq.virialS5} we have
\begin{align}
  & 2\int_{\R^n}\frac{\left|\nabla_A^\tau u\right|^2}{|x|}\,dx
  +\frac{(n-1)(n-3)}{2}\int_{\R^n}\frac{|u|^2}{|x|^3}\,dx
  \label{eq.virialS6}
  \\
  & -\int_{\R^n}V_r|u|^2\,dx+2\Im\int_{\R^n}uB_\tau\cdot\overline{\nabla_A^\tau
  u}\,dx
  \nonumber
  \\
  &\ \ \geq 2K_2^2-2C_1K_1K_2-C_2K_1^2+\frac{(n-1)(n-3)}{2}K_1^2
  =:C(C_1,C_2,K_1,K_2).
  \nonumber
\end{align}
Once again, we want to optimize the condition on $C_1$ and $C_2$
under which the right hand side of \eqref{eq.virialS6} is positive
for all $K_1,K_2$.

Also here it is not restricting to fix $K_1=1$ and requiring that
\begin{equation*}
  \left[\frac{(n-1)(n-3)}{2}-C_2\right]K_1^2-2C_1K_1+2\geq0,
\end{equation*}
which gives the following condition:
\begin{equation}\label{eq.ipb}
  C_1^2+2C_2\leq(n-1)(n-3).
\end{equation}

As a consequence, if \eqref{eq.ipb} is satisfied, then
\begin{align}
  & 2\int_{\R^n}\frac{\left|\nabla_A^\tau u\right|^2}{|x|}\,dx
  +\frac{(n-1)(n-3)}{2}\int_{\R^n}\frac{|u|^2}{|x|^3}\,dx
  \label{eq.virialS7}
  \\
  & -\int_{\R^n}V_r^+|u|^2\,dx-2\Im\int_{\R^n}uB_\tau\cdot\overline{\nabla_A^\tau
  u}\,dx \geq0.
  \nonumber
\end{align}
Moreover, if the strict inequality holds in \eqref{eq.ipb}, we have
\begin{align}
  & 2\int_{\R^n}\frac{\left|\nabla_A^\tau u\right|^2}{|x|}
  +\frac{(n-1)(n-3)}{2}\int_{\R^n}\frac{|u|^2}{|x|^3}
  -\int_{\R^n}V_r^+|u|^2-2\Im\int_{\R^n}uB_\tau\cdot\overline{\nabla_A^\tau
  u}
  \label{eq.virialS8}
  \\
  & \ \ \ \geq
  \epsilon\left(\int_{\R^n}\frac{\left|\nabla_A^\tau u\right|^2}{|x|}+
  \frac{(n-1)(n-3)}{2}\int_{\R^n}\frac{|u|^2}{|x|^3}\right),
  \nonumber
\end{align}
for some $\epsilon>0$.

{\bf Step 2.} Now we perturb the multiplier $\phi$ to complete the
proof. Let us consider
\begin{equation}\label{eq.fifin}
  \widetilde\phi=\phi+\varphi,
\end{equation}
where $\phi(r)=r$ and $\varphi(r)=\int_0^r\varphi'(s)\,ds$, with
\begin{equation*}
  \varphi'(r)=
  \begin{cases}
    \frac{n-1}{2n}r,
    \qquad
    r\leq1
    \\
    \frac12-\frac1{2nr^{n-1}},
    \qquad
    r>1.
  \end{cases}
\end{equation*}
An explicit computation shows that
\begin{equation*}
  \varphi''(r)=
  \begin{cases}
    \frac{n-1}{2n},
    \qquad
    r\leq1
    \\
    \frac{n-1}{2nr^n},
    \qquad
    r>1,
  \end{cases}
\end{equation*}
\begin{equation*}
  \Delta^2\varphi=-\frac{n-1}{2}\delta_{|x|=1}-\frac{(n-1)(n-3)}{2r^3}\chi_{[1,+\infty)}.
\end{equation*}
Finally, for any $R>0$ we define the scaled multiplier
\begin{equation*}
  \widetilde\phi_R(r)=R\widetilde\phi\left(\frac rR\right);
\end{equation*}
we have explicitly that
\begin{equation}\label{eq.fifin2}
  \widetilde\phi_R(r)=r+R\varphi\left(\frac rR\right),
\end{equation}
where
\begin{equation}\label{eq.fifin3}
  \varphi'_R(r)=
  \begin{cases}
    \frac{(n-1)r}{2nR},
    \qquad
    r\leq R
    \\
    \frac12-\frac R{2nr^{n-1}},
    \qquad
    r>R.
  \end{cases}
\end{equation}
\begin{equation}\label{eq.fifin4}
  \varphi''_R(r)=
  \begin{cases}
    \frac1R\cdot\frac{n-1}{2n},
    \qquad
    r\leq R
    \\
    \frac1R\cdot\frac{R^n(n-1)}{2nr^n},
    \qquad
    r>R,
  \end{cases}
\end{equation}
\begin{equation}\label{eq.fifin5}
  \Delta^2\varphi_R=-\frac{n-1}{2R^2}\delta_{|x|=R}-\frac{(n-1)(n-3)}{2r^3}\chi_{[R,+\infty)}.
\end{equation}
At this point, we put the multiplier $\widetilde\phi_R$ in
\eqref{eq.virialS2}. Observe that, in this case,
\begin{equation*}
  \sup_{r\geq0}\widetilde\phi'(r)=\frac32;
\end{equation*}
hence for the terms involving $V_r$ and $B_\tau$ we can repeat the
same computation in \eqref{eq.virial10}, with the scaled constants
$\widetilde C_1=\frac32C_1$, $\widetilde C_2=\frac32C_2$; in this
way, the final condition on $B_\tau$ and $V_r$ turns out to be
\eqref{eq.ipbfin}. Under this assumption, when we put
$\widetilde\phi_R$ into \eqref{eq.virialS2}, we can use the term
$|x|$ in \eqref{eq.fifin2} to control the perturbative terms with
the potentials. Finally, by \eqref{eq.virialS7}, \eqref{eq.formula},
\eqref{eq.fifin3}, \eqref{eq.fifin4}, \eqref{eq.fifin5}, we have
proved that
\begin{equation}\label{eq.virialS9}
    \sup_{R>0}\frac1R\int_{|x|\leq R}|\nabla_Au|^2\,dx
    \leq C\mathcal R(t),
\end{equation}
for some $C>0$, if \eqref{eq.ipbfin} is satisfied. Moreover, if the
strict inequality holds in \eqref{eq.ipbfin}, we also have
\begin{equation}\label{eq.virialS11}
  \epsilon\left(\int_{\R^n}\frac{\left|\nabla_A^\tau u\right|^2}{|x|}\,dx
  +\frac{(n-1)(n-3)}{2}\int_{\R^n}\frac{|u|^2}{|x|^3}\,dx\right)
  \leq C\mathcal R(t),
\end{equation}
analogously to \eqref{eq.virialS8}. Now the proof continues exactly
the one of the 3D Theorem \ref{thm.smooschro}, by integration in
time and application of Lemma \ref{lem.interpol}.

\subsection{Proofs of Theorems \ref{thm.smoowave} and \ref{thm.smoowave4}.}
The proofs of the smoothing Theorems for the magnetic equation are
identical to the ones for the Schr\"odinger equations. The starting
point is now the virial identity \eqref{eq.virialW}, which can be
written as follows:
\begin{align}
    &  2\int_{\R^n}
    \nabla_AuD^2\phi\overline{\nabla_Au}\,dx-\frac12\int_{\R^n}|u|^2\Delta^2\phi\,dx
    \label{eq.virialW2}
    \\
    &
    +2\int_{\R^n}|u_t|^2\Psi\,dx-2\int_{\R^n}|\nabla_Au|^2\Psi\,dx+\int_{\R^n}|u|^2\Delta\Psi\,dx
    \nonumber
    \\
    & -\int_{\R^n}\phi'V_r|u|^2\,dx
    +2\Im\int_{\R^n}u\phi'B_\tau\cdot\overline{\nabla_Au}\,dx=\mathcal R(t),
    \nonumber
\end{align}
where
\begin{equation}\label{eq.radonde}
  \mathcal R(t)=-\frac{d}{dt}\Re\int_{\R^n}u_t(2\nabla\phi\cdot\overline{\nabla_A}u+\overline
  u\Delta\phi+\overline u\Psi)\,dx.
\end{equation}
For the LHS of \eqref{eq.virialW2}, we use the same multiplier
$\phi$ of the Schr\"odinger theorems, while the choice of $\Psi$ is
the following:
\begin{equation*}
  \Psi(x)=
  \begin{cases}
    \frac1{2R},
    \qquad
    |x|\leq R
    \\
    0,
    \qquad
    |x|>R.
  \end{cases}
\end{equation*}
By direct computation we see that
\begin{equation*}
  \Delta\Psi=
  \begin{cases}
    \frac nR,
    \qquad
    |x|\leq R
    \\
    \frac{n-1}{|x|},
    \qquad
    |x|>R,
  \end{cases}
\end{equation*}
hence $\Delta\Psi\geq0$ and the term involving it in
\eqref{eq.virialW2} can be neglected.
The only thing to control is the positivity of the term
\begin{equation*}
  \int_{|x|\leq
  R}(\nabla_AuD^2\phi\overline{\nabla_Au}-|\nabla_Au|^2\Psi)\,dx,
\end{equation*}
which is ensured by the choice of the constant $1/2$ in the
definition of $\Psi$ and the explicit formulas for $\phi'$ and
$\phi''$ introduced in the previous sections.

Finally, after integration in time, with the same techniques
involving Cauchy-Schwartz, magnetic Hardy's inequality and energy
conservation, the RHS of \eqref{eq.virialW2} turns out to be
controlled by $CE(0)$, and this concludes the proof.

\section{Strichartz estimates for the magnetic wave
equation}\label{sec.stri}

The final section of this paper is devoted to the proof of Theorem
\ref{thm.striwave}, as application of the smoothing estimates,
Theorems \ref{thm.smoowave} and \ref{thm.smoowave4}. We start with a
preliminary Lemma.

\begin{lemma}\label{lem.leving}
  Let $(p,q)$ be a non endpoint wave admissible couple; then, for all $T\in\R$, the
  following estimate holds
  \begin{equation}\label{eq.leving}
    \left\|\int_0^T\frac{\sin\left((T-\tau)\sqrt{-\Delta}\right)}{\sqrt{-\Delta}}
    F(\tau,\cdot)\,d\tau\right\|_{L^p\dot H^\sigma_q}\lesssim
    \sum_{j\in\mathbb Z}2^{\frac j2}\|F_j\|_{L^2L^2},
  \end{equation}
  where $\sigma=\frac1q-\frac1p+\frac12$ and
  \begin{equation*}
    F_j(t,x)=
    \begin{cases}
      F(t,x),
      \qquad
      |x|\in[2^j,2^{j+1}]
      \\
      0,
      \qquad
      |x|\in[0,\infty)\setminus[2^j,2^{j+1}].
    \end{cases}
  \end{equation*}
\end{lemma}
\begin{proof}
  We recall the usual Strichartz estimate for the free wave equation
  (see \cite{gv}, \cite{kt})
  \begin{equation}\label{eq.freestri}
    \left\|(\sqrt{-\Delta})^{-1}e^{it\sqrt{-\Delta}}f\right\|_{L^p\dot
    H^\sigma_q}\lesssim\|f\|_{L^2},
  \end{equation}
  with $\sigma=\frac1q-\frac1p+\frac12$ and the inequality
  \begin{equation}\label{eq.leving2}
    \sup_{R>0}\int_0^\infty\int_{|x|\leq
    R}\left|e^{it\sqrt{-\Delta}}f\right|^2\,dx\,dt\lesssim\|f\|_{L^2},
  \end{equation}
  analogous to \eqref{eq.smoowavefree}.
  By \eqref{eq.freestri} we get
  \begin{align}
    \left\|\int_0^T\frac{\sin\left((t-\tau)\sqrt{-\Delta}\right)}{\sqrt{-\Delta}}
    F(\tau,\cdot)\right\|_{L^p\dot H^\sigma_q}
    & \leq
    \left\|\frac{e^{it\sqrt{-\Delta}}}{\sqrt{-\Delta}}
    \int_0^Te^{-i\tau\sqrt{-\Delta}}F(\tau,\cdot)\right\|_{L^p\dot
    H^\sigma_q}
    \label{eq.ttstar}
    \\
    &
    \leq\left\|\int_0^Te^{-i\tau\sqrt{-\Delta}}F(\tau,\cdot)\,d\tau\right\|_{L^2}.
    \nonumber
  \end{align}
  The dual of estimate \eqref{eq.leving2} is
  \begin{equation*}
    \left\|\int
    e^{-i\tau\sqrt{-\Delta}}F(\tau,\cdot)\,d\tau\right\|_{L^2}\lesssim
     \sum_{j\in\mathbb Z}2^{\frac j2}\|F_j\|_{L^2L^2}
  \end{equation*}
  (see e.g. \cite{pv}); as a consequence and by a standard application of the Christ-Kiselev Lemma (\cite{ck}), we
  have \eqref{eq.leving}.
\end{proof}
Now we pass to the proof of Theorem \ref{thm.striwave}. As observed
in Section \ref{subsec.stri}, we can rewrite \eqref{eq.wave} in the
form \eqref{eq.waveF}, with $F$ given by \eqref{eq.F}. The solution
of \eqref{eq.waveF} is represented by
\begin{equation}\label{eq.solwave}
  u(t,\cdot)=\cos(t\sqrt{-\Delta})f+\frac{\sin(t\sqrt{-\Delta})}{\sqrt{-\Delta}}g+
  \int_0^t\frac{\sin\left((t-\tau)\sqrt{-\Delta}\right)}{\sqrt{-\Delta}}F(\tau,\cdot)\,d\tau.
\end{equation}
For the first two terms  we use  \eqref{eq.freestri}. For the last
term, recalling \eqref{eq.F}, by \eqref{eq.leving} we estimate:
\begin{align}\label{eq.anabla}
  & \left\|\int_0^t\frac{\sin\left((t-\tau)\sqrt{-\Delta}\right)}{\sqrt{-\Delta}}
    \left(A\cdot\nabla_Au+A^2u+Vu\right)\,d\tau\right\|_{L^p\dot H^\sigma_q}
    \lesssim
    \\
    &\lesssim\sum_{j\in\mathbb Z}2^{\frac
    j2}\left\{\left(\int_0^t\int_{|x|\in[2^j,2^{j+1}]}A\cdot\nabla_Au\right)^{\frac12}+
    \left(\int_0^t\int_{|x|\in[2^j,2^{j+1}]}(A^2+V)u\right)^{\frac12}\right\}.
    \nonumber
\end{align}
As observed in Remark \ref{rem.schlag}, assumption
\eqref{eq.ipBstri} implies
\begin{equation*}
  |A(x)|\leq\frac{C}{(1+|x|)^{1+\epsilon}},
\end{equation*}
moreover, \eqref{eq.ipBstri} is compatible with \eqref{eq.smallw}
and \eqref{eq.ipbfinw}. Consequently, by Holder inequality and the
smoothing estimates \eqref{eq.smoowave+} and \eqref{eq.smoow4} we
obtain
\begin{align}\label{eq.anabla2}
  & \sum_{j\in\mathbb Z}2^{\frac
    j2}\|(A\cdot\nabla_Au)_j\|_{L^2L^2}\leq
    \\
    &\leq
    \left(\sum_{j<0}2^{\frac j2}+\sum_{j\geq0}2^{\frac j2}2^{j\left(-\frac12-\epsilon\right)}
    \right)\left(\sup_{j\in\mathbb
    Z}\frac1{2^j}\int_0^t\int_{2^j|x|<2^{j+1}}|\nabla_Au|^2\right)^{\frac12}
    \leq C\sqrt{E(0)};
    \nonumber
    \\
  & \sum_{j\in\mathbb Z}2^{\frac j2}\|(A^2u+Vu)_j\|_{L^2L^2}\leq
  \label{eq.aquadrovu}
  \\
  &\leq\left(\sum_{j<0}2^{\frac j2}+\sum_{j\geq0}2^{-2j\epsilon}
    \right)\left(\sup_{j\in\mathbb
    Z}\frac1{2^{3j}}\int_0^t\int_{2^j|x|<2^{j+1}}|u|^2\right)^{\frac12}
    \nonumber
    \\
    &\sim C\left(\sup_{j\in\mathbb
    Z}\frac1{2^{2j}}\int_0^t\int_{|x|=2^j}|u|^2\,d\sigma\right)^{\frac12}
    \leq C\sqrt{E(0)}.
    \nonumber
\end{align}
By \eqref{eq.solwave}, \eqref{eq.anabla}, \eqref{eq.anabla2} and
\eqref{eq.aquadrovu} the proof is complete. \hfill$\square$

\appendix

\section{Magnetic Hardy's inequality}\label{sec.app}

We devote an Appendix to the magnetic version of Hardy's Inequality.
\begin{theorem}\label{thm.hardy}
  Let $n\geq3$ and let $A:\R^n\to\R^n$, $\nabla_A=\nabla-iA$. Then, for any $f\in D(H_A)$
  the following inequality
  holds:
  \begin{equation}\label{eq.hardy}
    \int_{\R^n}\frac{|f|^2}{|x|^2}\,dx\leq\frac{4}{(n-2)^2}\int_{\R^n}|\nabla_Af|^2\,dx.
  \end{equation}
\end{theorem}

\begin{proof}
  We only need to prove \eqref{eq.hardy} for $f\in\mathcal
  C^\infty_0$, then we conclude by density.
  Let us observe that, for all $\alpha\in\R$,
  \begin{align}
    0 & \leq\int_{\R^n}|\nabla_Af+\alpha\frac{x}{|x|^2}f|^2\,dx
    \label{eq.ardi1}
    \\ &
    =\int_{\R^n}|\nabla_Af|^2\,dx+\alpha^2\int_{\R^n}\frac{|f|^2}{|x|^2}\,dx
    +2\alpha\Re\int_{\R^n}\overline
    f\frac{x}{|x|^2}\cdot\nabla_Af\,dx.
    \nonumber
  \end{align}
  By integration by parts, using the Leibnitz formula
  \begin{equation*}
    \nabla_A(fg)=g\nabla_Af+f\nabla g,
  \end{equation*}
  we see that
  \begin{equation*}
    2\alpha\Re\int_{\R^n}\overline
    f\frac{x}{|x|^2}\cdot\nabla_Af\,dx=-\alpha\int_{\R^n}
    |f|^2\text{div}\,\frac{x}{|x|^2}\,dx=-(n-2)\alpha
    \int_{\R^n}
    \frac{|f|^2}{|x|^2}\,dx.
  \end{equation*}
  Using this in \eqref{eq.ardi1} we have
  \begin{equation*}
    \left\{-\alpha^2+(n-2)\alpha\right\}\int_{\R^n}
    \frac{|f|^2}{|x|^2}\,dx\leq\int_{\R^n}
    |\nabla_Af|^2\,dx,
  \end{equation*}
  for all $\alpha\in\R$. Now we observe that
  \begin{equation*}
    \max_{\alpha\in\R}\left\{-\alpha^2+(n-2)\alpha\right\}=\frac{(n-2)^2}{4},
  \end{equation*}
  and this completes the proof.
\end{proof}


TITLE: Find an equation for the plane that contains the following line and passes through point P
QUESTION [4 upvotes]: How do you determine the plane which contains the line
\begin{align}
x & = -1 + 3t \\
y & = 5 + 2t \\
z & = 2 + t
\end{align}
and passes through the point $P = (2,4,-1)$?

REPLY [3 votes]: Here's another way (it's always good to know more than one way to solve a problem).
Your plane goes through $(-1,5,2)$ and $(2,7,3)$ (obtained by taking $t=0$ and $t=1$, respectively) and also $(2,4,-1)$. If your plane is $$ax+by+cz+d=0$$ then each of these three points gives you an equation relating the four unknowns $a,b,c,d$. So you get three homogeneous linear equations in 4 unknowns. Presumably, you know how to solve such a system. You'll get a one-parameter family of solutions (because $akx+bky+ckz+dk=0$ is the same plane, for any non-zero value of $k$); just pick any member of this family.


TITLE: Does the potential exist?
QUESTION [2 upvotes]: Verify Green's theorem for $X(x,y)=(xy^2,-yx^2)$ in the circle of radius $R$ with center $(0,0)$.

I think there is a mistakein the field. I suppose the first thing I should do is to find a function $F$ such that $\nabla F= X$. I don't think it is possible: $\displaystyle{\int xy^2 = \frac{1}{2}x^2y^2+g(y)}$ and then it should be $\displaystyle{\frac{\partial}{\partial y}\left(\frac{1}{2}x^2y^2+g(y)\right)}=-yx^2$ but $\displaystyle{\frac{\partial}{\partial y}\left(\frac{1}{2}x^2y^2+g(y)\right)=yx^2+g'(y)}$ since $g$ only has the $y$ variable is impossible to get $-yx^2$

REPLY [2 votes]: The Green theorem allows us to write
$$
\oint_C \vec{X}\cdot d\vec{r} = \iint_S (\frac{\partial X_2}{\partial x}-\frac{\partial X_1}{\partial y})\; dS
$$
where $S$ is the disc of radius $R$ centered at $(0,0)$, $X_2=-yx^2$ and $X_1=xy^2$. Therefore, the integral equals
$$
\int_0^{2\pi}\int_0^R (-2r^2\cos \theta\sin\theta-2r^2\cos \theta\sin\theta)rdrd\theta = 0
$$
Alternatively,
$$
\oint_C \vec{X}\cdot d\vec{r} = \int_0^{2\pi} \vec{X}(t) ||\vec{v}(t) ||\; dt = \int_0^{2\pi} \pmatrix{R^3\cos t \sin^2 t\\-R^3\cos^2 t \sin t}\cdot \pmatrix{R\cos t \\ R\sin t}dt = \int_0^{2\pi} 0\; dt = 0
$$
I think what is important to note here is that although the integral equals $0$ on a closed curve, the field $\vec{X}$ does not have a potential. It works the other way around: if $\vec{X}$ did have a potential, then we could have written $\oint_C \vec{X}\cdot d\vec{r}=0$ without any computations.


TITLE: Inverse of $f(x) = xe^x-x$
QUESTION [5 upvotes]: I'm wondering if there is a way to obtain the inverse of the function $y=xe^x-x$. I am aware of the use of Lambert's W function in the inverse of $xe^x$ but as can be seen this is a different animal altogether. I have plotted the function and the inverse looks close to the W function.
This is related to a problem I'm working on in which I need to find the density of the random variable $Y=Xe^X-X$, where I know the density of X. I am aware that this function is not one-to-one. For my purposes, we can restrict to $x>0$. Any help would be greatly appreciated!!

REPLY [0 votes]: Beside the formal answer in terms of the generalized Lambert function, we can obtain a good approximation of the inverse at the price of a single iteration of Halley method using $x_0=W(y)$. This gives
$$x_1=W(y)+\frac{2 ((y-1) W(y)+y)}{2 \left(2 (y-1) e^{W(y)}+e^{2 W(y)}+y (y-1)+1\right)+y
   W(y)}$$ We could even do better changing from Halley to Householder (the formula is too long to be typed here).
$$\left(
\begin{array}{cccc}
y &  x_ 1\text{  (Halley)}& x_ 1\text{  (Householder)} & \text{solution} \\
 1 & 0.79480270709 & 0.80794504316 &  0.80646599424 \\
 2 & 1.05568629122 & 1.06039805820 &  1.06009031989 \\
 3 & 1.23095181927 & 1.23340361714 &  1.23329258687 \\
 4 & 1.36596225621 & 1.36747274984 &  1.36742103137 \\
 5 & 1.47681961058 & 1.47784536126 &  1.47781737575 \\
 6 & 1.57134651217 & 1.57208888765 &  1.57207216458 \\
 7 & 1.65400279510 & 1.65456484098 &  1.65455411438 \\
 8 & 1.72759676052 & 1.72803683495 &  1.72802957840 \\
 9 & 1.79402191858 & 1.79437560652 &  1.79437048920 \\
 10 & 1.85462068870 & 1.85491094750 &  1.85490721630
\end{array}
\right)$$


TITLE: Inverse image of a diffeomorphism
QUESTION [1 upvotes]: Let $$f: (0, \infty ) \times (- \pi , - \pi) \to \mathbb{R}^2 \setminus ( (- \infty , 0] \times \{0\})$$
$$f(r, \alpha)=(r \cos \alpha , r \sin \alpha) $$
Find $f^{-1 }(A)$, where
$$A = \{ (x,y) \in \mathbb{R}^2 \setminus ( (- \infty , 0] \times \{0\}):  (x-\frac{1}{2} )^2+y^2< \frac{1}{4} \}$$
$$(r \cos \alpha-\frac{1}{2})^2+r^2 \sin^2 \alpha < \frac{1}{4} $$
$$r^2-r \cos \alpha< 0 $$
$$r - \cos \alpha< 0$$
Thus
$f^{-1 }(A)= \{(r, \alpha) \in (0, \infty ) \times (- \pi , - \pi): r< \cos \alpha  \}$
It is correct?

REPLY [0 votes]: Yep, this is correct. I checked this by visualizing, which I find helpful, so here's a way to do that: Note that $A$ is the interior of the circle with radius $\frac{1}{2}$ centered at $(\frac{1}{2}, 0)$. If you do a polar plot of $r < \cos(\alpha)$, that's exactly what you get:

Which makes sense, because $f$ is exactly the transformation we use when doing polar plots (it takes you from $(r, \alpha)$ space to $(x, y)$ space).
Bonus: If you view the $(r, \alpha)$ space as a rectangle with base running from $(-\pi, \pi)$ and height running from $(0, \infty)$, $f$ can be visualized as taking horizontal slices of the rectangle and wrapping them around to form circular regions.


TITLE: Unitary element in a C*-algebra
QUESTION [0 upvotes]: Suppose $\Bbb T$ is the unit circle and $M$ is the C*-algebra of all $2\times 2$ complex matrices. Consider the C*-algebra $A: = C(\Bbb T, M)$. Let $E$ and $F$ be the projections in $A$ given by
$$E(e^{i\theta})= \begin{bmatrix}0& 0\\\phantom{}0& \phantom{}1\end{bmatrix},~~~~~~~~~~~~~~~~~~~F(e^{i\theta})= \frac{1}{2}\begin{bmatrix}1-\cos\theta& -\sin\theta\\\phantom{}-\sin\theta& \phantom{}1+\cos\theta\end{bmatrix}$$
$(0\leq \theta\leq 2\pi)$, and let $U$ be the unitary element $(exp i\pi E)(exp i\pi F)$ of $A$. Show that $$U(e^{i\theta})= e^{i\theta} P + e^{-i\theta} Q~~~~~~(0\leq \theta\leq 2\pi)$$
where $P$ and $Q$ are the projections in $A$ given by $$P=\frac{1}{2}\begin{bmatrix}1& -i\\\phantom{}i& \phantom{}1\end{bmatrix},~~~~~~~~~~~~~~~~~~~Q=\frac{1}{2}\begin{bmatrix}1& i\\\phantom{}-i& \phantom{}1\end{bmatrix}$$
Deduce that $U$ is not itsef an exponential unitary.
Please help me. Thanks.

REPLY [2 votes]: The exponential of an idempotent $R$ is very easy to calculate: if $R^2=R$, then
$$
e^{i\pi R}=\sum_{k=0}^\infty\frac{i^k\,\pi^k\,R^k}{k!}
=I+\sum_{k=1}^\infty\frac{i^k\,\pi^k\,R}{k!}
=I-R+R\left(\sum_{k=0}^\infty\frac{i^k\pi^k}{k!}\right)\\
=I-R+e^{i\pi}R=I-2R.
$$
Then
$$
U(e^{i\theta})=e^{i\pi E(e^{i\theta})}e^{i\pi F(e^{i\theta})}
=(I-2E(e^{i\theta}))(I-2F(e^{i\theta}))\\
=\begin{bmatrix}1&0\\0&-1\end{bmatrix}\begin{bmatrix}\cos\theta&\sin\theta\\ \sin\theta&-\cos\theta\end{bmatrix}
=\begin{bmatrix}\cos\theta&\sin\theta\\ -\sin\theta&\cos\theta\end{bmatrix}.
$$
On the other hand,
$$
e^{i\theta}P+e^{-i\theta}Q=\begin{bmatrix}\frac12(e^{i\theta}+e^{-i\theta})&-\frac i2(e^{i\theta}-e^{-i\theta})\\ \frac i2(e^{i\theta}-e^{-i\theta})&\frac12(e^{i\theta}+e^{-i\theta})\end{bmatrix}
=\begin{bmatrix}
\cos\theta&\sin\theta\\ -\sin\theta&\cos\theta
\end{bmatrix}.
$$
As for the last part, I don't know what "exponential unitary" means.


TITLE: Conceptual question about field transformation
QUESTION [5 upvotes]: (c.f Conformal Field Theory by Di Francesco et al, p39)
From another source, I understand the mathematical derivation that leads to eqn (2.126) in Di Francesco et al, however conceptually I do not understand why the equation is the way it is. The equation is $$\Phi'(x) - \Phi(x) = -i\omega_a G_a \Phi(x)$$ G is defined to be the generator that transforms both the coordinates and the field as far as I understand (so it is the full  generator of the symmetry transformation) and yet it seems there are no instances of the transformed coordinate system (the primed system) present on the LHS of the equation.
Another example is the equation $\Phi'(x') = D(g)\Phi(x)$, where the field transforms under a representation $D$ of some Lie group. $D$ is then decomposed infinitesimally as $1 + \omega \cdot S$ where $S$ is the spin matrix for the field $\Phi$. So, when $S$ acts on the field, should it not only transform the spin indices on the field? But it appears we are in the primed system of the coordinates on the LHS meaning that the coordinates have changed too?
Can someone provide some thoughts?
I was also wondering how Di Francesco obtained eqn (2.127).  Here is what I was thinking: Expand $\Phi(x')$, keeping the 'shape' of the field (as Grenier puts it) the same, so $\Phi(x') \approx \Phi(x) + \omega_a \frac{\delta \Phi(x')}{\delta \omega_a}$.  Now insert into (2.125) gives $$\Phi'(x') = \Phi(x') - \omega_a \frac{\delta x^{\mu}}{\delta \omega_a}\frac{\partial \Phi(x')}{\delta x^{\mu}} + \omega_a \frac{\delta F}{\delta \omega_a}(x)$$ which is nearly the right result except Di Francesco has a prime on the x at the final term.  My thinking was he defined an equivalent function F in the primed system, i.e $F(\Phi(x)) \equiv F'(\Phi(x'))$.  Are these arguments correct?

REPLY [5 votes]: Group actions in classical field theory.
Let a classical theory of fields $\Phi:M\to V$ be given, where $M$ is a ``base" manifold and $V$ is some target space, which, for the sake of simplicity and pedagogical clarity, we take to be a vector space.  Let $\mathscr F$ denote the set of admissible field configurations, namely the set of admissible functions $\Phi:M\to V$ which we consider in the theory.
In a given field theory, we often consider an action of a group $G$ on the set $\mathscr F$ of field configurations which specifies how they ``transform" under the elements of the group.  Let's call this group action $\rho_\mathscr F$, so $\rho_\mathscr F$ is a group homomorphism mapping elements $g\in G$ to bijections $\rho_\mathscr F(g):\mathscr F \to \mathscr F$.  Another way of saying this is that
\begin{align}
 \rho_{\mathscr F}:G\to \mathrm{Sym}(\mathscr F)
\end{align}
where $\mathrm{Sym}(\mathscr F)$ is simply the group of bijections mapping $\mathscr F$ to itself.
Now, it also often happens that we can write such a group action in terms of two other group actions.  The first of these is an action of $ G$ on $ M$, namely an action of the group on the base manifold on which the field configurations are defined.  The second is an action of $G$ on $V$, namely an action of the group on the target space of the field configurations.  Let the first be denoted $\rho_M$ and the second $\rho_V$, so explicitly
\begin{align}
  \rho_M &: G \to \mathrm{Sym}(M)\\
  \rho_V &: G \to \mathrm{Sym}{V}.
\end{align}
In fact, usually the group action $\rho_\mathscr F$ is written in terms of $\rho_M$ and $\rho_V$ as follows:
\begin{align}
  \rho_{\mathscr F}(g)(\Phi)(x) = \rho_V(g)(\Phi(\rho_M(g)^{-1}(x))), \tag{$\star$}
\end{align}
or, writing this in a perhaps clearer way that avoids so many parentheses,
\begin{align}
  \rho_\mathscr F(g)(\Phi) = \rho_V(g)\circ \Phi \circ \rho_M(g)^{-1}.
\end{align}
Making contact with Di Francesco et. al.'s notation - part 1
To make contact with Di Francesco's notation, notice that if we use the notation $x'$ for a transformed base manifold point, $\mathcal F$ for the target space group action, and $\Phi'$ for the transformed field configuration, namely if we use the shorthands
\begin{align}
  x' = \rho_M(g)(x), \qquad \rho_V(g) = \mathcal F, \qquad \Phi' = \rho_\mathscr F(g)(\Phi),
\end{align}
then ($\star$) can be written as follows:
\begin{align}
 \Phi'(x') = \mathcal F(\Phi(x)).
\end{align}
which is precisely equation 2.114 in Di Francesco
Lie group actions and infinitesimal generators.
Now, suppose that $G$ is a matrix Lie group with Lie algebra $\mathfrak g$.  Let $\{X_a\}$ be a basis for $\mathfrak g$, then any element of $X\in\mathfrak g$ can be written as $\omega_aX_a$ (implied sum) for some numbers $\omega_a$.  Moreover, $e^{-i\epsilon\omega_aX_a}$ is an element of the Lie group $G$ for each $\epsilon\in\mathbb R$.  In particular, notice that we can expand the exponential about $\epsilon = 0$ to obtain
\begin{align}
  e^{-i\epsilon\omega_aX_a} = I_G - i\epsilon\omega_aX_a + O(\epsilon^2).
\end{align}
where $I_G$ is the identity on $G$.  So the $X_a$ are the infinitesimal generators of this exponential mapping.  Notice that the generators are precisely the basis elements we chose for the Lie algebra.  If we have chosen a different basis, the generators would have been different.  But now, suppose we evaluate the various group actions $\rho_\mathscr F, \rho_M, \rho_V$ on an element of $G$ written in this way, then we will find that there exists functions $G_a^{(\mathscr F)}, G_a^{(M)}, G_a^{(V)}$ for which
\begin{align}
  \rho_\mathscr F(e^{-i\epsilon\omega_aX_a}) &= I_\mathscr F -i\epsilon\omega_a G_a^{(\mathscr F)} + O(\epsilon^2) \\
  \rho_M(e^{-i\epsilon\omega_aX_a}) &= I_M -i\epsilon\omega_a G_a^{( M)} + O(\epsilon^2) \\
  \rho_V(e^{-i\epsilon\omega_aX_a}) &= I_V -i\epsilon\omega_a G_a^{(V )} + O(\epsilon^2),
\end{align}
and these functions $G_a$ are, by definition, the infinitesimal generators of these three group actions.  Notice, again, that the generators we get depend on the basis we chose for the Lie algebra $\mathfrak g$.
Making contact with Di Francesco et. al.'s notation - part 2
Di Francesco simply uses the following notations:
\begin{align}
 G_a^{(\mathscr F)} = G_a, \qquad G_a^{(M)}(x) = i \frac{\delta x}{\delta \omega_a}, \qquad G_a^{(V)}(\Phi(x)) = i\frac{\delta \mathcal F}{\delta \omega_a}(x).
\end{align}
Don't you wish the authors would explain this stuff better? ;)
Example. Lorentz vector field.
As an example, consider a theory of fields containing a Lorentz vector field $A$. Then the base manifold $M$ would be Minkowski space, the group $G$ would be the Lorentz group,
\begin{align}
  M = \mathbb R^{3,1}, \qquad G = \mathrm{SO}(3,1),
\end{align}
and the relevant group actions would be defined as follows for each $\Lambda \in \mathrm{SO}(3,1)$:
\begin{align}
  \rho_M(\Lambda)(x) &= \Lambda x \\
  \rho_V(\Lambda)(A(x)) &= \Lambda A(x) \\
  \rho_\mathscr F(\Lambda)(A)(x) &= \Lambda A(\Lambda^{-1}x).
\end{align}


TITLE: 1st derivatives of $f(\alpha) = \frac{\sin(2\alpha)}{\sin(\alpha+1)}$
QUESTION [1 upvotes]: Could someone help me out with the following?
I have to get a maximum using the derivative
$$f(\alpha) = \frac{\sin(2\alpha)}{\sin(\alpha+1)}$$
$$f(\alpha) = \sin(2\alpha) \cdot (\sin(\alpha+1))^{-1}$$
$$f'(\alpha) = \sin(2\alpha) \cdot ((\sin(\alpha+1))^{-1})' + (\sin(2\alpha))' \cdot (\sin(\alpha+1))^{-1}$$
$$f'(\alpha) = \sin(2\alpha) \cdot \color{red}{\cdots} + 2 \cos(2\alpha) \cdot (\sin(\alpha+1))^{-1}$$
I can't get any furher then this

REPLY [0 votes]: As mathematics2x2life has pointed out, the quotient rule can be used.  However, I will address directly the question of what to do with
$$
\frac{d}{d\alpha} (\sin(\alpha+1))^{-1}.
$$
You can say it's $\dfrac{d}{d\alpha} u^{-1}$, so that it's
$$
\frac{d}{d\alpha} u^{-1} = (-1)u^{-2}\cdot\frac{du}{d\alpha} = -u^{-2}\cdot\frac{d}{d\alpha} \sin(\alpha+1) = \frac{-1}{u^2}\cdot\cos(\alpha+1).
$$
After that you would multiply by $\dfrac{d}{d\alpha}(\alpha+1)$, but you'd just be multiplying by $1$, so that doesn't change anything.  Then you have
$$
\frac{-1}{(\sin(\alpha+1))^2}\cdot\cos(\alpha+1).
$$


TITLE: providing a function with sets
QUESTION [0 upvotes]: So I'm trying to show $F(S)\cap F(T)⊆F(S\cap T)$ is false.
Let $Y\in F(S)\cap F(T) $ then $ X\in S$ and $X\in T$
with $F(x) =Y$.
So $X\in S\cap T$
But after this I can seem to only prove true and not false.

REPLY [1 votes]: To show it is false, it suffices to exhibit a counterexample. Let $S=\{1,2\}$ and $T=\{1,3\}$ and consider the function $F\colon \{1,2,3\}\to \{1,2\}$ given by $F(1)=1$ and $F(2)=F(3)=2$.
Then $F(S)=F(T)=\{1,2\}$, whereas $F(S\cap T)=\{1\}$. So $F(S)\cap F(T)=\{1,2\}$ which is not a subset of $\{1\}$. (In fact, the reverse inclusion holds.)


TITLE: Is there an easy way to tell whether this "Curlmeter" would rotate or not?
QUESTION [1 upvotes]: Let us say we have the following symmetrical apparatus:

Four equal positive charges, all connected to a shaft that can rotate, the connecting rods are insulated, and so does the shaft.
Now suppose that a positive charge, less in magnitude than the four previous ones, pops out in the indicated location below:

Is there any way to tell whether the apparatus would spin without brute forcing the problem with Newtonian mechanics?

REPLY [2 votes]: In the example you drew, there will obviously be a clockwise torque, as you indicated with the arrow. You can make the extra charge as close as you like to one of the arms of the curl-meter, so that force can be as large as desired.
The curl-meter is supposed to mock up the curl operator, which is a local thing. Derivatives are local. That means that you need to imagine taking the limit as the curl-meter's size approaches zero.
The OP asks in a comment:

The confusing thing is since the curl of an E-field is null, then so must be its circulation around any loop, so the work done around the circular path by the force generated by the small charge must be zero, and so the curlimter shoud not turn at all, or is it that it rotates clockwise and then gets back to its original position, i.e., it oscillates?

If you rotate the large meter (which isn't really a curl-meter because it's not infinitesimal in size), then the work done is $\int_{\theta_1}^{\theta_2} \tau d\theta$. This work will be zero if you integrate over one full rotation, because this field is conservative. It doesn't matter whether you consider free rotation or not. The work done by the electric field is zero, for example, if you rotate the meter by hand using a crank. The fact that the work integrates to zero over one cycle does not imply that $\tau=0$ for a particular value of $\theta$.