Solving differential equation invariant I have eqn: $\frac{dx}{dt} = -y(t)$ and $\frac{dy}{dt} = x(t)$
I know that $(x(0),y(0))= (1,0)$.
I want to solve eqn and show that it admits an invariant $I = x(t)^2 + y(t)^2$.
I know $x' = -y$,
$y' = x$,
$x^{\prime\prime} = -y' = -x$
I know general solution of $x" = -x$ is
$x = a\sin x = b\cos x$.
I know 
$x(0) = a\sin 0 + b\cos 0 = 1$
So $b = 1$
How can I show $a = 1$? (I think it should!) 
I tried $x' = a\cos x - b\sin x$ since $y = -x$ but it just gives $ a = 0$.

You have $\frac{dx}{dt} = -y(t)$ and $x(t)=a\sin(t)+\cos(t)$ so take the derivative and use $y(0)=0$.  
You will find $a=0$, as you have already discovered but do not believe.  If you had $a=1$ then you would not have $y(0)=0$.
So you have $(x(t),y(t)) = \left((\cos(t),-\sin(t)\right)$.  This is a parametric equation of a circle of radius $1$ centred on the origin.
