# Calculating extrema of a given function on a geometrical region

I've never used Mathematica before. Now I have to figure out, for one of my classes, how to find the max and min of the function $f(x,y)=x^3+2\ xy$ over the triangular region of the plane with vertices $(-4,-1)$ and $(0,3)$ and $(4,-1)$.

Any ideas on how to do this?

• Have you tried anything on your own? Do you know how to express your function in Mathematica syntax? In any case, functions of interest to you will be e.g. Minimize and Maximize: they take variable ranges expressed as geometrical regions; and Triangle to express your region using its vertices. – MarcoB Jun 14 '16 at 18:47
• Thanks for your help. I was bale to do this using Maximize[x^3+2 x y,{x,y}[Element]Triangle[{{-4,-1},{0,3},{4,-1}}]] – Allen Rox Jun 14 '16 at 19:39
• Excellent! I'm glad you got it working. If you'd like, you can post your solution as a self-answer for future reference: those are encouraged on StackExchange. – MarcoB Jun 14 '16 at 19:54

Maximize[x^3 + 2 x y, {x, y} ∈ Triangle[{{-4, -1}, {0, 3}, {4, -1}}]]