Simple Harmonic Motion DE The simple harmonic motion DE is $x''(t)=-x(t)$
I solved it as a homogenous linear equation and after inserting the Euler's formula into the equation, my solution becomes $x(t)=c_1(cos(t)+i(sin(t))+c_2(cos(t)+i(sin(t))$
The solution to this one should be $x=Asin(t)$, how do I arrive to this solution? If I group like terms, can I treat $i(c_1-c_2)$ as any other constant? If yes, how do I turn $c_1cos(t)+c_2sin(t)$ into $Asin(t)$?
Here is my solution; 
$y"+y=0$, Assume the solution is in the form of $e^{mx}$ for some constant $m$. $\frac{d^2}{dx^2} e^{mx} + e^{mx}=0 \iff m^2e^{mx}+e^{mx}=0 \iff (m^2+1)e^{mx}=0$. $e^{mx}$ cannot be $0$ so $m^2+1=0 \iff (m_1,m_2)=(i,-i)$. Ergo $y(x)=c_1e^{ix}+c_2e^{-ix} \iff y(x)=c_1(cos(x)+i(sin(x))+c_2(cos(x)+i(sin(x)) \iff y(x)=(c_1+c_2)cos(x)+i(c_1-c_2)sin(x) \iff y(x)=c_1cos(x)+c_2sin(x)$. $cos(x)=sin(x+\frac{π}{2})$ thus $y(x)=c_1sin(x+\frac{π}{2})+c_2sin(x)$ but $sin(x+\frac{π}{2})+sin(x)=\sqrt{2}sin(x-\frac{π}{4})$. There, I'm stuck on how to do this $Asin(x)$
 A: It is clear that
$x = A \sin t \tag{1}$
is a solution to
$x'' + x = 0, \tag{2}$
as may be seen by simply differentiating (1) two times:
$x' = A \cos t, \; \; x'' = -A \sin t; \tag{3}$
but it is not the only solution, as the calculations of our OP Jake reveal.  Indeed, his work indicates that
$x = B \cos t \tag{4}$
is a solution as well; in fact, we have from (4) that
$x' = -B \sin t; \; \; x'' = -B \cos t, \tag{5}$
showing that (4) solves (2) as does (1).  Since (2) is linear, we must then have that
$x(t) = A \sin t + B \cos t \tag{6}$
is also a solution; in fact, (6) is completely general in the sense that any solution of (2) must be of this form, with appropriate particular choices of the constants $A$ and $B$.  Indeed, since (2) is of second order, the general theory of linear systems tells us that there must be precisely two linearly independent solutions of which any solution is a linear combination; this is exactly what we have in (6).  And since we are dealing with linear combinations of (linearly) independent solutions, the number of arbitrary constants required to specify a particular solution must also be two in this case; thus all solutions are obtained as $A$ and $B$ range over $\Bbb C$, the complex numbers.  These facts may be found in almost any textbook which covers linear ODEs, or in any number of places on the web; see for example this wikipedia entry and also the well-known text Ordinary Differential Equations by Jack K. Hale, 2009 Dover Press; this latter reference is somewhat advanced, though it does give a thorough treatment providing all the theoretical details.
What, then, of solutions of the form (1), viz., $x = A \sin t$?  According to what we have seen here, they are not the whole picture; the functions $B \cos t$ are also unavoidable; and, as Jake has shown us by wrestling with various idenities such as $\cos t = \sin (t + \pi/2)$, such substitutions inevitably lead to either phase-shifted functions of the form $\sin (t - \pi/4)$ or, more generally, $\sin (t + \phi)$ for some real $\phi$, or back to the start of the path where $\sin t$ and $\cos t$ are both present in the solution.
So I think what must be done, if one wishes to eliminate the terms containing $\cos t$, is to realize that equation (2) is really incomplete as it stands, in the sense that no initial and/or boundary conditions are provided which would serve to further specify the solution.  Without such information, no specific solution to (2) may be had, although as Jake has demonstrated the general form (6) may be deduced.  Since the equation is of second order, it will suffice to nail down no less than both $x(t)$ and $x'(t)$ at some initial time $t_0$.  If we do so, and use (6), we obtain
$x(t_0) = A \sin t_0 + B \cos t_0, \tag{7}$
and
$x'(t_0) = A \cos t_0 - B \sin t_0, \tag{8}$
since from (6) we have
$x'(t) = A \cos t - B \sin t. \tag{9}$
(7)-(8) may be written as the matrix-vector equation
$\begin{bmatrix} \sin t_0 & \cos t_0 \\ \cos t_0 & - \sin t_0 \end{bmatrix} \begin{pmatrix} A \\ B \end{pmatrix} = \begin{pmatrix} x(t_0) \\ x'(t_0) \end{pmatrix}, \tag{10}$
and since
$\det \begin{bmatrix} \sin t_0 & \cos t_0 \\ \cos t_0 & - \sin t_0 \end{bmatrix}  = -1 \tag{11}$
the coefficient matrix is invertible; indeed we have
$\begin{bmatrix} \sin t_0 & \cos t_0 \\ \cos t_0 & - \sin t_0 \end{bmatrix}^{-1} = \begin{bmatrix} \sin t_0 & \cos t_0 \\ \cos t_0 & - \sin t_0 \end{bmatrix}; \tag{12}$
the matrix is apparently its own inverse.  This leads us to conclude that
$\begin{pmatrix} A \\ B \end{pmatrix} = \begin{bmatrix} \sin t_0 & \cos t_0 \\ \cos t_0 & - \sin t_0 \end{bmatrix}\begin{pmatrix} x(t_0) \\ x'(t_0) \end{pmatrix}, \tag{13}$
or
$A = x(t_0) \sin t_0 + x'(t_0) \cos t_0, \tag{14}$
$B = x(t_0) \cos t_0 - x'(t_0) \sin t_0; \tag{15}$
we obtain a solution of the form $x(t) = A \sin t$ provided $x(t_0)$, $x'(t_0)$ are such that $B = 0$; this leads to, by (15),
$\tan t_0 = \dfrac{x(t_0)}{x'(t_0)}; \tag{16}$
at such $t_0$ we find, using (14) as well, that we must have
$A = x'(t_0) \tan t_0 \sin t_0 + x'(t_0) \cos t_0 = x'(t_0)(\tan t_0 \sin t_0 + \cos t_0)$
$= x'(t_0) \sec t_0; \tag{17}$
thus by picking $t_0$ appropriately (so that $\sec t_0$ makes sense), we can find $x'(t_0)$ from (17) and $x(t_0)$ from (16) so that $x(t) = A\sin t$.  For example, letting $t_0 = 0$, $x(0) = 0$, and $x'(t_0) = A$, this solution is obtained.
Hope this helps.  Cheers,
and as always,
Fiat Lux!!!
