On a test today I was given the following functions:
$$ f(x) = (-1+x)e^x$$
$$g(x)=-2e^x$$
We were asked to show if it was linearly dependent or linearly independent
So I showed that if I multiplied $g(x)$ by $\frac{1}{2}-x\frac{1}{2}$ I would get $f(x)$ for any value plugged into $g(x)$ and I said they were linearly dependent but I do not think that what I showed was correct.
$f$ and $g$ are linearly dependent if for some non-zero $A, B$: $$ Af + Bg \equiv 0 $$ You have $$ Af(x) + Bg(x) = e^x (-A + Ax - 2B) $$ The only way for this to be exactly 0 for all $x$ is if $A=B=0$ - so $f$, $g$ are not linearly dependent.