Create a periodic function with given minima

For a simulation, I need to create a function $r(\theta,\phi)$ that has minima at specific pairs of $(\theta,\phi)$, and that is periodic, i.e. $r(\theta,\phi) = r(\theta+2\pi,\phi)$ and $r(\theta,\phi) = r(\theta,\phi+2\pi)$ etc. At least the first and second derivatives of the function should be continuous.

How can I construct such a function? I imagine that when drawn as a surface, it will look a bit like a bowling ball, but without the sharp edges.

EDIT I can imagine several ways of creating a function with a single minimum at $(\theta_0,\phi_0)$, but I am stuck creating a function that has a second (or third) minumum at e.g. $(\theta_1,\phi_1)$, but not at $(\theta_0,\phi_1)$ or $(\theta_1,\phi_0)$

-

2 Answers

$$r(\theta,\phi) = (1-\cos(\theta-\theta_0))\cdot(1-\cos(\phi-\phi_0))$$

looks like a good candidate :)

-

Thank you for your suggestion! This is what I originally started with. How can I adapt it to multiple minima? – Jonas Oct 10 '12 at 18:09

The function $r(\theta,\phi)=\sin(\theta)+\cos(\phi)$ has the periodicity wanted, and is minimized at point $(\frac{3\pi}{2}+2k\pi,\pi+2k\pi), k\in \mathbb{Z}$.

-
I apologize for not being clear. I can manage single minima, but how would I do multiples? – Jonas Oct 10 '12 at 18:09
What do you mean multiples minima, this one as an infinity of them – Jean-Sébastien Oct 10 '12 at 18:10

1
I believe he would like to have a function that has a given number of minima in $(0, 2\pi)$ – peterm Oct 10 '12 at 18:15
@Jean-Sébastien: Yes, user44010 is correct. – Jonas Oct 10 '12 at 19:23
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 11, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9317044019699097, "perplexity_flag": "head"}