Solving an ODE that is piecewise defined using the Dirac Delta function 
Fix $\xi \in (0,L)$. Find function $g(\cdot; \xi) : (0,L) \rightarrow \mathbb{R}$ satisfying
$$
\begin{cases}
-\displaystyle \frac{\rm d}{{\rm d} x}\Big( a(x) \frac{{\rm d} g}{{\rm d} x} \Big) = \delta(x-\xi), & x \in (0,L),\\
g(0;\xi) = 0, & g(L;\xi) = 0,
\end{cases}
$$
where $a(x)>0$ for $x \in [0,L]$. Plot $g(x,0.2)$, $g(x,0.5)$, and $g(x,0.8)$ when $a(x) \equiv 1$ and $L = 1$.
Here, $\delta(x-\xi)$ is the Dirac Delta function centered at  $\xi \in \mathbb{R}$, defined as a (generalized) function:
$$
        \begin{aligned}
        \delta(x - \xi) =
        \begin{cases}
        \infty ~~\text{if} ~~ x = \xi,\\
        \\
        0 ~~\text{otherwise},
        \end{cases}
        ~~~~\text{and} ~~~~
        \int_{\mathbb{R}} \delta(x-\xi) \ f(x) \ {\mathrm d}x = f(\xi),
        \end{aligned}
$$
for a given function $f$. 

I am looking for assistance in setting up this problem. I know that I should integrate the ODE piecewise using the fundamental theorem of calculus, but I'm a bit lost on how this should go with the Dirac Delta function. This is a homework question, so I am requesting assistance specifically with understanding the setup of this problem, not an entire solution.
 A: I am going to look at the solution to a general problem and then approach your problem. 
$$ L(u) = f(x) \tag{1} $$
defined on $ a < x < b$ subject to homogeneous boundary conditions where $L$ is a Sturm Liouville operator
$$ L(u) \equiv \frac{\rm d }{\rm dx}\bigg( p \frac{\rm d }{\rm d x} \bigg) + q \tag{2} $$
now in the simple case we have $ p= 1$ and $ q=0$ and our operator is $ L= \frac{\rm d^{2} }{\rm dx^{2}}$ this can be solved by variation of paramters
$$ u = u_{1} v_{1} + u_{2}v_{2} \tag{3}$$
Now consider this problem 
$$ \frac{\rm d^{2} u}{\rm dx^{2}} = f(x) \tag{4}$$
with boundary conditions 
$$ BC1: u(0) = 0 \\BC2: u(L) = 0  \tag{5} $$
the homogeneous solutions correspond to 
$$ u_{1}(x) = x \\ u_{2}(x) = L - x \tag{6}$$
when you integrate
$$ v_{1}(x) = \frac{1}{L} \int_{0}^{x} f(\xi) (L-\xi)  d \xi  \tag{7} $$
$$ v_{2}(x) = -\frac{1}{L} \int_{0}^{x} f(\xi) \xi  d \xi + c_{2} \tag{8} $$
then the solution to the non-homogeneous boundary problem becomes
$$ u(x) = \frac{-x}{L} \int_{x}^{L} f(\xi)(L-\xi) d \xi -\frac{L-x}{L}\int_{0}^{x}f(\xi) \xi d\xi \tag{9} $$
we transform this into our equation
$$ u(x) =\int_{0}^{L}f(\xi) G(x|\xi) d \xi \tag{10}$$
where our green's function is
$$ G(x|\xi) =\begin{align}\begin{cases} c_{1}+c_{2}x &  0 < \xi \\ \\ d_{1}+d_{2}x  &  x > \xi \end{cases} \end{align} \tag{11}$$
applying the boundary conditions $G(0|\xi) =G(1|\xi) = 0$ 
$$ G(x|\xi) =\begin{align}\begin{cases} cx &  x < \xi \\ \\ d(x-1)  &  x > \xi \end{cases} \end{align} \tag{12}$$
in order for the greens function to be continuous
$$ c\xi = d(\xi-1) \implies d = c\frac{\xi}{\xi -1}  \tag{13}$$
this is called the jump condition
$$ \frac{\rm d}{\rm dx} c \frac{\xi }{\xi -1}(x-1) \Big|_{x=\xi} - \frac{\rm d}{\rm dx}cx \Big|_{x =\xi} = 1 \tag{14}$$
$$c \frac{\xi }{\xi -1} - c = 1  \\ c= \xi-1\tag{15}$$
then the Green's function is
$$ G(x|\xi) =\begin{align}\begin{cases} (\xi-1)x &  0 \leq  x \leq \xi \\ \\ \xi(x-1)  &  \xi \leq x \leq 1 \end{cases} \end{align} \tag{16}$$
$$ g(x|\xi) = (x-1)\int_{0}^{x} \xi f(\xi) d\xi + x \int_{x}^{1} (\xi-1) f(\xi) d\xi \tag{17}$$
