Find minimum value of f(x) in terms of variable a

In summary, for the function ##f(x)=x^2+|x-a|+1##, the minimum value is ##\frac{3}{4}-a## when ##a < -\frac{1}{2}##, ##a^2+1## when ##-\frac{1}{2} \leq a \leq \frac{1}{2}##, and ##\frac{3}{4}+a## when ##a > \frac{1}{2}##. If there is no local minimum in the domain, the minimal value is on the boundary at ##x=a## and is equal to ##a^2+1##.
  • #1
songoku
2,294
325
Homework Statement
For ##f(x)=x^2+|x-a|+1, x ~\text{and} ~a \in \mathbb{R} ##, find minimum value of ##f(x)## in terms of ##a##
Relevant Equations
Modulus Function
(1) For ##x>a##
##f(x)=x^2+x-a+1 \rightarrow## minimum value obtained when ##x=-\frac{1}{2}##

Minimum value of ##f(x)=\frac{3}{4} -a##

(2) For ##x<a##
##f(x)=x^2-x+a+1 \rightarrow## minimum value obtained when ##x=\frac{1}{2}##

Minimum value of ##f(x)=\frac{3}{4}+a##

But the teacher said there is missing solution (my final answer is not complete yet). I don't understand which one it is

Thanks
 
Physics news on Phys.org
  • #2
x = a, perhaps?
 
  • Like
Likes ehild
  • #3
what happens in case 1) if ##a>-\frac{1}{2}## ? Remember that you found the minimum at ##x=-\frac{1}{2}## but you also impose the condition ##x>a##.
What happens in case 2) if ##a<\frac{1}{2}##?
 
Last edited:
  • Like
Likes ehild
  • #4
songoku said:
Homework Statement:: For ##f(x)=x^2+|x-a|+1, x ~\text{and} ~a \in \mathbb{R} ##, find minimum value of ##f(x)## in terms of ##a##
Relevant Equations:: Modulus Function

But the teacher said there is missing solution
More to the point, you have not answered the question. The form of the answer should be "when a is range ... the min is at x= ...; when a is in range... " etc.
Starting the answer with "for x<a ..." doesn't work because the reader can't yet know if that is true.
 
  • #5
DaveE said:
x = a, perhaps?
At ##x=a##, the value of ##|x-a|=0## so ##f(x)=a^2+1## . Is this what you mean?

Delta2 said:
what happens in case 1) if ##a>-\frac{1}{2}## ? Remember that you found the minimum at ##x=-\frac{1}{2}## but you also impose the condition ##x>a##.
What happens in case 2) if ##a<\frac{1}{2}##?

haruspex said:
More to the point, you have not answered the question. The form of the answer should be "when a is range ... the min is at x= ...; when a is in range... " etc.
Starting the answer with "for x<a ..." doesn't work because the reader can't yet know if that is true.

I am not sure how to proceed.

(1) For ##x>a \rightarrow## the minimum will occur at ##x=-\frac{1}{2}##

This means that for ##a<-\frac{1}{2}##, the minimum value will be ##f(x)=\frac{3}{4} -a##

If ##a>-\frac{1}{2}##, there will be no solution because it contradicts with ##x>a## ?

(2) So for ##a>\frac{1}{2}## , the minimum value will be ##f(x)=\frac{3}{4}+a##

What I am missing is solution for ##-\frac{1}{2} \leq a \leq \frac{1}{2}## ? If yes, how to find this? How to simplify ##|x-a|## besides separating it to ##x>a## and ##x<a##?

Thanks
 
  • #6
songoku said:
If a>−12, there will be no solution because it contradicts with x>a ?
I think that statement is wrong, i think there will still be solution when ##x>a## and ##a>-\frac{1}{2}##, think about it. Study the monotonicity of the function in the intervals ##[-\frac{1}{2},a], [a,+\infty)## and always consider that we have ##x>a##.
Similarly for 2nd case of ##x<a## study the monotonicity in the proper intervals.
 
  • #7
songoku said:
At ##x=a##, the value of ##|x-a|=0## so ##f(x)=a^2+1## . Is this what you mean?I am not sure how to proceed.

(1) For ##x>a \rightarrow## the minimum will occur at ##x=-\frac{1}{2}##

This means that for ##a<-\frac{1}{2}##, the minimum value will be ##f(x)=\frac{3}{4} -a##

If ##a>-\frac{1}{2}##, there will be no solution because it contradicts with ##x>a## ?

(2) So for ##a>\frac{1}{2}## , the minimum value will be ##f(x)=\frac{3}{4}+a##

What I am missing is solution for ##-\frac{1}{2} \leq a \leq \frac{1}{2}## ? If yes, how to find this? How to simplify ##|x-a|## besides separating it to ##x>a## and ##x<a##?

Thanks
Remember that differentiation finds local minima of differentiable functions. E.g. it won't find the minimum of |x|. Try sketching f for a=1/4.
 
Last edited:
  • #8
Delta2 said:
I think that statement is wrong, i think there will still be solution when ##x>a## and ##a>-\frac{1}{2}##, think about it. Study the monotonicity of the function in the intervals ##[-\frac{1}{2},a], [a,+\infty)## and always consider that we have ##x>a##.
Similarly for 2nd case of ##x<a## study the monotonicity in the proper intervals.
haruspex said:
Remember that differentiation finds local minima of differentiable functions. E.g. it won't find the minimum of |x|. Try sketching f for a=1/4.

I think I understand.

(1) For ##x>a \rightarrow f(x)=x^2+x-a+1## and the vertex will be at ##x=-\frac{1}{2}##
(i) If ##a \geq -\frac{1}{2}## , the minimum value will be at ##x=a## so minimum value is ##f(x)=a^2 + 1##
(ii) If ##a<-\frac{1}{2}##, the minimum value will be at ##x=-\frac{1}{2}## so minimum value is ##f(x)=\frac{3}{4}-a##

(2) For ##x<a \rightarrow f(x)=x^2-x+a+1## and the vertex will be at ##x=\frac{1}{2}##
(i) If ##a>\frac{1}{2}##, the minimum value will be at ##x=\frac{1}{2}## so the minimum value is ##f(x)=\frac{3}{4}+a##
(ii) If ##a\leq \frac{1}{2}##, the minimum value will be at ##x=a## so the minimum value is ##f(x)=a^2+1##

Intersecting (1) and (2), I get:

For ##a < -\frac{1}{2} \rightarrow##, the minimum value is ##\frac{3}{4}-a##
For ##-\frac{1}{2} \leq a \leq \frac{1}{2}##, the minimum value is ##a^2+1##
For ##a > \frac{1}{2}##, the minimum value is ##\frac{3}{4}+a##

Am I correct? Thanks
 
Last edited:
  • #9
I think you are right for (1) and (2) but i am not sure in the recombination (intersection of (1) and (2) as you say).
 
  • #10
songoku said:
I think I understand.

(1) For ##x>a \rightarrow f(x)=x^2+x-a+1## and the vertex will be at ##x=-\frac{1}{2}##
(i) If ##a \geq -\frac{1}{2}## , the minimum value will be at ##x=a## so minimum value is ##f(x)=a^2 + 1##
(ii) If ##a<-\frac{1}{2}##, the minimum value will be at ##x=-\frac{1}{2}## so minimum value is ##f(x)=\frac{3}{4}-a##

(2) For ##x<a \rightarrow f(x)=x^2-x+a+1## and the vertex will be at ##x=\frac{1}{2}##
(i) If ##a>\frac{1}{2}##, the minimum value will be at ##x=\frac{1}{2}## so the minimum value is ##f(x)=\frac{3}{4}+a##
(ii) If ##a\leq \frac{1}{2}##, the minimum value will be at ##x=a## so the minimum value is ##f(x)=a^2+1##

Intersecting (1) and (2), I get:

For ##a < -\frac{1}{2} \rightarrow##, the minimum value is ##\frac{3}{4}-a##
For ##-\frac{1}{2} \leq a \leq \frac{1}{2}##, the minimum value is ##a^2+1##
For ##a > \frac{1}{2}##, the minimum value is ##\frac{3}{4}+a##

Am I correct? Thanks
If local extremum does not exixst inside the domain of the function, you find the absolute extremum on the boubdary. Now you have two separate functions, with domains x<a and x>a) x≤a and x≥a . There are local minima when a<-1/2 and a>1/2. In case -1/2<a<1/2 there is no local minimum in the domain, and the minimal value is on the boundary, x=a, and it is ##a^2+1##, as you stated.
 
Last edited:
  • #11
songoku said:
At x=a, the value of |x−a|=0 so f(x)=a2+1 . Is this what you mean?
I just meant that x=a wasn't included in your domain, that is all. You said x<a & x>a...
 
  • #12
DaveE said:
I just meant that x=a wasn't included in your domain, that is all. You said x<a & x>a...
Yes, thank you, I should have written x≤a and x≥a.
 
  • #13
To get an intuitive grasp of the problem, note that the graph of |x-a| is a V shape with a 45 degree slope each side. So where the magnitude of the slope of x2 is less than 45 degrees, that V still leads to a local minimum of f at x=a. Where the quadratic term's slope is greater, one side of the V will 'yield', removing that local minimum.
 
Last edited:
  • #14
Delta2 said:
I think you are right for (1) and (2) but i am not sure in the recombination (intersection of (1) and (2) as you say).
I am not sure what my mistake is. Can you tell me which part of the recombination is wrong? Or maybe all are wrong?

ehild said:
If local extremum does not exixst inside the domain of the function, you find the absolute extremum on the boubdary. Now you have two separate functions, with domains x<a and x>a) x≤a and x≥a . There are local minima when a<-1/2 and a>1/2. In case -1/2<a<1/2 there is no local minimum in the domain, and the minimal value is on the boundary, x=a, and it is ##a^2+1##, as you stated.
So is my answer correct? Or I am missing something?

haruspex said:
To get an intuitive grasp of the problem, note that the graph of |x-a| is a V shape with a 45 degree slope each side. So where the magnitude of the slope of x2 is less than 45 degrees, that V still leads to a local minimum of f at x=a. Where the quadratic term's slope is greater, one side of the V will 'yield', removing that local minimum.
I can still follow until "the graph of |x-a| is a V shape with a 45 degree slope each side". but I don't understand the rest. Why when the magnitude of the slope of x2 is less than 45 degrees V still leads to a local minimum of f at x=a?

Thanks
 
  • #15
songoku said:
Why when the magnitude of the slope of x2 is less than 45 degrees V still leads to a local minimum of f at x=a?
The gradient of the sum of two functions, (f+g)', is the sum of the gradients, f'+g'.
Where the slope of x2 is less than 45 degrees, its gradient has magnitude less than 1. The V formed by |x-a| has gradient -1 on the left and gradient +1 on the right. Adding the two leaves both sides of the V still pointing upwards away from x=a, though one side may be steeper now and the other side correspondingly less so.
Where the gradient of x2 has magnitude greater than 1, adding it to |x-a|will push one side of the V down so far that the sign of the gradient is the same both sides of x=a.
 
  • #16
@songoku ,
What method are you using to find the minimum? Are you differentiating, or are you using the location of the vertex of a parabola? ... or using some other method?
 
  • #17
haruspex said:
The gradient of the sum of two functions, (f+g)', is the sum of the gradients, f'+g'.
Where the slope of x2 is less than 45 degrees, its gradient has magnitude less than 1. The V formed by |x-a| has gradient -1 on the left and gradient +1 on the right. Adding the two leaves both sides of the V still pointing upwards away from x=a, though one side may be steeper now and the other side correspondingly less so.
Where the gradient of x2 has magnitude greater than 1, adding it to |x-a|will push one side of the V down so far that the sign of the gradient is the same both sides of x=a.
I will read it repeatedly to understand this

SammyS said:
@songoku ,
What method are you using to find the minimum? Are you differentiating, or are you using the location of the vertex of a parabola? ... or using some other method?
I am using the location of vertex of a parabola by using formula ##x=-\frac{b}{2a}##

So I think my answer is still wrong?

Thanks
 
  • #18
songoku said:
So I think my answer is still wrong?
Your answer in post #8 is correct.
 
  • #19
songoku said:
So is my answer correct? Or I am missing something?I can still follow until "the graph of |x-a| is a V shape with a 45 degree slope each side". but I don't understand the rest. Why when the magnitude of the slope of x2 is less than 45 degrees V still leads to a local minimum of f at x=a?

Thanks
You gave the minimum value of the function correctly, but you can not get x=a for the position of minimum by differentiazing the function : it is not differentiable at x=a.
"The absolute value function is continuous, but fails to be differentiable at x = 0 since the tangent slopes do not approach the same value from the left as they do from the right. Wikipedia"
I do not follow what you mean on "intersecting" the results for x<a abd x>a.
 
  • Like
Likes Delta2
  • #20
ehild said:
You gave the minimum value of the function correctly, but you can not get x=a for the position of minimum by differentiazing the function : it is not differentiable at x=a.
"The absolute value function is continuous, but fails to be differentiable at x = 0 since the tangent slopes do not approach the same value from the left as they do from the right. Wikipedia"

I understand. For minimum at ##x=a##, I just use substitution, putting ##x=a## to ##f(x)##

I do not follow what you mean on "intersecting" the results for x<a abd x>a.

I am not sure how to say it, maybe I should say that I use union rather intersection. I tried to find overlapping region that has minimum value of ##a^2+1## and I get interval ##-\frac{1}{2} \leq a \leq \frac{1}{2}##
 
Last edited:
  • #21
songoku said:
I am not sure how to say it, maybe I should say that I use union rather intersection. I tried to find overlapping region that has minimum value of ##a^2+1## and I get interval ##-\frac{1}{2} \leq a \leq \frac{1}{2}##
Very intuitive! So you did not differentiated ar all, and you guessed that the function has minimum where |x-a| does, that is at x=a for some a values. and found that intervall of a where that happens.
 
  • #22
ehild said:
Very intuitive! So you did not differentiated ar all, and you guessed that the function has minimum where |x-a| does, that is at x=a for some a values. and found that intervall of a where that happens.
Yes, I do not use differentiation at all, just trying to understand and follow all the hints given here.

Thank very much for all the help and explanation DaveE, Delta2, haruspex, ehild, SammyS
 
  • Like
Likes Delta2

1. What does it mean to find the minimum value of f(x) in terms of variable a?

When we say "find the minimum value of f(x) in terms of variable a," we are looking for the smallest possible value that the function f(x) can take on, where the variable a is the only factor that can change the value of the function. In other words, we are trying to find the lowest point on the graph of the function f(x) where the value of a is the independent variable.

2. How do you find the minimum value of f(x) in terms of variable a?

To find the minimum value of f(x) in terms of variable a, we can use a technique called differentiation. This involves taking the derivative of the function f(x) with respect to the variable a, setting it equal to 0, and solving for the value of a that makes the derivative equal to 0. This value of a will correspond to the minimum value of f(x).

3. Why is it important to find the minimum value of f(x) in terms of variable a?

Finding the minimum value of f(x) in terms of variable a is important because it allows us to optimize the function and find the best possible value of a that will give us the smallest value of f(x). This is useful in many applications, such as finding the minimum cost or maximum profit in a business setting.

4. Are there any limitations to finding the minimum value of f(x) in terms of variable a?

Yes, there are some limitations to finding the minimum value of f(x) in terms of variable a. One limitation is that the function f(x) must be continuous and differentiable, meaning that it must have a well-defined value at every point and its derivative must exist. Additionally, the minimum value may not always be unique, meaning that there may be multiple values of a that give the same minimum value of f(x).

5. Can the minimum value of f(x) in terms of variable a be negative?

Yes, the minimum value of f(x) in terms of variable a can be negative. This will depend on the function f(x) itself and the range of values that the variable a can take on. In some cases, the minimum value may be negative, while in others it may be positive or even 0.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
13
Views
306
  • Precalculus Mathematics Homework Help
Replies
6
Views
540
  • Precalculus Mathematics Homework Help
Replies
15
Views
643
  • Precalculus Mathematics Homework Help
Replies
3
Views
615
  • Precalculus Mathematics Homework Help
Replies
12
Views
653
  • Precalculus Mathematics Homework Help
Replies
6
Views
703
  • Precalculus Mathematics Homework Help
Replies
12
Views
1K
  • Precalculus Mathematics Homework Help
Replies
6
Views
572
  • Precalculus Mathematics Homework Help
Replies
11
Views
3K
  • Precalculus Mathematics Homework Help
Replies
3
Views
781
Back
Top