Suppose I have a function $f(x,y)$ of two variables $x$ and $y$. Suppose that: for each fixed $y$, the function $f(x,y)$ is non-zero, odd and periodic in $x$, with one maximum and one minimum in the period $x \in [0, h(y)]$. So here the period $h(y)$ depends on $y$.

Now I define the function $g(y) = \min_{x} f(x,y)$ , i.e. $g$ is defined as the minimum of $f(x,y)$ in $x$ for each $y$.

How can I plot $g(y)$?

  • 5
    $\begingroup$ A concrete example of f[x,y] would be helpful. $\endgroup$ – Chris K Nov 1 '17 at 18:21
  • $\begingroup$ is this the problem you're facing Plot[g[y],{y,0,h[y]}] namely the h[y] in the range for y? $\endgroup$ – user42582 Nov 1 '17 at 18:53
  • $\begingroup$ My function is complicated (it involves elliptic functions depending on $x$ and $y$ in a nontrivial way) so perhaps better to avoid it as an example here @ChrisK $\endgroup$ – Alex Nov 1 '17 at 20:51
  • 2
    $\begingroup$ You are much more likely to get help if you provide an example. $\endgroup$ – Carl Woll Nov 2 '17 at 5:15
  • 2
    $\begingroup$ @Alex correct me if I'm wrong but your problem, then, is not with Plot but with NMinValue possibly; also, it would be a good idea-like others have suggested already-if you could provide a minimally functional instance of your problem in order for more knowledgeable users to provide concrete guidance; this is too hand-wavy, if I may say so $\endgroup$ – user42582 Nov 2 '17 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.