## kirbykirby 2 years ago Is there a way to optimize (find global max and min) a function given a boundary (such as by a triangle x=0, y=0, y=-x+3) on Wolfram Alpha?

1. kirbykirby

I just need a way to verify if my answer is correct... They have a way to determine it if the boundary is just one "function" (equation), like a circle. But I don't know how to define it if I have some triangle defined by 3 separate functions.

2. seitys

Check where the first derivative is 0 or undefined to find the critical points and plug those and the end points into the function to find the max.

3. seitys

and min

4. Jusaquikie
5. kirbykirby

^ Do you know how to combine that with asking Wolfram to optimize a function given that boundary?

6. kirbykirby

For example, Wolfram provides this example: http://www.wolframalpha.com/input/?i=maximize+e%5Ex+sin+y+on+x%5E2%2By%5E2%3D1&lk=3

7. kirbykirby

I tried putting "on x=0,y=0,y=-x+3" but it doesn't give a max or min... which seems fishy

8. Jusaquikie

the ones i tried don't look right either, sorry.

9. Jusaquikie

the ones i tried don't look right either, sorry.

10. Jusaquikie
11. kirbykirby

Ohh wait I figured it out :) I had to say "on x>=0,y>=0,y<=-x+3"

12. kirbykirby

which makes sense loll. thanks for everyone's help though