Solution
= Solution
Let
$$
I(x)=\exp\left(\int^xp(s)\,ds\right).
$$
The <integrating factor> identity $(Iy)'=If$ gives
$$
y(x)=I(x)^{-1}\left(C+\int^xI(t)f(t)\,dt\right).
$$
If $y_1,y_2$ are distinct solutions, their difference is a nonzero homogeneous solution, so every solution is
$$
\boxed{y=y_1+C(y_2-y_1).}
$$