# █ 本文译自 Bill Gosper 在 Wolfram 社区发表的热点文章：Solving polynomials

`TableForm[{a x + b, a x^2 + b x + c, a x^3 + b x^2 + c x + d, ". . ."}] // TraditionalForm`

`Plot[2 x + 3, {x, -2, 1}]`

2 x + 3 = 0 的（唯一）解是 x = -3/2. 一般情况下，有 x = -b/a. 由于含有 x 的平方项，y = a x^2 + b x + c 是二次的. 你会记得一元二次方程有两个通解：

`Solve[a x^2 + b x + c == 0, x]`

`Plot[{(1 - x)/(x + 2), 2 x + 3}, {x, -4, 1}, PlotRange -> {{-4, 1}, {-6, 6}}, AspectRatio -> 4/5]`

`(1 - x)/(x + 2) == 2 x + 3;`

`Distribute[(x + 2)*%, Equal]`

1 - x == (2 + x) (3 + 2 x)

`(2 + x) (3 + 2 x) - # & /@ %`

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

`Expand@%`

5 + 8 x + 2 x^2 == 0

`Solve[%]`

{{x -> 1/2 (-4 - Sqrt[6])}, {x -> 1/2 (-4 + Sqrt[6])}}

`N@%`

{{x -> -3.22474}, {x -> -0.775255}}

`Solve[(1 - x)/(x + 2) == 2 x + 3]`

{{x -> 1/2 (-4 - Sqrt[6])}, {x -> 1/2 (-4 + Sqrt[6])}}

`Flatten[% /. Rule -> List]`

{x, 1/2 (-4 - Sqrt[6]), x, 1/2 (-4 + Sqrt[6])}

`Plot[{(1 - x)/(x + 2), 2 x + 3}, %[[{1, 2, 4}]]]`

```Plot[{(x - 1)/(x + 2), 2 x + 3}, {x, -4, 1}, PlotRange -> {{-4, 1}, {-6, 6}},
AspectRatio -> 4/5]```

`Solve[(x - 1)/(x + 2) == 2 x + 3]`

{{x -> 1/2 (-3 - I Sqrt[5])}, {x -> 1/2 (-3 + I Sqrt[5])}}

`# + b^2/(4 a) - c & /@ (a x^2 + b x + c == 0)`

b^2/(4 a) + b x + a x^2 == b^2/(4 a) - c

`Factor /@ %`

(b + 2 a x)^2/(4 a) == -((-b^2 + 4 a c)/(4 a))

`4 a # & /@ %`

(b + 2 a x)^2 == b^2 - 4 a c

`Sqrt /@ % // PowerExpand`

b + 2 a x == Sqrt[b^2 - 4 a c]

`Solve[ a x^3 + b x^2 + c x + d == 0, x] // TraditionalForm`

`Plot[x^3 - x + 1/3, {x, -3/2, 3/2}]`

`Solve[x^3 - x + 1/3 == 0]`

`Simplify@%%`

`ComplexExpand@Im[x /. %]`

{0, 0, 0}

`ComplexExpand@Re[x /. %%]`

`Developer`TrigToRadicals@%%`

`N@%`

{0.742227 + 0. I, 0.394931 + 0. I, -1.13716 + 0. I}

Henry Baker 的动画（本文顶部可以看到实际动画）展示了均为实数的三个根之间的关系：

`Solve[ a x^4 + b x^3 + c x^2 + d x + e == 0, x]`

`Solve[ a x^5 + b x^4 + c x^3 + d x^2 + e x + f == 0, x]`

`Expand@# == # &[(x^2 + 1) (x^3 - x - 1)]`

-1 - x - x^2 + x^5 == (1 + x^2) (-1 - x + x^3)

`x^5 - 5 x^2 - 3 == 0`

`%^5 - 5`69 %^2`

3.0000000000000000000000000000000000000000000000000000000000000000000

`Factor[5 + 4 x^2 - 4 x^3 + x^4 - 2 x^5 + x^6]`

5 + 4 x^2 - 4 x^3 + x^4 - 2 x^5 + x^6

`Solve[% == 0]`

`x^2 - 4 x + 5 /. x -> x^3 - x^2`

5 - 4 (-x^2 + x^3) + (-x^2 + x^3)^2

`Factor@%`

5 + 4 x^2 - 4 x^3 + x^4 - 2 x^5 + x^6

`Decompose[5 + 4 x^2 - 4 x^3 + x^4 - 2 x^5 + x^6, x]`

{5 - 4 x + x^2, -x^2 + x^3}

5 + 18 x + 36 x^2 + 36 x^6

{570630428688384000000 + 4891824455002619904 x + 161093791317491712 x^2 + 12153384861696 x^3 + 984379392 x^4 - 17280 x^5 + x^6}

`Simplify[% /. x -> %%]`

{0}

`Solve[1 + x + x x - x^3 + x^4 + x^5 + x^6 == 0]`

（失败。）但是我们可以对付完全一般的情况！ 对于任意a，b，c，d，假设 x 满足互反多项式（所以被称作回文式）

`a x^6 + b x^5 + c x^4 + d x^3 + c x x + b x + a`

a + b x + c x^2 + d x^3 + c x^4 + b x^5 + a x^6

`Factor[PolynomialRemainder[%, x + 1/x - y, x]]`

(-x - y + x y^2) (-2 b + d - 3 a y + c y + b y^2 + a y^3)

`1/x^3 + x^3 == -3 (1/x + x) + (1/x + x)^3`

1/x^2 + x^2 == -2 + (1/x + x)^2

292 篇文章54 人订阅

0 条评论

## 相关文章

### 模拟退火算法从原理到实战【基础篇】

模拟退火算法来源于固体退火原理，将固体加温至充分高，再让其徐徐冷却，加温时，固体内部粒子随温升变为无序状，内能增大，而徐徐冷却时粒子渐趋有序，在每个温度都达...

4176

1013

3538

1.8K3

### 【论文推荐】最新六篇情感分析相关论文—深度上下文、支持向量机、两级LSTM、多模态情感分析、软件工程、代码混合

【导读】专知内容组整理了最近六篇情感分析（Sentiment Analysis）相关文章，为大家进行介绍，欢迎查看! 1. Deep contextualize...

1.4K13

2022

2152

### 数据挖掘整理

2.1数据清洗：填写缺失值、光滑噪声数据，识别或删除离群点，并解决不一致性来“清理”数据

1853

4733

1362