# Solve for $x^2 + 7x +1 = 3n(x^2 + x +1), n \in \Bbb{Z}$

Solve for $$x$$ and $$n$$ in the equation $$\dfrac{x^2 + 7x +1}{ x^2 + x +1}= 3n,\qquad n \in \Bbb{Z}.$$ The original problem was a trigonometric equation but solved it till I got stuck here. I am a high school student who is self studying and preparing for college entrance exam. Original problem was a trigonometric equation which came from 'cengage exam crack'.

[After Mark's and Jyrki's hints in the comments, I got the answer and posted it below.] Original problem:

• Is the value of $n$ known, or also for you to figure out? Apr 12 '19 at 3:33
• Have you tried clearing fractions and using the quadratic formula? You need the bit under the square root to be positive. @JyrkiLahtonen's comment gives you the possible values of $n$ Apr 12 '19 at 3:44
• @MarkBennet thank you. I got the answer. I also posted in below. Apr 12 '19 at 4:07
• While I have nominated this question for reopening, I would personally like to seem more context included in the question. Specifically, you say that the problem started life as a trigonometric equation. Editing this original trigonometric equation into the question would help pin down questions of domain (i.e. what values of $x$ and $n$ actually make sense, given that they have to be fed to some trig function). A more complete reference to "engage exam crack" (whatever that is) would also be helpful. Apr 15 '19 at 16:41
• @XanderHenderson what do you mean by 'more complete reference'? Apr 17 '19 at 13:42

1) Convert the problem into quadratic $$x^2(1-3n) + x(7-3n) + 1-3n = 0$$

2) set discriminant greater than equal to $$0$$

3) find the range of $$n$$

4) find the possible values of n which are $$(0,1,-1)$$

5) plug them back in to find values of $$x$$

• That's a nice way of combining the steps. Well done! Apr 12 '19 at 6:40

$$3n =\dfrac{x^2 + 7x +1}{ x^2 + x +1}$$ so $$3nx^2+3nx+3n =x^2+7x+1$$ so $$(3n-1)x^2+(3n-7)x+3n-1 =0$$ or

$$\begin{array}\\ x &=\dfrac{-3n+7\pm \sqrt{(3n-7)^2-4(3n-1)^2}}{2(3n-1)}\\ &=\dfrac{-3n+7\pm \sqrt{(3n-7-2(3n-1))(3n-7+2(3n-1))}}{2(3n-1)}\\ &=\dfrac{-3n+7\pm \sqrt{(-3n-5)(9n-9)}}{2(3n-1)}\\ &=\dfrac{-3n+7\pm 3\sqrt{(-3n-5)(n-1)}}{2(3n-1)}\\ \end{array}$$

If nothing is specified about $$x$$, this is as far as we can go.

If $$x$$ has to be real, then $$(3n+5)(n-1) \le 0$$ so that $$-\dfrac53 \le n \le 1$$. Since $$n$$ is an integer, $$n = -1, 0, 1$$.

If $$x$$ is supposed to be rational, then $$(3n-7)^2-4(3n-1)^2 =m^2$$. From the preceding result, $$n=1 \implies m^2 =4^2-4(2)^2 =0$$, $$n=0 \implies m^2 =7^2-4(1)^2 =45$$, $$n=-1 \implies m^2 =10^2-4(-4)^2 =36$$.

Therefore the only rational solutions with integer $$n$$ are $$n=1, 0, -1$$ for which $$n=1 \implies x =\dfrac{-3n+7\pm 3\sqrt{(-3n-5)(n-1)}}{2(3n-1)} =\dfrac{4}{4} =1$$, $$n=0 \implies x =\dfrac{-3n+7\pm 3\sqrt{(-3n-5)(n-1)}}{2(3n-1)} =\dfrac{7\pm 3\sqrt{5}}{-2}$$, and $$n=-1 \implies x =\dfrac{-3n+7\pm 3\sqrt{(-3n-5)(n-1)}}{2(3n-1)} =\dfrac{-10\pm 4}{-8} =\dfrac{-14, -6}{-8} =\dfrac74, \dfrac52$$.

• Why did you exclude n= 0, if it is because it doesn't provide a rational solution , then question doesn't say anything about X to be rational or irrational but only real. Apr 12 '19 at 5:16
• You are right. Added that case and upvoted your comment. Thanks, Apr 12 '19 at 5:26
• The question doesn't actually say anything about $x$ being real, so why is everyone making that assumption? Apr 15 '19 at 5:45