# Thread: help in Integral Maximization

1. And this shape isn't any of those. Take a look here and see if any of those shapes match what you have.

2. Originally Posted by Ackbeet
And this shape isn't any of those. Take a look here and see if any of those shapes match what you have.
trapezium

3. Close, but I think you know even more than that. Remember that two sides of this thing are vertical. What does that tell you?

4. Originally Posted by Ackbeet
Close, but I think you know even more than that. Remember that two sides of this thing are vertical. What does that tell you?
right angled trapezium

5. Don't get discouraged! You're making great progress.

Here in America, we call that a trapezoid. I see that the Brits call it what you called it. That's fine. What is the area of a trapezoid?

6. Originally Posted by Ackbeet
Don't get discouraged! You're making great progress.

Here in America, we call that a trapezoid. I see that the Brits call it what you called it. That's fine. What is the area of a trapezoid?
area = 0.5*h* (s1+s2)

7. but i want to know should i check each value from x with each value with y

8. Correct area calculation. I would now employ the trapezoidal rule to formulate the (exact) area under a sequence of joined piecewise linear segments. Question: are the x-coordinates evenly spaced? If so, you can use the usual composite trapezoidal rule. If not, you have to use the formula for non-uniform intervals, as also provided in the link.

In answer to your Post # 22, I would say yes: you must check every permutation, essentially. There might be a way to short-cut this, if you can see some theorem or other that you can prove. For example: take a close look at the formula for uniform intervals. Do you notice anything about it?

9. Originally Posted by Ackbeet
Correct area calculation. I would now employ the trapezoidal rule to formulate the (exact) area under a sequence of joined piecewise linear segments. Question: are the x-coordinates evenly spaced? If so, you can use the usual composite trapezoidal rule. If not, you have to use the formula for non-uniform intervals, as also provided in the link.

In answer to your Post # 22, I would say yes: you must check every permutation, essentially. There might be a way to short-cut this, if you can see some theorem or other that you can prove. For example: take a close look at the formula for uniform intervals. Do you notice anything about it?
i think there is something better
h= each(x2-x1)
and i must sort the y values and sort the height values
then take smallest highet with smallest y1-y2 after sorting and son on ... what is your opinion

10. So, are the x-intervals uniform, then?

11. Originally Posted by Ackbeet
So, are the x-intervals uniform, then?
i will check my answer if it is accepted i will tell u if not i will tell u so

12. What do you mean, "accepted"?

13. Originally Posted by Ackbeet
What do you mean, "accepted"?
that my solution is right and all test cases on it will be right

14. Oh, ok.

I have my theory, finally. I haven't proved it yet, but I'm fairly sure it's correct.

15. Originally Posted by Ackbeet
Oh, ok.

I have my theory, finally. I haven't proved it yet, but I'm fairly sure it's correct.
ok tell me

Page 2 of 4 First 1234 Last