# Homework Help: Linear dependence of functions

1. May 19, 2016

### Dank2

1. The problem statement, all variables and given/known data
check for linear dependecy

f(x) = cosx and g(x) = xcosx
2 functions from R to R

2. Relevant equations

3. The attempt at a solution
Why this is wrong:
if i take the scalar a1 = 3, a2 = 1
i can do that since 3 is real, and a1 is in R.
so 3f(3) + -1g(3) = 0
there for we have none trivial comb for the zero vector.

2. May 19, 2016

### Staff: Mentor

No.
You need to find scalars $c_1$ and $c_2$ for which $c_1\cos(x) + c_2x\cos(x) = 0$ for all real numbers x.

Here you have one equation with two unknowns, $c_1$ and $c_2$. The usual trick to get another equation is to take the derivative of the first equation

3. May 19, 2016

### Dank2

i can use here x =4
then a1 = 4 = 3 ===> a1 = 0
if a1 =0, then a2 =0 for the equation to hold.

is that ok

4. May 19, 2016

### Staff: Mentor

No. Did you understand what I wrote in my previous post?
No it's not. You wrote "a1 = 4 = 3" - what is this?
Clearly a1 = 0 and a2 = 0 is a solution whether the functions are linearly dependent or linearly independent. The deciding factor is whether there is a non-trivial solutions for these constants, independent of the value of x. In other words, don't choose a value for x.

I also gave a suggestion in my previous post.

5. May 20, 2016

### Dank2

If the trivial equation needs to be hold for all X, then for both X =0 it should hold and X = Pi.

For X= 0 we get:

a1f(X) + a2f(X) = 0
==> 0 + a2 = 0 ==> a2 = 0
Now for X=Pi we get:
-Pi*a1 + a2 = 0 , but a2 =0. So the fore a1 = 0 .

We need to find single pair that holds the trivial equation for all X, then I took two particular x's and got that both of a1 and a2 has to be zero. Is that right?

Last edited: May 20, 2016
6. May 20, 2016

### Staff: Mentor

This will work, but you have two functions, not one.
The equation is $a_1\cos(x) + a_2x\cos(x) = 0$
Here f(x) = cos(x) and g(x) = xcos(x).
If x = 0, what does the equation above simplify to?
Substitute x = $\pi$ into the equation $a_1\cos(x) + a_2x\cos(x) = 0$
It's not the equation that is trivial -- the trivial solution is $a_1 = 0, a_2 = 0$. If the equation has only the trivial solution, the functions are linearly independent. If the equation has solutions in addition to the trivial solution, the functions are linearly dependent.

7. May 20, 2016

### Dank2

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.

8. May 20, 2016

### Staff: Mentor

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