# Applied linear operators and spectral methods/Differential equations of distributions
## Differential equations in the sense of distributions

We can also generalize the notion of a differential equation.
Definition:
The differential equation ${\mathcal {L}}u=f$ is a differential equation in the sense of a distribution (i.e., in the weak sense) if $f$ and $u$ are distributions and all the derivatives are interpreted in the weak sense.
Suppose ${\mathcal {L}}$ is the generalized differential operator
    ${\mathcal {L}}=a_{n}(x){\cfrac {d^{n}}{dx^{n}}}+a_{n-1}(x){\cfrac {d^{(n-1)}}{dx^{(n-1)}}}+\dots +a_{0}(x)$
where $a_{i}(x)$ is infinitely differentiable.
We seek a $u$ such that
    $\left\langle {\mathcal {L}}u,\phi \right\rangle =\left\langle f,\phi \right\rangle \qquad \forall \phi \in D$
which is taken to mean that
    $\left\langle u,{\mathcal {L}}^{*}\phi \right\rangle =\left\langle f,\phi \right\rangle \qquad \forall \phi \in D~.$
Note that
    $\left\langle a_{k}(x){\cfrac {d^{k}u}{dx^{k}}},\phi \right\rangle =\left\langle {\cfrac {d^{k}u}{dx^{k}}},a_{k}(x)~\phi \right\rangle =(-1)^{k}\left\langle u,{\cfrac {d}{dx^{k}}}[a_{k}(x)~\phi ]\right\rangle$
Therefore,
    ${\mathcal {L}}^{*}\phi =(-1)^{n}~{\cfrac {d^{n}(a_{n}\phi )}{dx^{n}}}+(-1)^{n-1}~{\cfrac {d^{(n-1)}(a_{n-1}\phi )}{dx^{(n-1)}}}+\dots +a_{0}~\phi ~.$
Here ${\mathcal {L}}^{*}$ is the formal adjoint of ${\mathcal {L}}$. We can check that $({\mathcal {L}}^{*})^{*}={\mathcal {L}}$. If ${\mathcal {L}}={\mathcal {L}}^{*}$ we say that ${\mathcal {L}}$ is formally self adjoint.
For example, if $n=2$ then
    ${\mathcal {L}}=a_{2}(x){\cfrac {d^{2}}{dx^{2}}}+a_{1}(x){\cfrac {d}{dx}}+a_{0}(x)$
Then
    ${\mathcal {L}}^{*}\phi ={\cfrac {d^{2}(a_{2}\phi )}{dx^{2}}}-{\cfrac {d(a_{1}\phi )}{dx}}+a_{0}~\phi$
or,
    ${\mathcal {L}}^{*}\phi =a_{2}~\phi ''+(2a'_{2}-a_{1})\phi '+(a''_{2}-a'_{1}+a_{0})\phi ~.$
Therefore, for ${\mathcal {L}}^{*}$ to be self adjoint,
    ${\mathcal {L}}^{*}\phi ={\mathcal {L}}\phi =a_{2}\phi ''+a_{1}\phi '+a_{0}\phi$
Hence
    $a'_{2}=a_{1}\implies a''_{2}=a_{1}'~.$
In such a case, ${\mathcal {L}}$ is called a Sturm-Liouville operator.

### Example

To solve the differential equation
    $x{\cfrac {du}{dx}}=0$
we seek a distribution $u$ which satisfies
    $\left\langle xu',\phi \right\rangle =-\left\langle u,(x\phi )'\right\rangle =0$
Define $\psi :=(x\phi )'$. Then $\psi$ must be a test function. We can show that $\psi$ is a test function if and only if
    ${\text{(2)}}\qquad \int _{\infty }^{\infty }\psi (x){\text{d}}x=0\qquad {\text{and}}\qquad \int _{0}^{\infty }\psi (x){\text{d}}x=0$
Now let us pick two test functions $\phi _{0}$ and $\phi _{1}$ satisfying
    $\int _{-\infty }^{\infty }\phi _{0}(x){\text{d}}x=0\qquad {\text{and}}\qquad \int _{0}^{\infty }\phi _{0}(x){\text{d}}x=1$
and
    $\int _{-\infty }^{\infty }\phi _{1}(x){\text{d}}x=1\qquad {\text{and}}\qquad \int _{0}^{\infty }\phi _{1}(x){\text{d}}x=0$
Then we can write any arbitrary test function $\phi (x)$ as a linear combination of $\phi _{0}$ and $\phi _{1}$ plus a terms which has the form of $\psi$:
    $\phi (x)=\phi _{0}(x)\int _{0}^{\infty }\phi (s)~ds+\phi _{1}(x)\int _{-\infty }^{\infty }\phi (s)~ds+\psi (x)$
which serves to define $\psi (x)$. Note that $\psi$ satisfies equation (2).
Since $\left\langle u,\psi \right\rangle =0$, the action of $u$ on $\phi$ is given by
    $\left\langle u,\phi \right\rangle =\left\langle u,\phi _{0}\right\rangle \int _{\infty }^{\infty }H(x)\phi (s)ds+\left\langle u,\phi _{1}\right\rangle \int _{\infty }^{\infty }\phi (s)ds$
Therefore the solution is
    $u=C_{1}~H(x)+C_{2}$
where $C_{1}:=\left\langle u,\phi _{0}\right\rangle$ and $C_{2}:=\left\langle u,\phi _{1}\right\rangle$.
Template:Lectures