The Student Room Group

Finding relative and absolute maxima of an absolute function

f(x) = |x^2 -16| + 2x

My first approach: Differentiating it w.r.t. x.
f'(x) = 2x (x^2-16) /|x^2 - 16| + 2
Set f'(x) = 0,
2x(x^2-16) = -2|x^2-16|
What can I do next? I figure I can only restrict the x value or square both sides. How do I get 4 and -4?

My second approach: Split the absolute value function to a piecewise function.
f(x) = {x^2+2x-16, x>=4 or x<=-4
_____{-x^2+2x+16, -4<=x<=4
Is this right? Both equations include equal signs?
Then I differentiate w.r.t. x.
f'(x) = {2x+2, x>=4 or x<=-4
______{-2x+2, -4<=x<=4
So the critical points are x = -1 or 1, which are wrong! f(-1) is neither a local max or local min. What's wrong?

How should I approach this question?

Final 2 questions:
Are end points never relative extrema?
Relative extrema include absolute extrema?


Thank you for your help!
(edited 9 years ago)
Reply 1
Original post by startanewww
f(x) = |x^2 -16| + 2x

My first approach: Differentiating it w.r.t. x.
f'(x) = 2x (x^2-16) /|x^2 - 16| + 2
Set f'(x) = 0,
2x(x^2-16) = -2|x^2-16|
What can I do next? I figure I can only restrict the x value or square both sides. How do I get 4 and -4?

My second approach: Split the absolute value function to a piecewise function.
f(x) = {x^2+2x-16, x>=4 or x<=-4
_____{-x^2+2x+16, -4<=x<=4
Is this right? Both equations include equal signs?
Then I differentiate w.r.t. x.
f'(x) = {2x+2, x>=4 or x<=-4
______{-2x+2, -4<=x<=4
So the critical points are x = -1 or 1, which are wrong! f(-1) is neither a local max or local min. What's wrong?

How should I approach this question?

Final 2 questions:
Are end points never relative extrema?
Relative extrema include absolute extrema?


Thank you for your help!



I do not see what you are doing in part(a) but this would be my approach

if x^2>16, i.e. x<-4 or x>4, then f(x) = x^2+2x-16

if x^2<16 i.e. -4<x< 4, then f(x) =- x^2+2x+16

the equals I would include at both ends but Pure Mathematicians might disagree and they would probably be right.

see if this helps

[ps a graph will also help]
(edited 9 years ago)
Original post by startanewww
f(x) = |x^2 -16| + 2x

My first approach: Differentiating it w.r.t. x.
f'(x) = 2x (x^2-16) /|x^2 - 16| + 2
Set f'(x) = 0,
2x(x^2-16) = -2|x^2-16|
What can I do next? I figure I can only restrict the x value or square both sides. How do I get 4 and -4?

My second approach: Split the absolute value function to a piecewise function.
f(x) = {x^2+2x-16, x>=4 or x<=-4
_____{-x^2+2x+16, -4<=x<=4
Is this right? Both equations include equal signs?
Then I differentiate w.r.t. x.
f'(x) = {2x+2, x>=4 or x<=-4
______{-2x+2, -4<=x<=4
So the critical points are x = -1 or 1, which are wrong! f(-1) is neither a local max or local min. What's wrong?

How should I approach this question?

Final 2 questions:
Are end points never relative extrema?
Relative extrema include absolute extrema?


Thank you for your help!


Any question involving the absolute value function you will have to check all the cases

now as you said:

Unparseable latex formula:

\frac{d}{dx}(|x^2-16|+2x)= \left\{\begin{array}{lr}[br]2-2x& : -4<x<4\\[br] 2+2x &: otherwise[br] \end{array}[br] \right.[br]



Now clearly when 22x=0    x=12-2x=0 \implies x=1 so x=1 is a critical point (max by 2nd derivative test)
but what about 2+2x=0    x=12+2x=0 \implies x=-1 but 4<1<4-4<-1<4 so cannot use second part of function here since it only applies when x4,x4x\le-4, x \ge 4. So no solution in this case.

Going back to the end points of the first part of function gives x=4,x=4x=4, x=-4 as minimums since the derivative goes from decreasing to increasing at this points (as x is increasing) .
Original post by startanewww

Then I differentiate w.r.t. x.
f'(x) = {2x+2, x>=4 or x<=-4
______{-2x+2, -4<=x<=4
So the critical points are x = -1 or 1, which are wrong! f(-1) is neither a local max or local min. What's wrong?It's not sufficient to simply solve the piecewise equations, you have to make sure the solutions fall in the correct domain for where the piecewise equations are defined.

Solving 2x+2 = 0 gives x = -1, but, f'(x) = 2x+2 is only valid in the ranges x <=-4 or x>=4. So you have to rule out x = -1 here.

Solving -2x+2 = 0 gives x = 1; f'(x) = -2x+2 is valid for -4 <= x < = 4 and so x=1 is a valid solution here.
Reply 4
I think some people also call cusps as critical points so (-4,-8), (4,8) may also be added to the true "smooth" local max at (1,17)
Original post by DFranklin
It's not sufficient to simply solve the piecewise equations, you have to make sure the solutions fall in the correct domain for where the piecewise equations are defined.

Solving 2x+2 = 0 gives x = -1, but, f'(x) = 2x+2 is only valid in the ranges x <=-4 or x>=4. So you have to rule out x = -1 here.

Solving -2x+2 = 0 gives x = 1; f'(x) = -2x+2 is valid for -4 <= x < = 4 and so x=1 is a valid solution here.



Original post by tombayes
Any question involving the absolute value function you will have to check all the cases

now as you said:

Unparseable latex formula:

\frac{d}{dx}(|x^2-16|+2x)= \left\{\begin{array}{lr}[br]2-2x& : -4<x<4\\[br] 2+2x &: otherwise[br] \end{array}[br] \right.[br]



Now clearly when 22x=0    x=12-2x=0 \implies x=1 so x=1 is a critical point (max by 2nd derivative test)
but what about 2+2x=0    x=12+2x=0 \implies x=-1 but 4<1<4-4<-1<4 so cannot use second part of function here since it only applies when x4,x4x\le-4, x \ge 4. So no solution in this case.

Going back to the end points of the first part of function gives x=4,x=4x=4, x=-4 as minimums since the derivative goes from decreasing to increasing at this points (as x is increasing) .



I think some people also may count the cusps. (a matter of definition of a critical point)
so cusps at (4,8), (-4,8) and a "smooth" local max at (1,17).

For such a simple graph (two quadratics) why bother to differentiate?
Original post by TeeEm

For such a simple graph (two quadratics) why bother to differentiate?


1. For fun:biggrin:.
2. To show off latex skills:wink:
Reply 6
Original post by tombayes
1. For fun:biggrin:.
To show off latex skills:wink:


:frown:
Original post by TeeEm
:frown:


why sad face?
Reply 8
Original post by tombayes
why sad face?


I have forgotten how to use it (over 20 years now) and I do not have the heart to go through the same pain I went through

I use more user friendly software, it is a shame I cannot use here...

I do not understand why thesis for instance, has to be done in Latex (conspiracy?, cartel? or plainly Educational mafia....?)
Reply 9
Original post by TeeEm
I do not see what you are doing in part(a) but this would be my approach

if x^2>16, i.e. x<-4 or x>4, then f(x) = x^2+2x-16

if x^2<16 i.e. -4<x< 4, then f(x) =- x^2+2x+16

the equals I would include at both ends but Pure Mathematicians might disagree and they would probably be right.

see if this helps

[ps a graph will also help]


Thanks for your reply!
My first approach is to find critical points by differentiation.
From
"if x^2>16, i.e. x<-4 or x>4, then f(x) = x^2+2x-16

if x^2<16 i.e. -4<x< 4, then f(x) =- x^2+2x+16",
we already know the critical points are 4 and -4 w/o differentiating the function?
Reply 10
Original post by tombayes
Any question involving the absolute value function you will have to check all the cases

now as you said:

Unparseable latex formula:

\frac{d}{dx}(|x^2-16|+2x)= \left\{\begin{array}{lr}[br]2-2x& : -4<x<4\\[br] 2+2x &: otherwise[br] \end{array}[br] \right.[br]



Now clearly when 22x=0    x=12-2x=0 \implies x=1 so x=1 is a critical point (max by 2nd derivative test)
but what about 2+2x=0    x=12+2x=0 \implies x=-1 but 4<1<4-4<-1<4 so cannot use second part of function here since it only applies when x4,x4x\le-4, x \ge 4. So no solution in this case.

Going back to the end points of the first part of function gives x=4,x=4x=4, x=-4 as minimums since the derivative goes from decreasing to increasing at this points (as x is increasing) .


Thank you!!
I didn't realise my mistake...
Do we need to check both the end points of the function and the differentiated function???
Reply 11
Original post by DFranklin
It's not sufficient to simply solve the piecewise equations, you have to make sure the solutions fall in the correct domain for where the piecewise equations are defined.

Solving 2x+2 = 0 gives x = -1, but, f'(x) = 2x+2 is only valid in the ranges x <=-4 or x>=4. So you have to rule out x = -1 here.

Solving -2x+2 = 0 gives x = 1; f'(x) = -2x+2 is valid for -4 <= x < = 4 and so x=1 is a valid solution here.


Thanks for your reply!

Can someone answer the following two questions?

Are end points never relative extrema?
Relative extrema include absolute extrema?
Original post by startanewww
Thanks for your reply!

Can someone answer the following two questions?

Are end points never relative extrema?
Relative extrema include absolute extrema?


End points do not have to be relative extrema - easy to think of an example for this e.g.
Unparseable latex formula:

f(x)=\left\{\begin{array}{lr}[br]sin(x) : 0\le x \le 2\pi \\[br]0 : otherwise[br][br] \end{array}[br][br] \right.[br]


Easy to check end points are not extrema.

End points can be relative extrema though:
Unparseable latex formula:

f(x)=\left\{\begin{array}{lr}[br]1: 0\le x \le 2\pi \\[br]0 : otherwise[br][br] \end{array}[br][br] \right.[br]



Relative extrema include absolute extrema: i not really sure what you mean since obviously they do.

Maybe you are confused: neither relative nor absolute extrema mean the (first) derivative is 0. The derivative is only 0 for a stationary point which may or may not be one of the functions extrema (could be an inflection). A relative extrema is just the greatest/lowest value the function takes on a particular interval. Now if one choose the interval with the absolute extrema then that extrema are the relative extrema on that interval as well as the absolute extreme of the whole function.

Hope this clears things up :smile:
Reply 13
Original post by tombayes
End points do not have to be relative extrema - easy to think of an example for this e.g.
Unparseable latex formula:

f(x)=\left\{\begin{array}{lr}[br]sin(x) : 0\le x \le 2\pi \\[br]0 : otherwise[br][br] \end{array}[br][br] \right.[br]


Easy to check end points are not extrema.

End points can be relative extrema though:
Unparseable latex formula:

f(x)=\left\{\begin{array}{lr}[br]1: 0\le x \le 2\pi \\[br]0 : otherwise[br][br] \end{array}[br][br] \right.[br]



Relative extrema include absolute extrema: i not really sure what you mean since obviously they do.

Maybe you are confused: neither relative nor absolute extrema mean the (first) derivative is 0. The derivative is only 0 for a stationary point which may or may not be one of the functions extrema (could be an inflection). A relative extrema is just the greatest/lowest value the function takes on a particular interval. Now if one choose the interval with the absolute extrema then that extrema are the relative extrema on that interval as well as the absolute extreme of the whole function.

Hope this clears things up :smile:


Thanks!!!!
I'm not sure about the 1st question because http://tutorial.math.lamar.edu/Classes/CalcI/MinMaxValues.aspx says that "in order for a point to be a relative extrema we must be able to look at function values on both sides of to see if it really is a maximum or minimum at that point. This means that relative extrema do not occur at the end points of a domain. They can only occur interior to the domain." I agree with this. Given an interval, we just look at the values within that interval... We ignore what happens outside that. So I thought end points can never be relative extrema. Now I'm really confused!!! Your 2nd example seems right...
Reply 14
Original post by startanewww
Thanks!!!!
I'm not sure about the 1st question because http://tutorial.math.lamar.edu/Classes/CalcI/MinMaxValues.aspx says that "in order for a point to be a relative extrema we must be able to look at function values on both sides of to see if it really is a maximum or minimum at that point. This means that relative extrema do not occur at the end points of a domain. They can only occur interior to the domain." I agree with this. Given an interval, we just look at the values within that interval... We ignore what happens outside that. So I thought end points can never be relative extrema. Now I'm really confused!!! Your 2nd example seems right...


Well it depends what you mean by a "relative extremum" (N.B. extrema is the plural!).

If your "world" is restricted to the interval itself, then an extremum occuring at one of the endpoints can only be an extremum relative to what's going on inside the interval!

For a function defined everywhere then you should be able to convince yourself that being an extremum in a limited subset of the domain doesn't make it a global extremum.

I'm not actually sure whether your book is using a non-standard language or you're interpreting what is says differently from other sources. Tbh I think you may be over-thinking this problem - you can actually work out for yourself what "local" and "global" extrema mean (these are the terms I'm more familiar with) without depending on a book :smile:

Quick Reply

Latest