The dimension of the given vector space

linear algebra

Let $V$ be the real vector space of all continuous functions $f:[0, 2] \to \mathbb{R}$ such that the restriction of $f$ to the interval $[0, 1]$ is a polynomial of degree less than or equal to $2$, the restriction of $f$ to the interval $[1, 2]$ is a polynomial of degree less than or equal to $3$ and $f(0) = 0$. Then the dimension of $V$ is equal to $\underline{\qquad}$.

(Original at https://i.sstatic.net/ep0s1.jpg)

So I gave an entrance exam and this was one of the questions. I answered that its dimension is 2, as the constant term in each function is 0 and there won't be $x^3$ in V as when restricted to [0,1], it won't be a polynomial of degree $\leq$2. So I am just left with $x$ and $x^2$, hence dimension of V is 2.

Is my reasoning and answer correct?

Best Answer

The answer is $5$.

To see why, observe that $f$ on the interval $[0,1]$ is of the form $ax^2+bx$, and on the interval $[1,2]$, it is of the form $cx^3+dx^2+ex+a+b-c-d-e$. As there are $5$ independent variables here, you can show that the dimension of the resulting space is $5$.

Related Question