Solution (source code)

= Solution

If $Au+Bv=0$, evaluation at zero gives $A=0$ and differentiation at zero gives $B=0$. Thus the solutions are <linearly independent>. For $w=uv'-u'v$,
$$
w'=uv''-u''v=-p(uv'-u'v)=-pw,\qquad w(0)=1,
$$
so $\boxed{w(x)=\exp(-\int_0^xp(s)\,ds)>0}$.

<Variation of parameters> sets $y=A(x)u+B(x)v$ with $A'u+B'v=0$, $A'u'+B'v'=f$. Solving gives $A'=-vf/w$ and $B'=uf/w$. Zero integration constants enforce both <initial conditions>. Therefore
$$
\boxed{y(x)=\int_0^x\frac{v(x)u(t)-u(x)v(t)}{w(t)}f(t)\,dt,\qquad K(x,t)=\frac{v(x)u(t)-u(x)v(t)}{w(t)}.}
$$
For fixed $t$, this <Green's function>[kernel] is a <linear combination> of homogeneous solutions, so $K_{xx}+pK_x+qK=0$. On the diagonal $K(t,t)=0$ and $K_x(t,t)=(v'(t)u(t)-u'(t)v(t))/w(t)=1$. Differentiating the integral twice now verifies the forced equation as well as $y(0)=y'(0)=0$. Standard uniqueness of the linear <initial value problem>[initial-value problem] makes this the solution, for <continuous> $f$.

If $u,v$ have <periodic function>[period] $T>0$, their <derivatives> do also, hence $w$ is <periodic>. The <Green's function>[kernel] is <periodic> in its first variable. With $f=v$, split the integral at $x$ and use this periodicity to get
$$
y(x+T)-y(x)=-u(x)\int_x^{x+T}\frac{v(t)^2}{w(t)}\,dt+v(x)\int_x^{x+T}\frac{u(t)v(t)}{w(t)}\,dt.
$$
At $x=0$, the right side is $-\int_0^T v(t)^2/w(t)\,dt<0$, because $w>0$ and $v'(0)=1$ ensures $v$ is not identically zero. Thus $\boxed{y(T)\ne y(0)}$, so $y$ cannot have <periodic function>[period] $T$. This direct sign argument also rules out any apparent cancellation between the two terms.