I'm asked to prove that if $a \space | \space b$, then $a \space | \space 3b^3 - b^2 + 5b$. That is, if $a$ divides $b$, it also divides $3b^3 - b^2 + 5b$. My text does not have a solution to this problem, as it's even-numbered, so I was looking to see if someone could please verify that my proof (direct) is correct:
Assume that $a \space | \space b$. Then by definition, $b = ax$ for some integer $x$.
$3b^3 = 3a^3x^3$
$-b^2 = -a^2x^2$
$5b = 5ax$
Putting it all together, $3b^3 - b^2 + 5b = 3a^3b^3-a^2x^2+5ax$
Factoring the right side, $3b^3 - b^2 + 5b = a(3a^2x^3-ax^2+5x)$
Because $a$ and $x$ are both integers, the factor by which $a$ is multiplied on the right side is also an integer.
By definition, then $a \space | \space 3b^3 -b^2 + 5b$.
Please let me know if this is a valid proof or if there are any flaws in my logic.