For what values k does the polynomial f(x) = x^4 + 7x^3 + 9x^2 - 7x + k have three roots in arithmetic progression?
Initially when I saw the graph
for x^4 + 7x^3 + 9x^2 - 7x, I noticed that if k were somewhere around -2, the lowest three roots would be in arithmetic progression, with the second root being midway between the first and the third; and that if k were somewhere around -7, the highest three roots would be in arithmetic progression.
Only later did I notice that near (or maybe exactly at) k = -10, the first, second and fourth of the roots would be in arithmetic progression, maybe at exactly -5, -2 and 1. A check with a calculator shows that indeed, k = -10 works exactly, with those exact roots.
But that still leaves values of k near -2 and -7 as valid answers as well.
(From inspection of the graph, roots 1, 3 and 4 would never be in arithmetic progression.)
k roots
----------------- -------------------------------------------------------
-2.25893813435928 -4.88240472602988 -2.56872930440884 -.25505388278781
-6.94809311564072 -2.26932171598903 -.681270695591157 .906780324806719
nk in the below program is the negative of k, which is the height of the graph shown by the link above for the function without k.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
low = 1.5: high = 2.5
Do
md = (low + high) / 2
a = root(md, -5, -4.5)
b = root(md, -3, -2)
c = root(md, -0.5, 0)
If c - b < b - a Then high = md
If c - b > b - a Then low = md
Loop Until high = low Or c - b = b - a
Text1.Text = Text1.Text & -md & " " & Str(a) & " " & Str(b) & " " & Str(c) & crlf
low = 6: high = 8
Do
md = (low + high) / 2
a = root(md, -3, -2)
b = root(md, -1, 0)
c = root(md, 0.5, 1.5)
If c - b > b - a Then high = md
If c - b < b - a Then low = md
Loop Until high = low Or c - b = b - a
Text1.Text = Text1.Text & -md & " " & Str(a) & " " & Str(b) & " " & Str(c) & crlf
Text1.Text = Text1.Text & crlf & " done"
End Sub
Function root(nk, btm, top)
low = btm: high = top
drct = Sgn(f(high, nk) - f(low, nk))
Do
DoEvents
md = (low + high) / 2
x = md
y = f(x, nk)
If y * drct > 0 Then high = md
If y * drct < 0 Then low = md
Loop Until Abs(high - low) < 0.000000000000001 Or Abs(y) < 0.000000000000001
root = x
End Function
Function f(x, nk)
f = x ^ 4 + 7 * x * x * x + 9 * x * x - 7 * x - nk
End Function
|
Posted by Charlie
on 2016-03-02 10:32:09 |