$\begingroup$

One way to show uniqueness is the following:

$\textbf{Theorem:}$ A second order differential equation of the form $y''+P(x)y'+Q(x)y=0$ has at most two linearly independent solutions.

$\text{Sketch of Proof: }$ 1) Define the Wronskian determinant as $\det W_3$ where:$$W_3=\begin{bmatrix}y_1 &y_2 &y_3\\y_1' &y_2' &y_3'\\y_1'' &y_2'' &y_3''\end{bmatrix}$$ Here the $y_i$'s solve the aforementioned equation.

Show that

$$\exists ~c_i:\sum_{i=1}^3c_iy_i=0\iff \det W_3=0$$

Since $y_i''=-P(x)y_i'-Q(x)y_i$ , line 3 is a linear combination of lines 1 and 2. Thus the matrix does not have full column rank and it's determinant is zero, and hence the 3 functions have to be linearly dependent.

You can use this theorem as follows: If you find two linearly independent solutions to a linear second order ODE, then every solution to that ODE can be expressed as a linear combination of those two. In your case, you know $\sin x, \cos x$ are solutions and you need to look no further, since they are linearly independent (calculate $W_2$ and it is non-zero).

For the particular case considered, one can also solve the equation using quadrature and obtain a general solution that looks like $y(x)=C_1\sin x+C_2 \cos x$.

EDIT: Proof of Lemma 2

To answer @blue 's comment completely, it is true that the proof of that statement is not JUST linear algebra, but in my opinion, it is still pretty easy to prove with no other machinery to be used other than the fact that a function that has zero derivative is constant. Here is a way that can be used to show both directions:

Specifically, let us assume that $\det W_3=0$ and also that all the $2\times 2$ sub-Wronskians between any two functions of the set $\{y_1,y_2,y_3\}$ are non-zero (if any of them were, then there would exist non-zero $c_i$'s that render the functions linearly dependent hence making the Wronskian vanish trivially).In this case, with

$T_{ij}=y'_iy_j-y'_jy_i=y_j^2\left(\frac{y_i}{y_j}\right)'

eq 0$

it can be easily shown that, after some algebraic simplifications: $$\left(\frac{T_{31}}{T_{21}}\right)'=y_1\det W_3$$

which yields that $T_{31}=AT_{21}$ for some non-zero constant $A$. This in turn can be manipulated, using the identity above, into the form

$$\left(\frac{y_3}{y_1}\right)'-A\left(\frac{y_2}{y_1}\right)'=0\iff y_3-Ay_2-By_1=0$$

and hence there exist non-zero constants that render the functions linearly independent.

Note: We had to assume in the above proof that all sub-Wronskians are non-vanishing. This is the reason why proofs involving Wronskians are usually inductive in the dimension of the linear vector space. If a sub-Wronskian is zero, it is trivial to see that the determinant of the Wronskian will be zero if one has proven it for all dimensions smaller than that. The only non-trivial case can be shown as above for any dimension $n$.