Find a basis. For a subspace Find a basis for the subspace of all polynomials with degree less than or equal to $n$ that are divisible by $x^2+1$:
$$k[x]=\{f(x) \in k[x]\ |\ (x^2+1)|f(x), \deg(f(x)) \leq n\}$$
All I did is $f(x)=(x^2+1)*g(x)$ for some g(x) with $\operatorname{deg}(g(x)) \le n-2$. Also, I know $f(x)$ has to be degree $\ge 2$ but the basis I take if take a random polynomial is the standard basis of my whole space of all polynomials degree $n$.
What i found is ${x^2+1,x^3+x,..,X^n+x^n-2}$

It's clear that the family $B=(x^k(x^2+1))_{0\le k\le n-2}$ is linearly independent of elements of the given linear space.
Moreover, if $P$ is a polynomial of the given linear space then we have
$$P=(x^2+1)Q$$
where $Q$ has at most the degree $n-2$ so $Q$ is linear combination of $(x^k)_{0\le k\le n-2}$ and the $P$ is a linear combination of $B$. Conclude.
