2
$\begingroup$

I have a few equations that are rather long. They are 0 if the long part would become negative. Let's say they look something like $$ x =\begin{cases} a+b-cd &\quad \text{if}\ \ a+b-cd > 0\\0 &\quad \text{otherwise}.\end{cases} $$ Now I would prefer not to write the whole long part again. Is there a simple way of writing this? I was looking for something like $$ x =\begin{cases} a+b-cd &\quad \text{if}\ \ x>0\\0 &\quad \text{otherwise}.\end{cases}$$ In my case there is no way of simplifying the expression $a+b-cd$. Thanks for your help.

$\endgroup$
  • $\begingroup$ This notation doesn't work because the value of $x$ is still undefined when you compare it to $0$. $\endgroup$ – Yves Daoust Aug 13 '18 at 9:11
3
$\begingroup$

Superscript $\cdot^+$ is the way to go $$ x = (a + b - cd)^+ := \max(0, a + b - cd). $$

$\endgroup$
  • $\begingroup$ that's exactly the definition of superscript +, as indicated in my answer. $\endgroup$ – pointguard0 Aug 13 '18 at 9:13

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.