devarshi-dt-logo

Question:

The function f(x) = 2|x| + |x+2| - |x+2| has a local minimum or a local maximum at x = ?

𕒶

𕒶3

2

23

Solution:

y=2|x|+|x+2|−|x+2|
Case-1 :-x<−2
y=−2x−(x+2)−|−x+2|
y=−2x−x−2−|−x+2|
y=−3x−2−|−x+2|
y=−3x−2−(2−x) (since x < -2, then -x+2 > 0)
y=−2x−4..(1)
Case-2 :−2<x<0
y=−2x+(x+2)−|−x+2|
y=−x+2−|−x+2|
So, for x<−3 y=2x+4. (2)
And for x∈[−3,0] y=−x. (3)
Case 3:-x>0
y=2x+(x+2)−|x+2|
y=3x+2−|x+2|
For 0<x<2, y=4x..(4)
And for x>2, y=2x+4 (5)
After drawing this graph, we can conclude x=−2,0 are points of minimum and x=−3 is a point of maxima