<p>Your question is really broad and really hard to answer because nonconvex optimization is rather complicated so is any iterative algorithm that solves such problems. As a quick hint, you can use the Mexican Hat function (or a simple polynomial that gives you what you want) for your test case. Also these papers can give you come context : <a href="https://arxiv.org/pdf/1602.04915.pdf" rel="nofollow noreferrer">Paper1</a> <a href="https://arxiv.org/pdf/1309.5549.pdf" rel="nofollow noreferrer">Paper2</a></p>

<p>Good luck. </p>
Non Convex Optimizations
<p>I have a gd algorithm and I am trying to come up with a non-convex univariate optimization problem. I want to plot the function python and then show two runs of gd, one where it gets caught in a local minimum and one where it manages to make it to a global minimum. I am thinking of using different starting points to accomplish this.</p>

<p>That being said I am somewhat clueless about coming up with such a function or trying two different points, any help is appreciated.</p>