Being a cubic equation with positive coefficient of the cube term, and containing a negative square term it has an overall positive slope interrupted by a temporary dip and then a recovery. Q merely moves it up and down with respect to the x-axis. The symmetry is such that at some points where there are three real solutions those solutions will have a larger gap on one side, and then as the Q moves the curve up or down, the larger gap goes to the other side. At one point in the middle the two gaps will be equal.
We're looking only for integer values, so we can assume that this one value that works is an integer so we test only integers.
clc, clearvars
syms x q
for q=200:300
eqn=x^3-15*x^2+q==0;
S=vpasolve(eqn,x);
if in(S(1),'real')
if in(S(2),'real')
if in(S(3),'real')
if S(3)-S(2)==S(2)-S(1)
disp(S)
disp(q)
end
end
end
end
end
and indeed the integer value 250 does supply equally spaced solutions:
-3.6602540378443864676372317075294
5.0
13.660254037844386467637231707529
250
showing the central solution when Q=250 as 5 and the other two solutions being 8.660254037844386467637231707529... units in either direction.
Since there is only one solution in real numbers, the soltion with Q=250 is the only solution even without the integer requirement.
|
Posted by Charlie
on 2021-11-16 15:46:39 |