# I need to define the cubic equation $f(x)= ax^3 + bx^2 + cx + d$

It is given that if cubic function $$f(x)$$ is divided by $$(x^2+4)$$ and $$(x+3)$$, the remainders will be $$7x-20$$ and $$-2$$ respectively. Also it is said show that $$f(x)$$ is $$x^3 + 6x^2 + 11x +4$$. I tried but can i find the $$a,b,c$$, and $$d$$ without knowing them in from the start?

• Consider using Chinese Reaminder Theorem in $\mathbb{Z}[x]$. – Zongxiang Yi Jun 19 at 7:03

$$f(x) = (x^2 + 4)(ax +b) +7x - 20$$

$$f(-3)=-2 = 13(-3a+b)-41$$

therefore $$b= 3a+3$$

so, $$f(x)= (x^2+4)(ax +3a+3)+ 7x-20$$ (non-zero $$a$$)

A simple method (based on the chinese remainder theorem) goes as follows:

To solve $$f \operatorname{mod} p = u$$ and $$f \operatorname{mod} q = v$$ (where p and q are coprime polynomials):

put $$\ \bar{p} = p^{-1}\operatorname{mod} q$$ and $$\ \bar{q} = q^{-1}\operatorname{mod} p$$ then $$f = vp\bar{p}+uq\bar{q}$$. Indeed we have $$f = upp^{-1}\operatorname{mod} q = u$$ and $$f = vqq^{-1}\operatorname{mod} p = v$$.

In this case we have for $$p = x^2+4$$, $$q = x+3$$, $$u = 7x-20$$ and $$v=-2$$ that $$\bar{p} = -\frac{x}{39}$$ and $$\bar{q} = -\frac{x}{13}+\frac{3}{13}$$ so that $$f = -\frac{19}{39}x^3+\frac{20}{13}x^2+\frac{197}{39}x-\frac{180}{13}$$. But this only one of the many solutions, the all differ by a multiple of $$pq$$. In this case $$f + \frac{58}{39}\ pq\$$ yields the given polynomial.

Solving in pari/gp:

? chinese(Mod(7*x-20,x^2+4),Mod(-2,x+3))
%1 = Mod(3*x^2 + 7*x - 8, x^3 + 3*x^2 + 4*x + 12)
?
? Mod(a*x^3+b*x^2+c*x+d,(x^2+4)*(x+3))
%2 = Mod((-3*a + b)*x^2 + (-4*a + c)*x + (-12*a + d), x^3 + 3*x^2 + 4*x + 12)


I.e. $$3=-3a+b$$, $$7=-4a+c$$, $$-8=-12a+d$$.

And $$\quad a=1\quad\Longrightarrow\quad b=6,c=11,d=4$$.