How to find the minimum value of a tricky function

gamaz321

New member
Joined
Jul 26, 2022
Messages
49
Given f(x) = |x| + |x + 1| + |x + 2| ... |X + 55|. What is the minimum value of f(x)? Here I have no clue where to begin. Any help to get started with the solution will be extremely helpful.
Best regards
 
Whats the minimum of [imath]|x| + |x+a|[/imath]? How about [imath]|x+a|+|x+b|[/imath] ?
 
Thanks! The minimum for |x| = -x and the minimum of |x+a| will be -(x+a), right? For the second part of your clue the minimum will be -(x+a) -(x+b) = -(2x + a + b) Here is something I cannot figure out. How to get the minimum value of -(2x + a + b)?
 
Thanks! The minimum for |x| = -x and the minimum of |x+a| will be -(x+a), right?
The minimum of |x| is a number, not an expression; and it occurs at a specific value of x. It sounds like you have the wrong image of what is being asked.

If you graph y = |x|, you'll find that the lowest point on the graph is (0, 0), so the minimum value is y = 0, at x = 0.

What do you get if you graph y = |x| + |x+1|?
 
@Dr.Peterson Pursuing the above...

Minima.png

I would get that the minimum of \(\displaystyle f(x) = |x| + |x + 1| + |x + 2| ... |x + n| \text{ would be}\left\lceil \frac{1}{4}n^2+\frac{1}{2}n\right\rceil\)

Was that the intention?

(So, 784 in the OP's case?)
 
There's an easier way to approach it, without having to graph too many of these (by hand or by technology) -- though in fact I started out by doing part of what you did to visualize what's happening.

I said what I did just to get the OP back on track about the meaning of the problem. I think @blamocur's questions about pairs of absolute values are a really good start for someone who is not confused about the whole question.

My trick for getting a quick answer is not to start with |x| + |x+1|, but to break the sum up into |x| + |x+55|, |x+1| + |x+54|, and so on. This sort of symmetrical approach helps with a lot of problems.

To see the pattern more quickly, you can consider only odd final numbers, like 7 here:

1712354413617.png
I do get the same result, but in a simpler way. (It's just a perfect square.)

(But let's not give away quite so much to the OP, shall we?)
 
There's an easier way to approach it, without having to graph too many of these (by hand or by technology) -- though in fact I started out by doing part of what you did to visualize what's happening.
Thank you for your illuminating response (and for affirming that I was on the right track). 👍🙏
(But let's not give away quite so much to the OP, shall we?)
Yes, I was a bit concerned that I was doing a lot of the 'donkey work' for the OP but I was intrigued by the problem and, once I'd started pursuing your suggestion, I was keen to know that I was implementing it correctly and, having done all that graph work (and figured out a formula), it was too difficult to resist seeking confirmation that I'd got it right. 🤔😇😁

I did however leave it up to the OP to figure it out how to arrive at the formula
\(\displaystyle \left(\left\lceil \frac{1}{4}n^2+\frac{1}{2}n\right\rceil\right)\) by themself (presuming s/he would be required to produce such intermediate 'working' in any answer submitted) and the final 'answer' is, of course, simple arithmetic once that stage has been reached. 😉

My trick for getting a quick answer is not to start with |x| + |x+1|, but to break the sum up into |x| + |x+55|, |x+1| + |x+54|, and so on. This sort of symmetrical approach helps with a lot of problems.
Indeed, that's similar to how I would illustrate arriving at the formula for calculating the sum of the first n natural numbers (another potential hint for the OP 🙂).
To see the pattern more quickly, you can consider only odd final numbers...

I do get the same result, but in a simpler way. (It's just a perfect square.)
And that's perfectly true for "only odd final numbers" but not for even final numbers, of course, which is what does make the problem that little bit "tricky" and why I would expect the OP to have to show, algebraically, how a final formula can be arrived at given all the 'raw data' that has been provided. 🤷‍♂️ 😊
 
Last edited by a moderator:
The solution seems to be both conceptual and super challenging. I need to spend time to understand the solution and grasp the concept. Thank you.
 
The solution seems to be both conceptual and super challenging. I need to spend time to understand the solution and grasp the concept. Thank you.
It's definitely worth putting some thought into; as you can see, there are several ways to think about it, and each may teach you something a little different. The first thing is to develop a sense of what functions like this are: continuous piecewise linear functions. (I suppose that's the "conceptual" part!) Then once you've got a good idea of that, you have to think about how to handle a sum of terms that are too many to write down all of; this brings you into the area of sequences and series, and looking for patterns. (That would be the "challenging" part.) So you've described it well.

Feel free to show us any further ideas you have; there's definitely more to discuss when you're ready for it.
 
It's definitely worth putting some thought into; as you can see, there are several ways to think about it, and each may teach you something a little different. The first thing is to develop a sense of what functions like this are: continuous piecewise linear functions. (I suppose that's the "conceptual" part!) Then once you've got a good idea of that, you have to think about how to handle a sum of terms that are too many to write down all of; this brings you into the area of sequences and series, and looking for patterns. (That would be the "challenging" part.) So you've described it well.

Feel free to show us any further ideas you have; there's definitely more to discuss when you're ready for it.
Thanks, that makes sense!
 
f(x) = |x| + |x + 1| + |x + 2| ... |x + 55|
f(0) = 1+2+...+55
f(-55) = 55 + 54 +...+1 (same as above)
Letting x>0 will give a larger answer than above.
Now consider x values such that x<0. If you think about it, you'll realize that x>-55
Now go and get your hands dirty.
 
Top