MATLAB TUTORIAL. Part 1.4: Operator Methods

Prof. Vladimir A. Dobrushkin

This tutorial contains many matlab scripts.
You, as the user, are free to use all codes for your needs, and have the right to distribute this tutorial and refer to this tutorial as long as this tutorial is accredited appropriately. Any comments and/or contributions for this tutorial are welcome; you can send your remarks to

Email Vladimir Dobrushkin

Operator Methods

Differential equations play a very significant role both in mathematics and in physics because they describe a very wide spectrum of physical phenomena. Therefore, the construction of solutions of differential equations presents the very significant problem. This web site gives an introduction to inverse differential operators.

It is convenient to introduce the notation \( \texttt{D} = {\text d}/{\text d}x \) for the derivative operator. The main problem with definding its inverse is the kernel of the derivative operator which is not zero and it is spanned on constants. From calculus it is known that

\[ \texttt{D}^{-1} f (x) = \int {\text d} x\, f(x) + C , \]
for an arbitrary constant C, is only the right inverse of the derivative operator:
\[ \texttt{D}\,\texttt{D}^{-1} f (x) = \texttt{D}\int {\text d} x\, f(x) + \texttt{D}\, C =f(x), \]
but
\[ \texttt{D}^{-1}\texttt{D}\, f (x) = \int {\text d} x\, f'(x) + C = f(x) +C . \]
Therefore, to determine the inverse derivative operator uniquely, one needs to restrict it on the appropriate set of functions. For instance, we will see later in Chapter 6 that the Laplace transform provides the tool to define functions of the derivative operator acting on the space of functions on half line \( [0, \infty ) \) so that f(0) = 0. In this case, the inverse operator becomes
\[ \left( \texttt{D}^{-1} f \right) (x) = \int_0^x {\text d} t\, f(t) \qquad \Longrightarrow \qquad \texttt{D}^{-1} \texttt{D} = \texttt{D}\, \texttt{D}^{-1} = {\bf I} , \]
where I is the identinty operator.

Our next operator to consider is

\[ L \left[ \texttt{D} \right] y (x) = \left( \texttt{D} + k \right) y(x) = y' (x) + k\, y(x) , \]
where k is a real number. We define its inverse by solving the differential equation
\[ L \left[ \texttt{D} \right]^{-1} f (x) = y(x) \qquad \Longleftrightarrow \qquad \left( \texttt{D} + k \right) y(x) = f(x) . \]
Upon multiplication by an integrating factor \( \mu (x) = e^{kx} , \) we reduce the differential equation to an exact one:
\[ \frac{\text d}{{\text d}x} \left[ e^{kx} \, y(x) \right] = e^{kx} \, f (x) \qquad \Longleftrightarrow \qquad y(x) = \left( \texttt{D} + k \right)^{-1} f(x) = e^{-kx} \int {\text d} x\, e^{kx}\, f(x) + C\, e^{-kx} , \]
where, as usual, C is an arbitrary constant. For instance,
\begin{align*} \left( \texttt{D} + k \right)^{-1} 1 &= \frac{1}{k} + C\, e^{-kx} , \\ \left( \texttt{D} + k \right)^{-1} e^{-kx} &= x\, e^{-kx} + C\, e^{-kx} , \\ \left( \texttt{D} + k \right)^{-1} \left( e^{-kx} -1 \right) &= x\, e^{-kx} - \frac{1}{k} + C\, e^{-kx} . \end{align*}
To eliminate this troublemaker, C, we need to impose an initial condition. For example, if we consider the set of functions that vanish at x = 0, we get the inverse operator:
\[ \left( \texttt{D} + k \right)^{-1} f(x) = e^{-kx} \int_0^x {\text d} t\, e^{kt}\, f(t) . \]
This function space does not contain 1 and the exponential function \( e^{-kx} , \) considered previously. We can apply the latter inverse operator to \( e^{-kx} -1 \) to obtain
\[ \left( \texttt{D} + k \right)^{-1} \left( e^{-kx} -1 \right) = x\,e^{-kx} + \frac{1}{k} \left( e^{-kx} -1 \right) . \]
Comparison of the latter two formulas shows that the inverse operator depends on the set of functions it is applied to.

Now we consider the second order differential operator

\[ L \left[ \texttt{D} \right] y (x) = \left( \texttt{D}^2 + k^2 \right) y(x) = y'' (x) + k^2 \, y(x) . \]
where k is a real number. Finding its inverse required application of the variation of parameter and includes two arbitrary constants:
\[ \left( \texttt{D}^2 + k^2 \right)^{-1} f(x) = \frac{1}{k} \int_{x_0}^x f(t)\,\sin k(x-t)\,{\text d}t + C_1 \cos kx + C_2 \sin kx . \]
This operator is only right inverse to our second order differential operator \( \texttt{D}^2 + k^2 , \) but it becomes inverse if we consider a set of functions that satisfy the homogeneous initial conditions \( y(x_0 ) =0 \quad\mbox{and} \quad y' (x_0 ) =0 . \)

prompt='Input a value for y in terms of x: '
syms x
y=input(prompt);
answer=diff(y,x,2)+(x^2)*y


			Complete