# Finding coefficients in polynomial function

Let's say that I have a function $f(x)=6x^3-5x^2-12x+k$. What should I put in Mathematica to solve the value of $k$ such that $3x+2$ is a factor of $f(x)$?

• Straightforward maniac computation: Table[{k, Factor[6 x^3 - 5 x^2 - 12 x + k]}, {k, -6, 6}] // Column shows k==-4. More finely: f[x_, k_] := 6 x^3 - 5 x^2 - 12 x + k; Solve[f[-(2/3), k] == 0, k]  Commented Dec 17, 2016 at 17:43

One liner:

Solve[PolynomialRemainder[6 x^3 - 5 x^2 - 12 x + k, 3 x + 2, x] == 0, k]

• Whoops, didn't notice the flip. Thanks @Runny! Commented Dec 22, 2016 at 10:11
• you're welcome. Commented Dec 22, 2016 at 17:51
• @RunnyKine I observe that you have largely stopped posting here. Is everything OK? I hope that you find the time and interest to participate more actively as you once did. Commented Dec 24, 2016 at 18:55
• @Mr.Wizard. Thanks for the concern. I hope to start participating actively again soon. Just not in the right state of mind currently. Thanks again. Commented Dec 24, 2016 at 20:27
• @RunnyKine I am glad you are well and I completely understand needing to be in the right mood for it. Should you move on to other things let me say thanks for all your contributions; I have some sense of the time involved in that. Commented Dec 24, 2016 at 20:37
f[x_] := 6 x^3 - 5 x^2 - 12 x
poly = f[x] - f[-2/3]


so

PolynomialRemainder[poly, 3 x + 2, x]


yields 0