Finding Lipschitz constant for function that is not differentiable everywhere

analysislipschitz-functionsnumerical methods

Suppose I have the function $f(x)=|sin(x)+cos(x)|$. I am looking to find the Lipschitz constant, i.e. smallest value $L$ satisfying $|f(x)-f(y)|\leq L|x-y|$, on the interval $[-2,2]$.

I know that if $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, then I have $L = sup_{x\in(a,b)}|f'(x)|$ which I can solve analytically or by computer.

But in this case, although $f$ is continuous on $[a,b]$, $f$ is not differentiable on $(a,b)$ since $f'(-\frac{\pi}{4})$ is not defined. So how can I then find the Lipschitz constant, given that $f$ is not differentiable on $(-2,2)$? Is there some way I can still use the equation $L = sup_{x\in(a,b)}|f'(x)|$? (Note I am not trying to do all of this analytically, but by computer).

Best Answer

You have $f(x)=|g(x)|$. Now by the triangle inequalities, $$ |f(x_1)-f(x_2)|=\Bigl||g(x_1)|-|g(x_2)|\Bigr|\le|g(x_1)-g(x_2)|, $$ which means that any Lipschitz constant of $g$ is also a Lipschitz constant for $f$.


(as asked in a comment) If $g$ is continuously differentiable, then its minimal Lipschitz constant over $[a,b]$ is $L=\max_{x\in[a,b]}|g'(x)|$. If $|g'|$ takes the value $L$ at some maximum point $x_*$ then either $g$ has a constant sign over some interval close to $x_*$ or $g(x_*)=0$. In either case, the difference quotient $\frac{\bigl||g(x)|-|g(x_*)|\bigr|}{|x-x_*|}$ has also $L$ as one-sided limit, so that the Lipschitz constant for $f$ can not be smaller than the Lipschitz constant for $g$.

Related Question