# 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$.

-
For some basic information about writing math at this site see e.g. here, here, here and here. – Julian Kuelshammer Nov 18 '12 at 20:25
Please, try to make the title of your question more informative. E.g., Why does $a<b$ imply $a+c<b+c$? is much more useful for other users than A question about inequality. From How can I ask a good question?: Make your title as descriptive as possible. In many cases one can actually phrase the title as the question, at least in such a way so as to be comprehensible to an expert reader. – Julian Kuelshammer Nov 18 '12 at 20:28

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.
@sam: on your first comment, perhaps it is $+\sin(t)$, and you should check and decide. On your second comment, $(\cos t)^2 + (\sin t)^2=1$ is constant. – Henry Nov 18 '12 at 22:29
@sam (a) It is not true unless it involves squares (Pythagoras). (b) Your question said "it admits an invariant $I = x(t)^2 + y(t)^2$." – Henry Nov 19 '12 at 0:09