I am going to prove $\cos x, \sin x, e^x$ and $e^{-x}$ is a linearly independent subset of $C^\infty (\mathbb R)$, which is smooth functions.
first we have $a\cos x+b\sin x+ce^x+de^{-x}=0$, WTS that $a=b=c=d=0$. Suppose $c \ne 0$, then for all $x$ in $\mathbb R$, $ce^x$ is sometimes much larger than other 3 terms which is contradiction. So $c=0$.
So we have $a\cos x+b\sin x+de^{-x}=0$, if $d \ne 0$, then by the same logic in $c$, for all $x$ in $\mathbb R$, $x$ is also sometimes much larger than other 2 terms which is contradiction. So $d=0$.
Here it becomes $a\cos x+b\sin x=0$,
when $x=0, a*0+b*1=0$ when $x=\pi/2, a*1+b*0=0$ there is no such situation that $\cos x=\sin x=0$. So $a=b=0$.
Above is my proof, we have not learned Wronskian or det, so I could only prove it by definition. While since it is going to prove subset of $C^\infty(\mathbb R)$, is there any correction or improvement for the above? Or is there a more clear way to prove this?
A bit different solution using derivatives.
Assume $a\cos x + b\sin x +ce^x + de^{-x} = 0$. Taking the derivative twice gives $$-a\cos x - b\sin x +ce^x + de^{-x} = 0$$
so adding and subtracting the two equations yields $$a\cos x + b\sin x = 0, \quad ce^x+de^{-x} = 0$$
You already established that the first equation implies $a = b =0$. For the second one take the derivative to obtain $$ce^x - de^{-x} = 0$$
Again adding and subtracting the two equations gives $c = d = 0$.