Are $x^2$ and $x \cdot |x|$ linearly dependent on $\mathbb{R}$? Let $f_1(x)=x^2, f_2(x)=x \cdot |x|$ , then they are linearly dependent on $[0,\infty)$, and also linearly dependent on $(-\infty,0]$. But the question is, are they linearly dependent on $(-\infty,\infty)$?
They should be linearly dependent as on both the interval $[0,\infty)$ and $(-\infty,0]$, the functions are linearly dependent. But they are linearly independent as given in my reference book.
 A: Consider the vector space $\mathscr{C}(\Bbb R)$ of functions $\Bbb R\to\Bbb R$. Our two functions $f_1, f_2\in\mathscr{C}(\Bbb R)$ are defined by $f_1(x)=x^2$ and $f_2(x)=x\cdot\lvert x\rvert$. To see that $\{f_1, f_2\}$ is linearly independent, suppose that
$$
c_1\cdot f_1+c_2\cdot f_2=0\tag{$\ast$}
$$
where $c_1, c_2\in\Bbb R$. This equation means that
$$
c_1\cdot x^2+c_2\cdot x\cdot\lvert x\rvert=0
$$
for all $x\in\Bbb R$. Plugging in $x=-1$ and $x=1$ gives the system of linear equations
$$
\begin{array}{rcrcrc}
c_1 &-& c_2 &=& 0 \\
c_1 &+& c_2 &=& 0
\end{array}
$$
How many solutions are there to this system of equations?
A: If two functions, each of which is identically not zero, are linearly dependent, then the first must be the linear combination of the second:
$$f_1=cf_2 \\ x^2=c\cdot x|x| \Rightarrow \begin{cases}c> 0, if \ \ x> 0\\ c< 0, if \ \ x< 0\\ c\in \mathbb R, if \ \ x=0\\   \end{cases}$$
However, there is no unique $c$, for which $x^2=c\cdot x|x|$ holds true for all $x\in \mathbb R$. Hence, the two functions are independent for $x\in \mathbb R$.
A: Hint for a  short way : just draw graphs of both functions and look whether they are scalar multiple of each other .
