# How does one represent this in math

1. Oct 31, 2008

### wildman

How does one represent this in math....

1. The problem statement, all variables and given/known data

How does one represent the following in mathematical notation:

if(x >= a) then y = x-a
else x=0

2. Relevant equations

3. The attempt at a solution
Just y= x-a will not do it because it becomes negative when x is less than a and that is not what I want....

2. Oct 31, 2008

### tiny-tim

Hi wildman!

How about using min or max (or is it inf or sup )?

3. Oct 31, 2008

### HallsofIvy

Staff Emeritus
Re: How does one represent this in math....

I'm not sure what you kind of notation you want. I would write that as either
$$y= \left(\begin{array}{c} x- a if x\ge a \\ 0 if x> a\end{array}\right$$

Or as y= H(x-a)(x-a) where H(x) is the Heaviside step function.