Question
Question: If $f(x)=\prod_{i=1}^{3}(x-a_i)+\sum_{i=1}^{3}a_i-3x$ where $a_i < a_{i+1}$ for i = 1, 2, then f(x) ...
If f(x)=∏i=13(x−ai)+∑i=13ai−3x where ai<ai+1 for i = 1, 2, then f(x) = 0 has :

only one distinct real root
exactly two distinct real roots
exactly 3 distinct real roots
3 equal real roots
exactly 3 distinct real roots
Solution
Let the given function be f(x)=∏i=13(x−ai)+∑i=13ai−3x, where a1<a2<a3. This can be written as f(x)=(x−a1)(x−a2)(x−a3)+(a1+a2+a3)−3x.
f(x) is a cubic polynomial in x. As x→∞, f(x)→∞, and as x→−∞, f(x)→−∞. A cubic polynomial with real coefficients must have at least one real root.
Let's evaluate the function at the points a1,a2,a3:
f(a1)=(a1−a1)(a1−a2)(a1−a3)+(a1+a2+a3)−3a1=0+a1+a2+a3−3a1=a2+a3−2a1. Since a1<a2 and a1<a3, we have a2−a1>0 and a3−a1>0. f(a1)=(a2−a1)+(a3−a1)>0.
f(a2)=(a2−a1)(a2−a2)(a2−a3)+(a1+a2+a3)−3a2=0+a1+a2+a3−3a2=a1+a3−2a2. f(a2)=(a1−a2)+(a3−a2). Since a1<a2<a3, a1−a2<0 and a3−a2>0. The sign of f(a2) depends on the relative magnitudes of ∣a1−a2∣ and ∣a3−a2∣. f(a2) can be positive, negative, or zero.
f(a3)=(a3−a1)(a3−a2)(a3−a3)+(a1+a2+a3)−3a3=0+a1+a2+a3−3a3=a1+a2−2a3. Since a1<a3 and a2<a3, we have a1−a3<0 and a2−a3<0. f(a3)=(a1−a3)+(a2−a3)<0.
We have f(a1)>0 and f(a3)<0. Since f(x) is continuous and a1<a3, by the Intermediate Value Theorem, there must be at least one real root in the interval (a1,a3).
To determine the exact number of distinct real roots, let's consider the derivative of f(x). f′(x)=dxd[(x−a1)(x−a2)(x−a3)]+dxd[a1+a2+a3−3x] f′(x)=(x−a2)(x−a3)+(x−a1)(x−a3)+(x−a1)(x−a2)−3. This is a quadratic function of x.
f′(x)=(x2−(a2+a3)x+a2a3)+(x2−(a1+a3)x+a1a3)+(x2−(a1+a2)x+a1a2)−3 f′(x)=3x2−2(a1+a2+a3)x+(a1a2+a1a3+a2a3−3). The discriminant of this quadratic is Δ′=(−2(a1+a2+a3))2−4(3)(a1a2+a1a3+a2a3−3) Δ′=4(a1+a2+a3)2−12(a1a2+a1a3+a2a3)+36 Δ′=4(a12+a22+a32+2a1a2+2a1a3+2a2a3)−12(a1a2+a1a3+a2a3)+36 Δ′=4(a12+a22+a32)+8(a1a2+a1a3+a2a3)−12(a1a2+a1a3+a2a3)+36 Δ′=4(a12+a22+a32)−4(a1a2+a1a3+a2a3)+36 Δ′=2(2a12+2a22+2a32−2a1a2−2a1a3−2a2a3)+36 Δ′=2((a1−a2)2+(a1−a3)2+(a2−a3)2)+36. Since a1<a2<a3, the terms (a1−a2)2, (a1−a3)2, and (a2−a3)2 are all positive. Thus, Δ′>0. This means f′(x)=0 has two distinct real roots, say r1 and r2, with r1<r2. These are the critical points of f(x).
A cubic function with two distinct real critical points has a local maximum at one critical point and a local minimum at the other. For the equation f(x)=0 to have three distinct real roots, the local maximum must be positive and the local minimum must be negative.
We know f(a1)>0 and f(a3)<0.
Case 1: f(a2)>0. We have signs ++−. f(x)→−∞ as x→−∞. f(a1)>0. There is a root in (−∞,a1). f(a1)>0, f(a2)>0. No guaranteed root in (a1,a2). f(a2)>0, f(a3)<0. There is a root in (a2,a3). f(a3)<0. f(x)→∞ as x→∞. No guaranteed root in (a3,∞). However, a cubic polynomial must have 1 or 3 real roots (counting multiplicity). Since we found roots in (−∞,a1) and (a2,a3), there must be a third real root. This third root must be in (a3,∞) because f(a3)<0 and f(x)→∞. So in this case, there are three real roots: one in (−∞,a1), one in (a2,a3), and one in (a3,∞). Are they distinct? Yes, because they are in disjoint intervals.
Case 2: f(a2)<0. We have signs +−−. f(x)→−∞ as x→−∞. f(a1)>0. There is a root in (−∞,a1). f(a1)>0, f(a2)<0. There is a root in (a1,a2). f(a2)<0, f(a3)<0. No guaranteed root in (a2,a3). f(a3)<0. f(x)→∞ as x→∞. There is a root in (a3,∞). So in this case, there are three real roots: one in (−∞,a1), one in (a1,a2), and one in (a3,∞). Are they distinct? Yes, because they are in disjoint intervals.
Case 3: f(a2)=0. We have signs +0−. a2 is a root. f(x)→−∞ as x→−∞. f(a1)>0. There is a root in (−∞,a1). f(a1)>0, f(a2)=0. a2 is a root. f(a2)=0, f(a3)<0. a2 is a root. f(a3)<0. f(x)→∞ as x→∞. There is a root in (a3,∞). So we have a root in (−∞,a1), the root a2, and a root in (a3,∞). These are three distinct real roots.
In all possible cases for the sign of f(a2), we find that there are three distinct real roots.
Therefore, the final answer is exactly 3 distinct real roots.