The function f(x)={3(1−2∣x∣)0if ∣x∣≤2if ∣x∣>2 is a triangular function with peak value 3 at x=0, decreasing linearly to 0 at x=±2.
We can write f piecewise as: f(x)=0 for x<−2; f(x)=3+23x for −2≤x≤0; f(x)=3−23x for 0≤x≤2; f(x)=0 for x>2.
Now g(x)=f(x+2)−f(x−2). The function f(x+2) is nonzero when ∣x+2∣≤2, i.e., −4≤x≤0. The function f(x−2) is nonzero when ∣x−2∣≤2, i.e., 0≤x≤4.
Computing f(x+2) piecewise: For −4≤x≤−2, we have x+2∈[−2,0], so f(x+2)=3+23(x+2)=6+23x. For −2≤x≤0, we have x+2∈[0,2], so f(x+2)=3−23(x+2)=−23x.
Computing f(x−2) piecewise: For 0≤x≤2, we have x−2∈[−2,0], so f(x−2)=3+23(x−2)=23x. For 2≤x≤4, we have x−2∈[0,2], so f(x−2)=3−23(x−2)=6−23x.
Therefore g(x) is: g(x)=0 for x<−4; g(x)=6+23x for −4≤x≤−2; g(x)=−23x for −2≤x≤0; g(x)=−23x for 0≤x≤2; g(x)=−6+23x for 2≤x≤4; g(x)=0 for x>4.
Notice that on [−2,2], g(x)=−23x is a single linear piece, so g is smooth there (including at x=0).
Checking continuity at each breakpoint: At x=−4: left limit is 0 and g(−4)=6−6=0. Continuous. At x=−2: left value =6−3=3 and right value =3. Continuous. At x=0: both sides give 0. Continuous. At x=2: left value =−3 and right value =−6+3=−3. Continuous. At x=4: left value =−6+6=0 and right value =0. Continuous.
So g is continuous everywhere, meaning n=0.
Checking differentiability: At x=−4: left derivative is 0, right derivative is 23. Not differentiable. At x=−2: left derivative is 23, right derivative is −23. Not differentiable. At x=0: both sides have derivative −23. Differentiable. At x=2: left derivative is −23, right derivative is 23. Not differentiable. At x=4: left derivative is 23, right derivative is 0. Not differentiable.
So g is not differentiable at 4 points: x=−4,−2,2,4, giving m=4.
Therefore n+m=0+4=4.