Apparent loophole in set of coupled partial differential equations I have a set of three coupled differential equations, using coordinates $x$ and $\theta$, and would like to solve for $\xi_x (x, \theta)$, $\xi_{\theta} (x, \theta)$,  given by:
\begin{equation}
\partial_x \xi_x = -\frac{x}{1+x^2} \xi_x,
\end{equation}
\begin{equation}
\left( \frac{2}{x} - \partial_x \right)\xi_{\theta}  = \partial_{\theta} \xi_x.
\end{equation}
\begin{equation}
\partial_{\theta} \xi_{\theta} = -x (x^2+1) \xi_x,
\end{equation}
I solve the first one by integration and find
\begin{equation}
\xi_x=\frac{A}{\sqrt{1+x^2}} + f(\theta),
\end{equation}
where $A$ is just a constant and $\xi_x$ may depend on $\theta$, which is why I added the function $f(\theta)$. Now I plug this solution into the second equation, i.e.
\begin{equation}
\left( \frac{2}{x} - \partial_x \right)\xi_{\theta} = \partial_{\theta} f(\theta),
\end{equation}
and solve for $\xi_{\theta}$ to find
\begin{equation}
\xi_{\theta} = x \cdot \partial_{\theta} f(\theta) + Bx^2,
\end{equation}
with $B$ another constant. Finally, I plug both of my solutions into the third equation to obtain
\begin{equation}
x \cdot \partial_{\theta}^2 f(\theta) = -x(x^2+1) \left(\frac{A}{\sqrt{x^2+1}} + f(\theta), \right)
\end{equation}
which has a solution such that
\begin{equation}
f(\theta) = -\frac{A}{\sqrt{x^2+1}} + C \cos (\sqrt{x^2+1} \theta) + D \sin (\sqrt{x^2 +1 } \theta).
\end{equation}
Now here's my problem: $f(\theta)$ was assumed to depend only on $\theta$, not on $x$. Plugging this back into my first equation already shows this can not be the solution. Does anyone see what my mistake is? Thank you for your time in advance.
Edit: I tried to write the solution for $\xi_x$ as
\begin{equation}
\xi_x = \frac{A}{\sqrt{1+x^2}} \cdot f(\theta),
\end{equation}
but this makes it such that the second equation has no solutions.

The first equation gives
$$
\xi_x = \frac{A(\theta)}{\sqrt{1+x^2}} \, .
$$
The other equations then give
$$
\left(\frac2x - \partial_x\right) \xi_\theta = \frac{A'(\theta)}{\sqrt{1+x^2}} ,\qquad
\partial_\theta\xi_\theta = -A(\theta)x{\sqrt{1+x^2}} .
$$
The first one yields
$$
\xi_\theta = A'(\theta)x{\sqrt{1+x^2}} + B(\theta) x^2
$$
so that by substitution in the last equation,
$$
\partial_\theta\xi_\theta = A''(\theta)x{\sqrt{1+x^2}} + B'(\theta) x^2 = -A(\theta)x{\sqrt{1+x^2}} \, .
$$
For this to be satisfied for all $x$, we choose $A(\theta) = a \cos\theta + b\sin\theta$ and $B(\theta) = c$. Finally,
$$
\xi_x = \frac{a \cos\theta + b\sin\theta}{\sqrt{1+x^2}} , \qquad
\xi_\theta = \left(-a \sin\theta + b\cos\theta\right) x\sqrt{1+x^2} + cx^2 \, .
$$
