Dank2 said:
yeah, i meant a2g(x).
so it will simplify as above. besides that solution, what other ways i can show their linear independency?
i mean without using values for x.
There is basically just one way to show linear independence (not independency), and that is to show that the equation ##c_1f_1(x) + c_2f_2(x) + \dots c_nf_n(x) = 0## has
exactly one solution for the constants ##c_1, c_2, \dots, c_n##; namely all of them being zero. This definition is very subtle for many beginning students in this area, because ##c_1 = c_2 = \dots = c_n = 0##; is always a solution, whether the functions are linearly independent or linearly dependent. The deciding factor is whether there are solutions other than the trivial solution (all constants equat to zero).
Almost exactly the same equation and idea applies to linearly independent/dependent vectors.
One shortcut you can take: if you have two functions or two vectors, the two are linearly independent if neither one is a constant multiple of the other. Once you have three or more functions/vectors, you can't tell as easily.
Going back to your original work, with ##a_1\cos(x) + a_2x\cos(x) = 0##, since this equation has to be true for all values of x, it has to be true for two values you choose, so you can substitute two different values of x into it to get two different equations. From these equations you can solve for the constants ##a_1## and ##a_2##.