Is there a way to know if the solution curve to a differential equation is an even or odd function? Suppose you are given a differential equation and a set of initial conditions (or boundary conditions) pointing to a unique solution.  Is there any way to know off-hand if the solution will be an even function, an odd function, or neither?
This is, I suppose, tricky, because the fundamental set of solutions could include both even and odd functions (say, sine and cosine).  The trick is knowing a priori that, for a given set of conditions, the constant coefficient for all of the odd solutions is zero and the constant coefficient for all (or some?) of the even functions are non-zero values.  Or vice versa.
Can this be done?
 A: In some cases there is. In what follows, I'll restrict myself to talking about linear (but not necessarily homogeneous) ODEs, so they're of the form
$$
\sum_{k=0}^n u_k(x)\frac{dy^k}{dx^k}=v(x)
$$
I'll say that a function "has a parity" if it's either even or odd.
The simplest possibility is that your differential equation itself is symmetric about the origin: that is, if $f(-x)$ is a solution whenever $f(x)$ is. (This happens when $v(x)$ and all the $u_{2k}$ all have one parity, and the $u_{2k+1}$ all have the opposite parity.)
In this case, because the equation is linear, convex combinations of solutions are also solutions. In particular, the even function $\frac{f(x)+f(-x)}{2}$ and the odd function $\frac{f(x)-f(-x)}{2}$ are solutions for any solution $f(x)$.
If, in addition, your initial conditions are at $x=0$, or your boundary conditions are symmetric around $x=0$, you can use uniqueness to check whether a given solution has a parity. Essentially, if the conditions you're given are compatible with having a parity, and also sufficient to specify a unique solution $f_0$, that solution must have a parity: because the conditions being compatible with having a parity means that the function $\frac{f_0(x)\pm f_0(-x)}{2}$ will also satisfy those conditions.
For example, the ordinary differential equation
$$
y''+(x^2+1)y=0
$$
is symmetric about the origin, so it has both even and odd solutions. If we start with the initial conditions $y(0)=2$, $y'(0)=0$, then for any particular solution $f$ satisfying these conditions, $\frac{f(x)+f(-x)}{2}$ will also satisfy them, and is also a solution to the equation. By uniqueness, we must have $f(x)=\frac{f(x)+f(-x)}{2}$, and so $f$ is even.
Similarly, if $f$ is a particular solution satisfying the boundary value conditions $y(1)=3$, $y(-1)=-3$, then $\frac{f(x)-f(-x)}{2}$ will also be a solution satisfying those conditions, and so it follows by uniqueness that $f$ is odd.
If the equation is not symmetric about the origin in this way, demanding that it have a solution with a parity will lead to a reduction in the degree of the equation. For example, suppose we want to look for even solutions to the equation
$$
y'+y=e^x\tag{*}
$$
Any such solution will also satisfy the equation
$$
-y'+y=e^{-x}
$$
obtained from $(*)$ by the transformation $y(x) \mapsto y(-x)$. Adding these two equations gives us $y=\frac{e^x+e^{-x}}{2}$ as the only possible solution, and then we can check that this does in fact satisfy $(*)$.
On the other hand, if we had started with the equation
$$
y'+2y=e^x
$$
you can check that it would have no solutions in common with
$$
-y'+2y=e^{-x}
$$
and so it has no even solutions.
