# Finding a basis for all polynomials $f(t)$ of degree 3 such that $f(1)=0$ and $\int_{-1}^{1} f(t) dt$=0

this is a problem from my textbook I am working on. I am not sure how to approach it -- I would like to solve it using a 'matrix' way if possible -- that is, to set up a matrix with coefficients etc. and solve for the basis of the kernel, which would be the basis of what I am looking for (not sure if that's possible).

How to find a basis for all polynomials $f(t)$ of degree 3 such that $f(1)=0$ and $\int_{-1}^{1} f(t) dt$=0

Also, my book defines polynomials of degree n as subspaces/vector spaces, but Mariano in the following question argues that it is not such because it does not contain the zero element (though I think if we set all the coefficients to 0, it does), so now I am confused as to whether the problem even makes any sense:

Are the polynomials of degree n a vector space?

-
The set of polyonomials of degree $3$ does not form a vector space. E.g., it is not closed under addition: $t^3 + (-t^3)=0$. And it is not closed under scalar multiplication: $0\cdot t^3=0$. The set of polynomials of degree at most $3$ forms a vector space. In general, the set of polynomials of degree at most $n$ forms a vector space of dimension $n+1$. That is probably what your book has. – Jonas Meyer Feb 20 '11 at 6:50
Note that the degree of the polynomial $a_nx^n+a_{n+1}x^{n-1}+\cdots+a_1x+a_0$ is $n$ if and only if $a_n\neq 0$. For example, $0x^3+2x^2-1=2x^2-1$ has degree $2$. – Jonas Meyer Feb 20 '11 at 6:52
The polynomials of degree less or equal to 3 form a vector space of dimension 4 and we're looking for a basis of the intersection of the kernels of two linear forms, or in other terms the solutions of a system of two linear equations wiyh four variables – marwalix Feb 20 '11 at 6:53
@Jonas Meyer: Actually, you are right, sorry, the book did use the word "at most." Marwalix -- could you post an answer elaborating on that? This is not h/w, a midterm preparation question. I am decent at finding bases for subspaces usually, but these kinds of restrictions when it comes to polynomials get me. – LinAlgStudent Feb 20 '11 at 6:56

## 2 Answers

Almost certainly, your textbook is refering to the set of all polynomials of degree at most $n$, rather than the polynomials of degree exactly $n$. The latter is indeed not a vector space under the usual addition of polynomials: it doesn't contain the $0$ polynomial (which either has no degree, or has some degree smaller than $0$), and it's not closed under sums: both $x^n+x^{n-1}$ and $-x^n$ are polynomials of degree $n$, but their sum is not.

So I suspect your textbook is asking for the vector space that consists of all polynomials of degree at most $3$, which further satisfy $f(1)=0$ and $\int_{-1}^1 f(t)\,dt = 0$. That is, if we let $\mathbf{P}_3$ denote the vector space of polynomials of degree at most $3$, then it wants you to find a basis for $\mathbf{W}$, where $$\mathbf{W} = \left\{ f(t)\in\mathbf{P}_3\;\left|\; f(1)=0\text{ and }\int_{-1}^1f(t)\,dt = 0\right.\right\}.$$

You say you want to solve this via a matrix; well: the map $\mathbf{P}_3\to\mathbb{R}$ given by "evaluation at $1$" ($p(t)\longmapsto p(1)$) is a linear transformation. And the map $\mathbf{P}_3\to\mathbb{R}$ given by "integrate over $[-1,1]$ ($p(t)\longmapsto \int_{-1}^1p(t)\,dt$) is also a linear transformation. Call the first linear transformation $E$ and the second $T$. The polynomials that are in the nullspace/kernel of the first map are precisely the ones that satisfy $f(1) = 0$. The ones that are in the kernel of the second one are precisely the ones that satisfy $\int_{-1}^1f(t)\,dt = 0$. You want the ones that are in the kernel of both.

The standard way of achieving this is to map to the product: take the map $L\colon\mathbf{P_3}\to \mathbb{R}\times\mathbb{R}=\mathbb{R}^2$, given by: $$L(p(t)) = \Bigl( E(p),\; T(p)\Bigr) = \left(p(1),\quad\int_{-1}^1p(t)\,dt\right).$$ Then the subspace you want is precisely the kernel of $L$.

To find the kernel of $L$, one possibility is to pick a basis for $\mathbf{P}_3$ (say, the standard basis $[1,t,t^2,t^3]$), a basis for $\mathbb{R}^2$ (say, the standard basis $[(1,0), (0,1)]$), construct the matrix representation for $L$, and find the nullspace of that matrix. Interpreting this nullspace in terms of the basis $[1,t,t^2,t^3]$ will give you the kernel you want, and finding a basis for that nullspace will yield a basis for the subspace of $\mathbf{P}_3$ that you are looking at.

-
Thanks a lot Arturo, this looks pretty interesting and not trivial. But it all makes sense; I will work it out! Thanks again. – LinAlgStudent Feb 20 '11 at 6:59
@LinAlgStudent: Every subspace is the kernel of some linear transformation, though it is sometimes not obvious to figure out which. The idea of finding the intersection of kernels by mapping to multiple coordinates seems like a clever trick the first time you see it, but it makes sense if you work through it and you'll have it ready and available in your toolkit for next time. – Arturo Magidin Feb 20 '11 at 7:08
I am also realizing the beauty of how you found the basis of all polynomials of degree 3 that are equal to zero when we evaluate them at one. We just use the fact that kernel consists of elements which, when evaluated via some transformation, are equal to zero, and then plug 1 into ($a+bx+cx^{2}+dx^{3}$), and solve for the coefficients that produce the needed polynomials; this is just great. – LinAlgStudent Feb 20 '11 at 7:12
@LinAlgStudent: Yes, this works. of course, for polynomials we even know more, from regular algebra: a polynomial is zero at $1$ if and only if it is a multiple of $t-1$; so you can write every such polynomial as $(t-1)q(t)$ for some polynomial $q(t)$; $q(t)$ is arbitrary, but of degree at most $2$, so you can just describe them using a basis for $\mathbf{P}_2$; e.g., since you can get any polynomial of degree at most $2$ with $1$, $t$, and $t^2$, you can get all polynomials of degree at most $3$ that are $0$ at $1$ with $(t-1)1$, $(t-1)t$, and $(t-1)t^2$. – Arturo Magidin Feb 20 '11 at 7:16

A basis of the linear subspace of polynomials $f$ of degree at most $3$ such that $f(1)=0$ is $(p_1,p_2,p_3)$ where $$p_1(t)=2(1-t),\quad p_2(t)=3(1-t)^2,\quad p_3(t)=4(1-t)^3.$$ (Proof: Let $p_0(t)=1$. Then $(p_0,p_1,p_2,p_3)$ is a basis of the linear subspace of polynomials $f$ of degree at most $3$, as every family of polynomials with degree $0$, $1$, $2$ and $3$.)

Now, the integral of $a_1p_1+a_2p_2+a_3p_3$ over $[-1,1]$ is zero iff $4a_1+8a_2+8a_3=0$ iff $a_1=-2a_2-4a_3$, hence a basis of the subspace the OP is interested in is $(2p_1-p_2,4p_1-p_3)$, or equivalently, $(q_2,q_3)$ with $$q_2(t)=(1-t)(1+3t),\quad q_3(t)=(1-t)(1+2t-t^2).$$

-