# Continuous Optimization, is this convex?

• ver_mathstats
The function is not convex, but if you add it to stuff that is convex enough, you canstill end up with something convex overall. E.g. ##1000000x^2+\sin(x)## has second derivative ##2000000-\sin(x)## which gives a convex function.

#### ver_mathstats

Homework Statement
Determine if f(x) is convex or not.
Relevant Equations
-
f(x)=ln(|x1|+1)+(-2x1 2 +3x2 2 + 2x3 3) + sin(x1 + x2 + x3), for this problem in particular would be it be sufficient to find the Hessian and to see if that matrix is semi positive definite to determine if it convex?

Where a Hessian exists then that it is positive semi-definite is a necessary and sufficient condition for convexity, why do you ask about this function in particular?

Note to mentors: probably better in calculus and beyond.

• ver_mathstats
I think computing the hessian and checking it is good practice, so try it if you've never done it.

Often though you can do something quicker by inspection. Is there any single variable that stands out as looking particularly non convex here?

• pbuk
pbuk said:
Where a Hessian exists then that it is positive semi-definite is a necessary and sufficient condition for convexity, why do you ask about this function in particular?

Note to mentors: probably better in calculus and beyond.
Only because the practice question is this function in particular, but thank you, and yes my apologies it is for a computer science class so I placed it here but note taken for next time.

Office_Shredder said:
I think computing the hessian and checking it is good practice, so try it if you've never done it.

Often though you can do something quicker by inspection. Is there any single variable that stands out as looking particularly non convex here?
sin is not convex, but I have to include a proof so I chose to do it by doing the hessian.

ver_mathstats said:
sin is not convex, but I have to include a proof so I chose to do it by doing the hessian.
I was actually thinking ##x_3^3## which has a huge section where it is very much not convex. Restricting to ##x_1=_2=0## you get a function in ##x_3## which is not convex (can prove by taking the second derivative easily enough) and hence the whole thing is not convex.

##sin## is not convex, but if you add it to stuff that is convex enough, you canstill end up with something convex overall. E.g. ##1000000x^2+\sin(x)## has second derivative ##2000000-\sin(x)## which gives a convex function. You really want to keep your eye out for stuff which is like, unboundedly not convex.

pbuk said:
Where a Hessian exists then that it is positive semi-definite is a necessary and sufficient condition for convexity, why do you ask about this function in particular?

Note to mentors: probably better in calculus and beyond.
You can use the ' Report' button on the lower left to contact the mentors.

WWGD said:
You can use the ' Report' button on the lower left to contact the mentors.
I did, that's how it got moved here.

• WWGD