Find the min and max value from absolute function?

AI Thread Summary
The discussion focuses on finding the minimum and maximum values of the function f(x) = |x - 1| + |x^2 - 2x| within the interval [0, 2]. Participants debate the correct method for differentiation, noting that the derivative of an absolute function is not simply the absolute value of its components. They emphasize the importance of considering the function's behavior across different intervals and the potential for extreme points where the derivative is undefined. Ultimately, the minimum value is determined to be 1, and the maximum is 5/4, with suggestions to graph the function for better visualization. The conversation highlights that calculus is not strictly necessary to solve the problem, as graphical analysis can also yield the correct results.
Helly123
Messages
581
Reaction score
20

Homework Statement


16_Mat_A_1.4.png


Homework Equations


f ' (x) = 0 -> to find extreme point

The Attempt at a Solution


can I differentiate the function directly?
f ' (x) = |1| + | 2x - 2|
0 = 2x - 1
x = 1/2
and x from domain = { 0, 2 }

the range we get :
f(0) = 1
f(2) = 1
f(1/2) = 1/2 + 3/4 = 5/4

min = 1
max = 5/4
 
Physics news on Phys.org
Helly123 said:

Homework Statement


16_mat_a_1-4-png.png


Homework Equations


f ' (x) = 0 -> to find extreme point

The Attempt at a Solution


can I differentiate the function directly?
f ' (x) = |1| + | 2x - 2|
That is not the correct derivative.

It may be helpful to graph each of the following:
## y=\left \vert x-1 \right \vert ##
## y=\left \vert x^2-2x \right \vert ##​

Furthermore:
There are more conditions for which you may have a minimum or maximum. What are the more general conditions?
 
  • Like
Likes Helly123
The answers are right, but the method is not. If f = |x-1|, f' is not |1|, as you can see by drawing the curve.
Let's simplify by noting that in the range 0-2, x2-2x is always negative, so |x2-2x| is 2x-x2
For |x-1|, consider the ranges 0-1 and 1-2 separately. (x=1/2 is not the only maximum.)
 
  • Like
Likes Helly123
Helly123 said:

Homework Statement


View attachment 206526

Homework Equations


f ' (x) = 0 -> to find extreme point

The Attempt at a Solution


can I differentiate the function directly?
f ' (x) = |1| + | 2x - 2|
0 = 2x - 1
x = 1/2
and x from domain = { 0, 2 }

the range we get :
f(0) = 1
f(2) = 1
f(1/2) = 1/2 + 3/4 = 5/4

min = 1
max = 5/4
Turn it into a composite function of three elementary functions, then do the derivative trick.
 
##f(x) = | x-1 | + | x^2 -2x | ##
f(x) = |x-1 |> 0
x > 1
For domain 0,2
Means for 0<= x < 1
x-1 negative
| x-1| = - (x-1) = 1-x

For 1<= x < = 2
x-1 positive

## f(x) = | x^2 - 2x |##
##f(x) = x^2 - 2x > 0 ##
x > 2

Means for domain {0,2}
0<= x <= 2
##f(x) = x^2 - 2x negative ##
##f(x) = | x^2 - 2x | = -(x^2 -2x) = 2x - x^2 ##

For
0<= x < 1
## F(x) = 1-x + 2x - x^2 ##
Extreme point = -b/2a = 1/2, x = 1/2
For 1<= x <= 2
## F(x) = x - 1 + 2x - x^2 ##
Extreme point = -b/2a = 3/2, x = 3/2

Check for x = 0, x = 2, x = 1/2 , x = 3/2
F(0) = 1
F(1/2) = 3/2 - 1/4 = 5/4
F(2) = 1
F(3/2) = 1/2 + 3 - 9/4 = 2/4 + 12/4 - 9/4 = 5/4

Max = 5/4
Min = 1
 
There may also be a min/max where the derivative is undefined.
 
Last edited:
  • Like
Likes Helly123
SammyS said:
There may also be a min/max where the derivative is undefined.
what exactly is that?
 
Helly123 said:
what exactly is that?
In your Opening Post, you stated:
Helly123 said:

Homework Equations


f ' (x) = 0 -> to find extreme point
It's also true that you may find an extreme point where the derivative, f ' (x), is undefined.
 
SammyS said:
There may also be a min/max where the derivative is undefined.

Helly123 said:
what exactly is that?
For example, g(x) = |x|.
g'(x) > 0 if x > 0, and g'(x) < 0 if x < 0.
This function has a minimum even though there is no point at which its derivative is zero.
 
  • Like
Likes SammyS and Helly123
  • #10
How to find max and min without differentiation ?
 
  • #11
Buffu said:
Turn it into a composite function of three elementary functions, then do the derivative trick.
What do you meant "3" elementary functions? Aren't there only 2 ?
 
  • #12
mjc123 said:
The answers are right, but the method is not. If f = |x-1|, f' is not |1|, as you can see by drawing the curve.
Let's simplify by noting that in the range 0-2, x2-2x is always negative, so |x2-2x| is 2x-x2
For |x-1|, consider the ranges 0-1 and 1-2 separately. (x=1/2 is not the only maximum.)
To get rid of the absolute , we must add min if the function negative, and must add + if the function positive?
 
  • #13
Helly123 said:

Homework Statement


View attachment 206526

Homework Equations


f ' (x) = 0 -> to find extreme point

No: banish forever from your mind the requirement that ##f'(x) = 0## for a max or a min on a finite interval ##[a,b]##, as it is just not true. The correct statement is that "If differentiable ##f(\cdot)## has a maximum or a minimum at an interior point ##a < x < b## then ##f'(x) = 0##." The derivative may not be zero at an end-point max or min. For example, the function ##f(x) = x## on the interval ##[0,1]## has minimum at ##x = 0## and a maximum at ##x = 1##, but the derivative does not vanish at either of those two points (or, for that matter, at any point ##x##).
 
  • Like
Likes Helly123
  • #14
Helly123 said:
What do you meant "3" elementary functions? Aren't there only 2 ?

Why do you think there are only two ?
 
  • #15
Buffu said:
Why do you think there are only two ?
Only |x -1| and |x^2 -2x| ?
 
  • #16
Buffu said:
Turn it into a composite function of three elementary functions, then do the derivative trick.
It's not obvious to me that f(x) = |x| + |x2 - 2x| can be viewed as the composition of three elementary functions. I think I get what you're hinting at, but a better word choice would be sum, rather than composition, which implies function composition.

In any case, this thread is posted in the Precalc section and the OP later asks how to answer the question without using derivatives. It's not clear what techniques should be used, though, as the OP started off by talking about derivatives.

@Helly123, this problem does not require the use of calculus. Sketch the graph of y = |x - 1|+ |x2 - 2x|. This graph will have two formulas on the interval [0, 2]. It's possible to find the max. and min. values for each of these forumulas without the use of calculus.
 
  • #17
Helly123 said:
Only |x -1| and |x^2 -2x| ?

Consider your function between ##(-\infty, 0], (0, 1], (1,2]## and ##(2, \infty)##.
 
  • #18
Buffu said:
Consider your function between ##(-\infty, 0], (0, 1], (1,2]## and ##(2, \infty)##.
The question specified the domain ##[0,2]##.
 
Back
Top