Let $f(x) = 4x^4+12x^3-9x^2+x+3$ and $d(x) = x^2+3x-2$. If $f(x) = q(x)d(x) + r(x)$ for some polynomials $q(x)$ and $r(x)$ where $\deg r < \deg d$, calculate $q(1)+r(-1)$.
To find $q(x)$ and $r(x)$, I need to perform polynomial long division of $f(x)$ by $d(x)$. I can write $f(x) = (4x^4+12x^3-9x^2+x+3)\div(x^2+3x-2)$ and set up the long division algorithm. I start by asking what times $x^2$ gives $4x^4$? The answer is $4x^2$. I write $4x^2$ above the quotient line and multiply it by $d(x)$, which gives $4x^4+12x^3-8x^2$. I subtract this from $f(x)$ and bring down the next term, which gives $-x^2+x+3$. I repeat the process and ask what times $x^2$ gives $-x^2$? The answer is $-1$. I write $-1$ above the quotient line and multiply it by $d(x)$, which gives $-x^2-3x+2$. I subtract this from the previous remainder and bring down the next term, which gives $4x+1$. I repeat the process and ask what times $x^2$ gives $4x$? The answer is $0$. I write $0$ above the quotient line and multiply it by $d(x)$, which gives $0$. I subtract this from the previous remainder and bring down the next term, which gives $4x+1$. I notice that the degree of this remainder is less than the degree of $d(x)$, so I stop the long division algorithm. I have found that $q(x) = 4x^2-1$ and $r(x) = 4x+1$. To find $q(1)+r(-1)$, I just need to plug in $x=1$ and $x=-1$ into these expressions. I get $q(1) = 4(1)^2-1 = 3$ and $r(-1) = 4(-1)+1 = -3$. Therefore, $q(1)+r(-1) = 3-3 = 0$.

