# How to define the square root of an operator [duplicate]

How can I define the operator $$\sqrt{m^2-\frac{\partial^2}{\partial x^2}}$$, such that it acts on the function $$\psi(x)$$ as follows: $$\begin{eqnarray*} \sqrt{m^2-\frac{\partial^2}{\partial x^2}}\psi(x)&=&\left[\sum^{\infty}_{n=0}{\frac{1}{2} \choose n}{(m^2)}^{\frac{1}{2}-n}\left(-\frac{\partial^2}{\partial x^2}\right)^n\right]\psi(x)\\ &=&m\psi(x)-\frac{1}{2m}\frac{\partial^2}{\partial x^2}\psi(x)-\frac{1}{8m^3}\frac{\partial^4}{\partial x^4}\psi(x)+\cdots\,. \end{eqnarray*}$$ Is it possible to define this operator exactly, rather than taking the first few terms of the series expansion as an approximation?

This question originates from quantum field theory. By subtracting the first term (which is irrelevant in the non-relativistic limit) and dropping all higher-order terms, we obtain the non-relativistic Hamiltonian for a free scalar theory in one dimension: $$-\frac{1}{2m}\frac{\partial^2}{\partial x^2}\,.$$ I want to perform numerical simulations using Mathematica. However, I do not know how to define this operator.

This is my first time asking a question, and if I made any mistakes, I apologize.

• Simply write op = Sqrt[m^2 - D[#, {x, 2}]] &; Mar 6 at 8:07
• @DanielHuber This is not the desired one. While a series expansion of your operator will yield the powers of 2nd derivative of $\psi(x)$, The correct series expansion should contains the 4th derivative, 6th derivative, and so forth, of $\psi(x)$. Mar 6 at 8:19
• Welcome to Mathematica StackExchange! It is not completely clear what you want to do with your operator. For example, of course you can define it via infinite sum: op = Sum[Binomial[1/2, n] m^(1 - 2 n) (-1)^n D[#, {x, 2 n}], {n, 0, ∞}] &. Then you use it as op[f[x]]. In version 14, there is a new function TruncateSum, which you can then use to get the first $n$ terms: TruncateSum[op[f[x]],3] returns m f[x]-f''[x]/(2 m)-f''''[x]/(8 m^3). Mar 6 at 14:54
• Does this answer your question? Exponential of a Differential Operator Don't get confused by the title; among the answers, there are solutions for arbitrary function on operators! Mar 6 at 15:00