David H. answered 01/13/17
Tutor
5
(18)
Patient & Effective Math/Physics Tutor near Fort Worth
Definition extremum: A function f has a local minimum at x* if f(x)> f(x*) for some neighborhood around x*. Similarly, a function f has a local maximum at x* if f(x) < f(x*) for some neighborhood around x*.
We will apply the First Derivative test. This states that if f has a local extremum at x* and f is differentiable at x* then f'(x*) = 0 (the derivative of f at x* is 0). We also need to look at points where f' does not exist.
Preliminary 1: You will need to know how to take derivative involving absolute value. Let u be a function of x, i.e. u = u(x). If f(x) = |u| then f'(x) = u*u'/|u| where u' is derivative of u. Note you can derive this by using the fact that |u| = square root of u^(2) (take derivative and use the chain rule).
Using above you will find derivative of |x2-4| (let u = x2-4) is (x2-4)*(2x)/|x2-4|
Preliminary 2: We will need to know where x2-4 is positive and negative.
x2-4 is positive when x>2 or x<-2. This means |x2-4| = x2-4 on these intervals.
x2-4 is negative when -2<x<2. This means |x2-4| = -(x2-4)
Preliminary 3: We will need to check the points x = -2 and x=2. This is because f' does not exist at this points. Why?
Because we would get a divide by zero for the derivative of |x2-4| (see prelim 1).
Preliminary 4: A couple ways to determine if an extremum is a max or min. 1 way is to use the 2nd derivative test. The way I use in this problem is I use the fact that if x* is a local min then for some ε > 0, f'(x) < 0 for all x such that x*-ε<x<x* and f'(x)>0 for all x such that x*<x<x*+ε.
Similarly if x* is a local max then f'(x) > 0 for all x such that x*-ε<x<x* and f'(x)<0 for all x such that x*<x<x*+ε.
Back to problem:
We have f(x) = ax + |x2-4|. Taking derivative we get
f'(x) = a + (x2-4)*(2x)/|x2-4|.
Setting f'(x) = 0 and solve for x. We do this by multiplying by |x2-4|
Thus we have a|x2-4|+(x2-4)*(2x) = 0.
Now we need to use Prelim 2.
Case 1: x > 2 or x < -2.
In this case |x2-4| = x2-4. Since x ≠ 2 and x ≠-2 we can divide and we are left with
a+2x = 0. This means x = -a/2 is a critical point. Note in this case a < -4 or a > 4 by our hypothesis.
Case 2: -2<x<2
In this case |x2-4| = -(x2-4). Since x ≠ 2 and x ≠-2 we can divide and we are left with
a-2x = 0. This means x = a/2 is a critical point. Note in this case -4<a<4 by our hypothesis.
Now lets look at different points of a.
1.) Assume a < -4. The critical point then x = -a/2 which means the critical point is > 2. Thus our intervals of interest are (-inf, -2), (-2, 2), (2, -a/2), (-a/2, inf)
a) Pick a point less than -2. This means we are in Case 1 from above. Say x = -3. We have
f'(x) = a+2x = a-6. Since a < -4 this means f'(x) < 0.
b) Pick a point in between (-2, 2). This means we are in Case 2 from above. Say x = 0. We have
f'(x) = a-2*0 = a < -4 which means f'(x) < 0.
a & b imply -2 is NOT a local extrema since no change of sign.
c) Now pick a point between (2, -a/2). This means we are in Case 1 from above. Do get a point take the average of the interval so we get a midpoint. Let x = (2+-a/2)/2 = (2-a/2)/2
We see
f'(x) = a+2*{(2-a/2)/2} = a+(2-a/2) = a/2 + 2 < 0 (when doing the math). Hence f'(x) < 0.
b and c imply 2 is NOT a local extrema since no change of sign.
d) now pick a point (-a/2, inf). This means we are in Case 1 from above. Say x = -a/2+1. We see
f'(x) = a+2*(-a/2+1) = 2 > 0. Hence f'(x) > 0.
c) and d) imply that at x = -a/2 we have a local minimum.
2.) We now need to look at case -4<a<4. This is Case 2 Look at the intervals (-inf, -2), (-2, a/2), (a/2, 2), (2, inf).
Do same steps from above.
You will find x = -2 is a local minimum.
You will find x = a/2 is a local maximum.
You will find x = 2 is a local minimum.
3.) Now look at case a>4. This is case 1 and our intervals (-inf, -a/2), (-a/2, -2), (-2, 2), (2, inf).
Do same steps from above.
You will find x = -a/2 is a local minimum.
You will find x = -2 is NOT a local extremum.
You will find x = 2 is NOT a local extremum.
4.) Now you need to consider the case where a = -4 or a = 4.
In this case f'(x) never equals 0 so we need only consider intervals (-inf, -2), (-2, 2), (2, inf).
If a = -4 then x = 2 is a local minimum.
If a = 4 then x = -2 is a local minimum.
From #1 if a < -4 we see we have 1 local minimum. From #2, -4<a<4 we have 2 local minimums. From case 3 a>4 we have 1 local minimum. From case 4 we if a = -4 we have 1 local minimum and if a = 4 we have 1 local minimum.
Thus our answer is f has one local minimum if a < -4 if a > 4, if a = -4, or if a = 4.
Hope this was helpful. Please message me if you have any questions or If I seemed to make a mistake anywhere.
Thanks - David