Polynomial ring: Direct sum of modules? I got the following task from my professor and I wanted to ask for advice from you.
Task: 


*

*$K$ is a field


I shall prove the following statement:
$n \neq v$, $I_n + I_v = K[X]$ and is this a direct sum of modules?
In and Iv are linear subspaces

My thoughts on how to solve the problem:
$f(x) \in K[x]$
What I need to show:
There are $p(x)$ from $I_v$ and $q(x)$ from $I_n$ with $f(x) = p(x) + q(x)$.
$f(x) = (x - v) * a(x) + b(x)$ (Polynomial division)
$s(x) = b(x)/(v - n)$ and $r(x) = a(x) - s(x)$
Then: 
$(x - v) * r(x) + (x - n) * s(x)$
$= (x - v) * (a(x) - s(x)) + (x - n) * s(x)$
$= (x - v) * a(x) + (v - n) * s(x)$
$= (x - v) * a(x) + b(x)$
$= f(x)$
$p(x) = (x - v) * r(x)$ and $q(x) = (x - n) * s(x)$
And I think it's not a direct sum.

If possible tell me if my thoughts are right and maybe complete my solutions if they are nearly right or give me useful hints? Thank you.
 A: Actually, $I_n$ and $I_v$ are not only subspaces of the vector space $K[x]$: $K[x]$ is a commutative ring and $I_n, I_v$ are ideals of this ring, i.e. they are stable for addition and for multiplication by any element of the ring (not only for scalar multiplication). 
Indeed, if $p\in I_v$ and $f\in K[x]$, then $(fp)(v)=f(v) p(v)=f(v)\cdot 0=0$, hence $fp\in I_v$, and similarly for $I_n$.
Euclidean division allows for a characterisation of these ideals: we can divide $p(x)$ by $x-v$: we have $$p(x)=q(x) (x-v) +r\quad(r\in K,\enspace q(x)\in K[x]).$$
From this equality, we deduce that $p\in I_v$, i.e. $p(v)=0$ if and only if $r=0$. In other words, $p\in I_v$ if and only if $p$ is divisible by $x-v$.
Similarly, $p\in I_n$ if and only if $p$ is divisible by $x-n$.
So if $p\in I_n\cap I_v$, we can say first $p$ is divisible by $x-v$, which means there exists a polynomial $q$ such that $p(x)=q(x) (x-v)$. Second, $p(n)=q(n)(n-v)=0$. Since $n\neq v$, $n-v\neq 0$ so that $q(n)=0$, which means $q(x)=r(x)(x-n)$  for some polynomial $r$. Hence $$p(x)=r(x)(x-n)(x-v).$$
Conversely, any polynomial that is divisible by $(x-n)(x-v)$ belongs to $I_n\cap I_v$, which proves this intersection is different from $\{0\}$, so that the sum $I_n+I_v$ is not direct.
Another proof
In any commutative ring $R$, if two ideals $I$ and $J$ are such that $I+J=R$ and the sum is direct, the ideals are generated by orthogonal idempotents, i.e. there exists elements $e\in I$, $f\in J$ such that 


*

*$I=Re$, $J=Rf$.

*$e^2=e, \quad f^2=f$.

*$ef=0,\quad 1=e+f$.


However in the ring $K[x]$, which is an integral domain, there exists no other idempotents than $0$ or $1$.
