Isn't zero the only possible real solution for this simple ODE? The equation is simple as hell:
$$(D^2+i)x(t)=0$$
Clearly, eigenvalues are $\lambda_{1,2}=\pm(-\sqrt{2}/2+i\sqrt2 /2)$, so the complex solutions should be
$$x(t)=(A+Bi)e^{\left(-\sqrt{2}/2+i\sqrt{2}/2\right)t}+(C+Di)e^{\left(\sqrt{2}/2-i\sqrt{2}/2\right)t},\quad A,B,C,D\in\Bbb R$$
To find the real solutions, I break down the expression into the real and imaginary parts as
$$x(t)=e^{-t\sqrt2/2}(A\cos\frac{\sqrt 2}{2}t-B\sin\frac{\sqrt 2}{2}t)+e^{t\sqrt2/2}(C\cos\frac{\sqrt 2}{2}t+D\sin\frac{\sqrt 2}{2}t)+i\left[ e^{-t\sqrt2/2}(B\cos\frac{\sqrt 2}{2}t+A\sin\frac{\sqrt 2}{2}t)+e^{t\sqrt2/2}(D\cos\frac{\sqrt 2}{2}t-C\sin\frac{\sqrt 2}{2}t) \right]$$
So I let the imaginary parts be $0$, which means
$$(e^{-t\sqrt2/2}B+e^{t\sqrt2/2}D)\cos\frac{\sqrt 2}{2}t+(e^{-t\sqrt2/2}A-e^{t\sqrt2/2}C)\sin\frac{\sqrt 2}{2}t=0,\quad\forall t\in\Bbb R$$
I think it is equivalent to
$$B=-De^{t\sqrt2}\quad\text{and}\quad A=Ce^{t\sqrt2}$$
since $(e^{-t\sqrt2/2}B+e^{t\sqrt2/2}D)$ and $e^{-t\sqrt2/2}A-e^{t\sqrt2/2}C$ are both continuous functions.
But when I plug the relationships between $A,B,C,D$ back into the complex solutions, I get
$$x(t)=2e^{t\sqrt2/2}(C\cos\frac{\sqrt 2}{2}t+D\sin\frac{\sqrt 2}{2}t)$$
which is not zero! 
I have examined and reexamined my calculations and the result remains just the same. I do not know where I am wrong but I know I must be wrong, because if $x(t)$ is a non-zero real-valued function, $D^2x(t)=-ix(t)$ would never make sense.
Can you guys help me out of this problem? Thanks in advance!
 A: The real and imaginary parts of the solution of a homogeneous linear differential equation are solutions if the differential equation has real coefficients.  In this case, the $i$ in the differential equation is not real, and the real and imaginary parts are not solutions.
It is indeed true that $0$ is the only real solution to your equation.  Write it as $D^2 x = - i x$.  If $x$ is real, twice differentiable and nonzero on some interval, the left side
is real while the right side is not.
A: Like martini pointed out in a comment, the "constants" $A$, $B$, $C$ and $D$ should be constant for a linear, autonomous and homogeneous differential equation; because otherwise you would get extra terms if you would substitute in that "general" solution into the differential equation
$$
x(t) = \left(A(t) + i B(t)\right) e^{\frac{i-1}{\sqrt2}t} + \left(C + i D\right) e^{\frac{1-i}{\sqrt2}t}, \tag{1}
$$
$$
x''(t) = \left[-i \left(A(t) + i B(t)\right) + \sqrt2(i-1) \left(A'(t) + i B'(t)\right) + \left(A''(t) + i B''(t)\right)\right] e^{\frac{i-1}{\sqrt2}t} - i \left(C + i D\right) e^{\frac{1-i}{\sqrt2}t}, \tag{2}
$$
so
$$
x''(t) + i x(t) = \left[\sqrt2(i-1) \left(A'(t) + i B'(t)\right) + \left(A''(t) + i B''(t)\right)\right] e^{\frac{i-1}{\sqrt2}t} = 0,\ \forall t \in \mathbb{R}. \tag{3}
$$
If you define $F(t)=A'(t) + i B'(t)$, then $F(t)$ can be found by solving the first order differential equation
$$
F'(t) + \sqrt2(i-1) F(t) = 0, \tag{4}
$$
which has the solution
$$
F(t) = \alpha e^{-\sqrt2(i-1)t}, \tag{5}
$$
where $\alpha$ can be any complex constant. By integrating this function you get
$$
A(t)+iB(t) = \frac{\alpha}{-\sqrt2(i-1)} e^{-\sqrt2(i-1)t} + \beta = \alpha^* e^{-\sqrt2(i-1)t} + \beta, \tag{6}
$$
where $\beta$ can be any complex constant and $\alpha^*$ is the simplified complex constant of $\frac{\alpha}{-\sqrt2(i-1)}$. By substituting $(6)$ in to $(1)$ you get
$$
x(t) = \beta e^{\frac{i-1}{\sqrt2}t} + \left(\alpha^* + C + i D\right) e^{\frac{1-i}{\sqrt2}t}, \tag{7}
$$
which is just another linear combination of the general solutions. However your solutions for $A(t)$ and $B(t)$ do not satisfy $(4)$. Therefore the only solution to 
$$
B = -D e^{t\sqrt2} \quad \text{and} \quad A = C e^{t\sqrt2}
$$
would be $A=B=C=D=0$, which will also return an always zero real part of $x(t)$.
