# How to represent a bounded function

I am not completely sure whether this question belongs on mathematics.SE but I figured to give it a shot:

I have a function which mathematically looks like this: $f(x)=\max(A,B\cos x)$

This will result in a cosine with for $B/A>1$ a cut-off section. My question is more related to aesthetics than mathematics: the notation I use now looks a bit too much like program code in my opinion. Is there a way to represent the bound in $f(x)$ without using the $\max$-notation?

-

## 1 Answer

Assuming that you're working with real numbers $A,B,x,$ we can rewrite it as $$f(x)=\frac12\bigl(A+B\cos x+|A-B\cos x|\bigr).$$

Visually, we're starting at the midpoint--$\frac12(A+B\cos x)$--and adding half of the difference between them--$\frac12|A-B\cos x|$. If you want to translate $\min$ of two real valued expressions, you'll do the same sort of thing, but subtract half the distance instead.

-
Awesome that is exactly what I was looking for – Michiel Mar 3 '13 at 17:02