# Solving 2nd order linear ODE with integral transformation

I have this differential equation $-u''(x)+\mu \cdot u(x)=f(x)$ where $x \in (0,\pi)$ with boundary conditions $u'(0)=u'(\pi)=0$ where $c$ is a constant.

I checked the values of $\mu$ where I have uniqueness of solution for any $f \in L^2(0,\pi)$. It is just about removing the cases $\mu=n^2$ when $n \in \mathbb{Z}$.

Now I have to write the problem in the way $u=K_\mu f$ where $K_\mu:L^2(0,\pi) \longrightarrow L^2(0,\pi)$ and $[K_\mu u](x)=\int_{0}^{\pi}k_\mu(x,y)f(y)$.

As far as I understood $K_\mu$ just maps the $f$ given in the problem to the solution $u$. I solved the ODE with classical methods and I get that for any $f$ the solution $K(f)$ is given by

$K(f)=\frac{1}{2\mu_1}\Big(-e^{\mu_1 x}\int_0^x {f(t)e^{-\mu_1 t}}dt+e^{-\mu_1 x} \int_0^x {f(t)e^{\mu_1 t}} dt\Big)+a_fe^{\mu_1 x}+a_fe^{-\mu_1 x}$ where $a_f=\frac{1}{2\mu_1}\frac{1}{e^{\mu_1 \pi}-e^{-\mu_1 \pi}}\Big( e^{\mu_1 \pi}\int_0^\pi {f(t)e^{-\mu_1 t}}dt+ e^{-\mu_1 \pi}\int_0^\pi{f(t)e^{\mu_1 t}} dt\Big)$.

However I see myself unable to calculate the factor $k_\mu(x,y)$ that makes $[K_\mu u](x)=\int_{0}^{\pi}k_\mu(x,y)f(y)$. Any ideas?

You want to solve for $K(x,y)$ such that $$\left(-\frac{d^2}{dx^2}+\mu\right)K(x,y)=\delta_{x}(y),\;\;\; K_x(0,y)=K_x(\pi,y)=0.$$ Then $$u(x)=\int_{0}^{\pi}K(x,y)f(y)dy$$ will satisfy $u_x(0)=u_x(\pi)=0$ and $$\left(-\frac{d^{2}}{dx^{2}}+\mu\right)\int_{0}^{\pi}K(x,y)f(y)dy = \int_{0}^{\pi}\delta_x(y)f(y)dy = f(x).$$ That's the intuitive idea of how this works. The condition that gives the `$\delta$' function behavior is that there is a discontinuity in $-K_x$ at $x=y$, with a jump of $1$ unit so that $(-K_x)_x$ is a delta with unit mass. For $0 \le x < y$, $K(x,y)$ must be a solution of $-K_{xx}+\mu K=0$, and the same must be true for $y < x \le \pi$. To piece $K$ together, $$K(x,y) = \left\{ \begin{array}{lr} C\cosh(\sqrt{\mu}x), & 0 \le x < y, \\ D\cosh(\sqrt{\mu}(x-\pi)), & y < x \le \pi. \end{array} \right.$$ where $C$ and $D$ must be chosen so that $K(x,y)$ is continuous in $x$ across $y$, but has a jump in the derivative with respect to $x$ at $y$ equal to $1$. So, there are two equations: $$C\cosh(\sqrt{\mu}y)-D\cosh(\sqrt{\mu}(y-\pi))=0, \\ C\sqrt{\mu}\sinh(\sqrt{\mu}y)-D\sqrt{\mu}\sinh(\sqrt{\mu}(y-\pi))=1.$$ This gives a matrix system: $$\begin{pmatrix} \cosh(\sqrt{\mu}y) & -\cosh(\sqrt{\mu}(y-\pi)) \\ \sinh(\sqrt{\mu}y) & -\sinh(\sqrt{\mu}(y-\pi)) \end{pmatrix} \begin{pmatrix} C \\ D \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}.$$