Solution of a second order differential equation Let $I:=[x_0,x_1]\subset \mathbb{R}$, $a\in C^1(I), a>0$, $f\in C^0(I)$. I want to find the $ u\in C^2(I)$ solution the the second order differential equation $$(au')'=f$$ satisfying $u(x_0)=u(x_1)=0$.  
By substituting $v=u'$ I got a solution $$v(x)=-a(x)^{-1}+a(x)^{-1}\int_{x_0}^xf(s)ds$$ Now I should get $u$ by integrating again, but then my solution doesn't satisfy $u(x_1)=0$; I don't get it to work.  Thank you.
 A: I was facing challenges in comprehending our OP Zolf69's solution for $v(x) = u'(x)$ until, apoarently following the sugfestions Did made in his comment, he (Zolf69) changed it to it's present form.  In any event, we have, from
$(a(x)v(x))' = f(x), \tag{1}$
that
$a(x)v(x) - a(x_0)v(x_0) = \int_{x_0}^x(a(s)v(s))'ds$
$= \int_{x_0}^x f(s)ds, \tag{2}$
whence
$a(x)v(x) = a(x_0)v(x_0) + \int_{x_0}^x f(s)ds, \tag{3}$
holding for any $x \in [x_0, x_1]$.  Since $a(x) > 0$, we may isolate $v(x)$ from (3), thusly:
$v(x) = a(x_0)v(x_0) \dfrac{1}{a(x)} +\dfrac{1}{a(x)} \int_{x_0}^x f(s)ds. \tag{4}$
We may now re-insert $u'(x) = v(x)$ into (4) to obtain
$u'(x) = a(x_0)u'(x_0) \dfrac{1}{a(x)} +\dfrac{1}{a(x)} \int_{x_0}^x f(s)ds; \tag{5}$.
we again may integrate (5) with respect to $x$:
$u(x) - u(x_0) = \int_{x_0}^x u'(t)dt$
$= a(x_0)u'(x_0) \int_{x_0}^x \dfrac{1}{a(t)}dt + \int_{x_0}^x(\dfrac{1}{a(t)} \int_{x_0}^t f(s)ds)dt; \tag{6}$
we isolate $u(x)$:
$u(x) = a(x_0)u'(x_0) \int_{x_0}^x \dfrac{1}{a(t)}dt + \int_{x_0}^x(\dfrac{1}{a(t)} \int_{x_0}^t f(s)ds)dt + u(x_0); \tag{7}$
choosing $u(x_0) = 0$ we obtain
$u(x) = a(x_0)u'(x_0) \int_{x_0}^x \dfrac{1}{a(t)}dt + \int_{x_0}^x(\dfrac{1}{a(t)} \int_{x_0}^t f(s)ds)dt; \tag{8}$
this presents a family of solutions, parametrized by $u'(x_0)$, all of which satisfy $u(x_0) = 0$; we now merely need to adjust $u'(x_0)$ so that $u(x_1) = 0$ as well.  Setting $x = x_1$, we find via (8) that
$u(x_1) = a(x_0)u'(x_0) \int_{x_0}^{x_1} \dfrac{1}{a(t)}dt + \int_{x_0}^{x_1} (\dfrac{1}{a(t)} \int_{x_0}^t f(s)ds)dt; \tag{9}$
with $u(x_1) = 0$, (9) becomes
$a(x_0)u'(x_0) \int_{x_0}^{x_1} \dfrac{1}{a(t)}dt + \int_{x_0}^{x_1} (\dfrac{1}{a(t)} \int_{x_0}^t f(s)ds)dt = 0, \tag{10}$
a simple linear equation in the single variable $u'(x_0)$; since $0 < a(x) \in C^1[x_0, x_1]$, we have $0 < (1 / a(x)) \in C^1[x_0, x_1]$ as well; thus the coefficient of $u'(x_0)$, 
$a(x_0) \int_{x_0}^{x_1} \dfrac{1}{a(t)}dt \tag{11}$
is positive (and finite!) as well; thus (11) is possessed of a unique solution $u'(x_0)$ which yields a solution $u(x)$ with
$u(x_0) = u(x_1) = 0, \tag{12}$
as per request.
