a) We can assert that f has a global minimum since it is a polynomial of even degree with a positive leading coefficient. A thorough analysis of why this is true first comes from realizing that
x→∞limf(x)=x→−∞limf(x)=∞.This means that for any M>0, there exists δ>0 such that
∀x∈R,∣x∣>δ⟹f(x)>M.Let M=f(0). Then,
∀x∈R,∣x∣>δ⟹f(x)>f(0).Now consider the interval [−M,M]. We know that f is continuous over this interval (since f is a sum of continuous functions) and therefore it attains a minimum value at f(c) for some point c∈[−M,M]. Hence,
∀x∈[−M,M],f(c)≤f(x)and
∀x∈/[−M,M],f(c)≤f(0)<f(x).Hence, f(c)≤f(x) for all x and therefore c is the global minimum point of f.
We can now apply the interior extremum theorem to the interval (−M,M) over which c is a minimum point and at which f is also differentiable, being a polynomial, and get
f′(c)=0⟹i=1∑n2(c−ai)=0⟹nc=i=1∑nai⟹c=n∑i=1nai.b) Spivak gives us the hint of considering f(y)−f(x) for x∈[aj−1,aj] and y∈[aj,aj+1]. The expression gives
f(y)−f(x)=i=1∑n∣y−ai∣−i=1∑n∣x−ai∣=i=1∑n(∣y−ai∣−∣x−ai∣).Notice that for i≥j+1,
∣y−ai∣−∣x−ai∣=−(y−x)and for i≤j−1,
∣y−ai∣−∣x−ai∣=y−x.Thus,
f(y)−f(x)=(j−1)(y−x)−(n−j)(y−x)+∣x−aj∣−∣y−aj∣and therefore
f(y)−f(x)=(2j−n−1)(y−x)+∣x−aj∣−∣y−aj∣.Now if ∣x−aj∣=∣y−aj∣, then
f(y)−f(x)=(2j−n−1)(y−x).Notice that for odd values of n, the difference is negative for j<2n+1, 0 at the midpoint, and positive for j>2n+1. In this case the minimum value is
f(a2n+1).For even values of n, we notice the same decreasing and increasing function pattern but over j≤2n and j>2n respectively. This hints at the minimum being within the interval [a2n,a2n+1]. In fact, if x,y∈[a2n,a2n+1] and x≤y then
∣y−aj∣−∣x−aj∣={y−x,−(y−x),j≤2n,j>2n.Hence,
f(y)−f(x)=i=1∑n∣y−ai∣−∣x−ai∣=2n(y−x)+2n(−(y−x))=0.Thus, for even values of n we conclude that the minimum value is f(z) for z∈[a2n,a2n+1].
c) We have that
f′(x)=−(1+∣x∣)2sign(x)−(1+∣x−a∣)2sign(x−a)for x=0 and x=a. Consider now its critical points:
f′(x)=0⟹(1+∣x∣)2sign(x)=−(1+∣x−a∣)2sign(x−a).We see that f has critical points neither for x<0 nor for x>a. For 0<x<a, we have
f′(x)=0⟹(1+∣x∣)21=(1+∣x−a∣)21⟹∣x∣=∣x−a∣⟹x2=(x−a)2⟹x2=x2−2ax+a2⟹x=2a.The values of f at notable points include
f(0)=1+1+a1,f(2a)=1+2a1+1+2a1=2+a4,f(a)=1+a1+1.Since f′ is positive for x<0, negative for 0<x<2a, positive again for 2a<x<a, and negative again for x>a, then the maximum value of f is
1+a1+1.