Is f(x,y) = (x^2) * exp(y) a convex or concave function?

In summary, the conversation discusses the convexity of the function f(x,y) = (x^2) * exp(y) and the value of its Hessian, which is -2 * x^2 * exp(2y). It is concluded that the function is concave, but when plotted using a 3D graph plotter, it appears to be convex. The difference between convex and concave functions is explained, with a reminder that some texts use the terms "concave upward" and "concave downward". The conversation also touches on the concept of a saddle point in multivariable functions.
  • #1
mohitp
2
0
Could anyone comment on the convexity of

f(x,y) = (x^2) * exp(y) ... i.e. x square into e to the power y.

I did try to find Hessian of the same and the value I get is :

Hessian(x,y) = -2 * x^2 * exp(2y)... which looks <= 0 for all x and y.

I assume this should imply f(x,y) is concave. However when I plot this function using a 3D graph plotter it seems convex .

try
hp://ww.livephysics.com/ptools/online-3d-function-grapher.php

for plotting function.

I am sure I am making a simple mistake or something.

Any help would be useful.
 
Physics news on Phys.org
  • #2
I don't know why you would say that, even a rough graph looks concave to me. Using the website you give (you are missing a few letters) it looks concave. Are you clear on the difference between "convex" and "concave"? If, for any two points on the graph, the line segment between this is above the graph, it is "concave". It the line segment between two points on the graph is below the graph, then it is "convex".

(Some texts say "concave upward" and "concave downward" rather than "concave" and "convex".)
 
  • #3
Hi,

Isn't f(x) convex if :

f( a*x1 + (1-a) * x2 ) <= a * f(x1) + (1-a) * f(x2)


this would imply graph must be below line connecting two points for function to be convex.
 
  • #4
Be careful about Hessian, that is a multivariable function ! and if you work it out that is exactly what it is called a saddle point.
 

1. What is a convex function?

A convex function is a mathematical function that satisfies the condition that a line segment connecting any two points on the graph of the function lies above or on the graph, meaning the function is never concave down.

2. How is a convex function different from a concave function?

A convex function is always increasing or flat, while a concave function is always decreasing or flat. In other words, a convex function is never concave down, while a concave function is never concave up.

3. What are some real-world applications of convex functions?

Convex functions have many applications in different fields such as economics, optimization, and machine learning. Some examples include cost functions in economics, utility functions in decision-making, and loss functions in machine learning algorithms.

4. How is the convexity of a function determined?

The convexity of a function can be determined by looking at its second derivative. If the second derivative is always positive, then the function is convex. If the second derivative is always negative, then the function is concave. If the second derivative changes sign, then the function is neither convex nor concave.

5. What are the properties of a convex function?

Some key properties of convex functions include: always having a global minimum, having no local maxima, being continuous, and being differentiable except at a finite number of points. In addition, the graph of a convex function is always above its tangent lines and the average value of the function is always less than or equal to its maximum value.

Similar threads

Replies
4
Views
1K
Replies
4
Views
1K
Replies
6
Views
1K
Replies
3
Views
1K
Replies
1
Views
910
Replies
32
Views
3K
Replies
36
Views
3K
Replies
5
Views
942
Back
Top