# Rewriting a $\max\left\{0,\dots\right\}$ function in order to integrate the function more properly

Yesterday I asked a question about a certain integral. In the integral is the term:

$$\max\left\{0,\left|\text{n}\cdot\sin\left(2\pi\cdot x\cdot t-\frac{\pi}{2}\right)\right|-2\cdot\text{z}\right\}\tag1$$

I know that $$x$$, $$\text{z}$$ and $$\text{n}$$ are all real and positive numbers.

Next to that I know that the integral is between certain boundaries (where only the lower bound is important for the function that I stated in equation $$(1)$$). I know that:

$$\frac{1}{4x}\le t<\frac{1}{2x}\tag2$$

Question: is there a way to rewrite equation $$(1)$$ using the condition that is stated in equation $$(2)$$ so that I lose the $$\max\left\{0,\dots\right\}$$ function? If that is possible I can use that to evalute the integral using Mathematica more easily.

• the function $\max(0,x)$ can be written $(|x|+x)/2$, does that help? – Calvin Khor Mar 20 at 18:56
• @CalvinKhor Where does that relation come from? I've never seen that. – Jan Mar 20 at 18:58
• well, when $x\ge 0$, then $|x|=x$, and when $x<0$, $|x|=-x$. – Calvin Khor Mar 20 at 18:59