I want to solve this system with initial values $(x_0,y_0)$ at $t_0=0$:
$$\left\{\begin{matrix} \frac{dx}{dt} = ax -ty\\ \frac{dy}{dt} = tx+ay \end{matrix}\right. $$
I use a variable change, by putting $z = x+iy$, thus I get: $x'+iy' = ax -ty +itx +aiy \iff z' = a(x+iy) + it(x +iy)= az + itz = (a+it)z$ So all I have to solve now is $$ z' = (a+it)z$$ I need to integrate $(a+it)$ thus I get $z(t) = \lambda \exp(at + i\frac{t^2}{2})$.
Now, this equals to $z(t) = \lambda \exp(at)\exp(i \frac{t^2}{2}) = \lambda \exp(at)(\cos(\frac{t^2}{2}) + i \sin(\frac{t^2}{2}))$
Thus I can deduce that $x(t) = \lambda \exp(at)\cos(\frac{t^2}{2})$ and $y(t) = \lambda \exp(at)\sin(\frac{t^2}{2})$ But I get an issue when I plug in $t=t_0$ as I get $x(0)=\lambda$ but $y(0)=0$, so I can't have an initial condition on $y_0$ if it's not equal to 0.
Have I done somewhere a mistake?
You have $$ z(0) = \lambda = x_0 + iy_0 $$ so the full solution is
$$ z(t) = (x_0 + iy_0)e^{at}\left[\cos\left(\frac{t^2}{2}\right) + i\sin \left(\frac{t^2}{2}\right)\right] $$
Taking the real and imaginary parts gives
$$ x(t) = e^{at}\left[x_0\cos\left(\frac{t^2}{2}\right) - y_0\sin\left(\frac{t^2}{2}\right)\right] $$
$$ y(t) = e^{at}\left[y_0\cos\left(\frac{t^2}{2}\right) + x_0\sin\left(\frac{t^2}{2}\right)\right] $$