# How to solve $x^4-2x^3-x^2+2x+1=0$?

How to solve $$x^4-2x^3-x^2+2x+1=0$$?

Answer given is: $$\frac{1+\sqrt5}{2}$$

I tried solving it by taking common factors:

$$x^3(x-2)-x(x-2)+1=0$$ $$x(x-2)(x^2-1)+1=0$$ $$(x+1)(x)(x-1)(x-2)+1=0$$

But it's not leading me anywhere.

• Try $f=(x^2+ax+b)(x^2+cx+d)$. May 4, 2021 at 9:26
• May 4, 2021 at 9:34
• @MartinR Thanks a lot. The link has helped. May 4, 2021 at 9:43
• There were some other beautiful answers below. They seem to have been deleted now. I wonder why. If you guys are reading, thank you for your answers. I wish your posts were not deleted. Thanks. May 4, 2021 at 9:49
• Does this answer your question? Quadratic substitution question: applying substitution $p=x+\frac1x$ to $2x^4+x^3-6x^2+x+2=0$ May 4, 2021 at 10:53

Another way to notice the factorization $$x^4-2x^3-x^2+2x+1=0$$ Since $$x=0$$ is not the root of the equation, divide by $$x^2$$ to get $$x^2 -2x-1 + \frac{2}{x} + \frac{1}{x^2} = 0$$ Rewrite it as $$x^2+\frac{1}{x^2} - 2\left(x-\frac{1}{x}\right) - 1 = 0$$ or $$\left(x-\frac1x\right)^2 + 2 - 2\left(x-\frac{1}{x}\right) - 1 = 0$$ Substitute $$t = x - 1/x$$ $$t^2 + 2 - 2t - 1 = 0\\ t^2 - 2t + 1 = 0 \\ (t-1)^2 = 0$$ Substitute back to get the final result $$\left(x - \frac{1}{x} - 1\right)^2 = 0$$ which says $$(x^2-x-1)^2 = 0$$

• Thanks, it's quite a helpful method. May 4, 2021 at 9:50

Hints:

Let $$x-2=p.$$

Then you will have a perfect square. It comes from a general fact:

"One more than a product of four consecutive positive integers is a perfect square."

Prove that the product of four consecutive positive integers plus one is a perfect square

• Well this deserves a mention on the "surprising theorems" thread. May 4, 2021 at 9:28
• If $x-1=p$ then $x=p+1\implies$ my equation becomes $(p+2)(p+1)(p)(p-1)+1=0$. How would that lead to a perfect square? May 4, 2021 at 9:33
• Thank you very much. May 4, 2021 at 9:47
• Hello, Boka, I just figured we need not have substituted $p$. We could have just multiplied the middle two and the first and the last one in the original equation itself and then substituted $x^2-x$. May 4, 2021 at 10:07
• Got it. That $p$ substitution indeed helped me see that it's a product of four consecutive integers. Thanks. May 4, 2021 at 12:28

### General solution:

I will solve a specific quartic equation that is a specific case of a general quartic equation.

Let, $$a≠0,~ b≠0$$, then we have

$$ax^4+bx^3+cx^2+dx+e=0$$

$$x^2+\frac e{ax^2}+\frac ba x+\frac d{ax}+\frac ca=0$$

\begin{align}&x^2+\frac ea \times \frac 1{x^2}+\frac ba \left(x+\frac {d}{bx}\right)+\frac ca=0&\end{align}

This quartic equation can be directly converted to the quadratic equation in the case below, avoiding the cubic equation.

\begin{align}&x+\frac {d}{bx}=t \\ \implies &t^2=x^2+\frac{d^2}{b^2}\times \frac {1}{x^2}+\frac{2d}{b}\end{align}

Then, if $$\frac ea =\frac{d^2}{b^2}$$

We have

$$t^2-\frac{2d}{b}+\frac ba t+\frac ca=0$$

$$t^2+\frac ba t+\left(\frac ca-\frac{2d}{b}\right)=0$$

The last equation is a quadratic equation.

After solving quadratic, you wil get

$$x+\frac {d}{bx}=t$$

$$bx^2-btx+d=0$$

The last equation is also a quadratic equation.

$$a=1,b=-2,c=-1, d=2, e=1$$

This means

$$\frac ea =\frac{d^2}{b^2}$$

holds.

• That's quite elaborative! +1 May 4, 2021 at 12:31

$$x^4-2x^3-x^2+2x+1 = 0$$

You should split the middle terms and try to look for a common factor.

$$x^4-x^3-x^2-x^3+x^2+x-x^2+x+1 = 0$$

$$x^2(x^2-x-1)-x(x^2-x-1)-1(x^2-x-1) = 0$$

$$(x^2-x-1)^2 = 0$$

Take the square root:

$$x^2-x-1 = ±0$$

$$x^2-x-1 = 0 \lor x^2-x-1 = -0$$

Add $$\frac{5}{4}$$:

$$x^2-x+\frac{1}{4} = \frac{5}{4} \lor x^2-x+\frac{1}{4} = \frac{5}{4}$$

We have two identical quadratic equations so all roots will coincide and there will be two repeated roots instead of four distinct roots.

$$(x-\frac{1}{2})^2 = \frac{5}{4}$$

Take the square root:

$$x-\frac{1}{2} = ±\sqrt{\frac{5}{4}}$$

$$x-\frac{1}{2} = \sqrt{\frac{5}{4}} \lor x-\frac{1}{2} = -\sqrt{\frac{5}{4}}$$

Add $$\frac{1}{2}$$:

$$x = \frac{1}{2} + \frac{\sqrt{5}}{2} \lor x = \frac{1}{2} - \frac{\sqrt{5}}{2}$$

obten la raiz negativa de la siguiente funcion con 4 cifras decimales.

$$2x^4-2x^3+x^2+3x-4=0 \quad\quad$$ newton raphson

• I think this answer would be better with more explanation. For instance, how did you obtain polynomial $2x^4-2x^3+x^2+3x-4\;$? - - - Welcome to Math Stack. Sep 21, 2022 at 22:11