Find the Lipschitz constant with respect to $y$ of the function $$ f : [0,3] \times [0,5] \to [-1,1], \qquad (x,y) \mapsto \sin(xy) $$

My solution:

$$ \begin{aligned} |f(x,y_1) - f(x,y_2)| &= | \sin(x y_1) -\sin(x y_2)| \\ &= \left| 2 \cos \left(\frac{x y_1 + x y_2}{2} \right) \sin\left(\frac{xy_1 - xy_2}{2}\right) \right| \\ &\leq \left| 2 \cdot 1\cdot \frac{xy_1-xy_2}{2} \right| \\ &\leq 2|x||y_1-y_2| \end{aligned} $$

Here I got stuck. I would be grateful for your help!


1 Answer 1


Your method works, because $|x| \leq 3$ on this domain, so making that replacement gives a Lipschitz constant. However you actually discarded the division by 2 for no real reason so you ended up with a suboptimal constant.

A faster way to do it is to use a bound on the partial derivative:

$$\left | \frac{\partial f}{\partial y} \right | =\left | x\cos(xy) \right | \leq |x| \leq 3.$$

The fact that this is sufficient is a consequence of the mean value theorem.

Note that my result is the same as what you would get from your method if you didn't discard the division by 2.

  • $\begingroup$ Thank you ! So I supposed to do $2|x||\frac{y_1-y_2}{2}|\leq |x||y_1-y_2|$ and since the biggest value of x is 3 the Lipshic constant is 3 and exists $ |x||y_1-y_2| \leq 3|y_1-y_2|$? $\endgroup$
    – Algo
    Nov 24, 2021 at 20:53
  • $\begingroup$ @erez Right. ${}{}$ $\endgroup$
    – Ian
    Nov 24, 2021 at 20:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .