With no other context than:
$$\frac{dy}{dx}=ay.$$
I understand the more popular solution that doesn’t involve imaginary numbers would simply be $y(x)=e^{ax}$.
But because of Euler’s identity, can I claim that $y(x)=\cos(x)+i\sin(x)$ is a general solution to the differential equation as well because $y’(x)=iy(x)$?
I am asking because if the differential equation is presented without claiming that $a\in\mathbb{R}$, can I just assume that $a$ is ‘allowed’ to take on imaginary values?
Based on This page from WolframAlpha, I would agree that a solution to $$\frac{dy}{dx} = ay$$ is indeed $$y = \cos(x) + i\sin(x)$$ due to the fact that the alternate form of that equation turns out to be $$y = e^{ix}$$ Mind blown, eh?