# Unit step function

#### paulmdrdo

##### Active member
How would I go about algebraically (not graphically) performing operations on two or more Heaviside function.

H(x) = {0, if x<0
..........{1, if x>=0

ex. define the function piecewise and graph.
a.) (x+1)*H(x+1)-x*H(x)
b.) (x+1)*H(x+1)

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

How would I go about algebraically (not graphically) performing operations on two or more Heaviside function.

H(x) = {0, if x<0
..........{1, if x>=0

ex. define the function piecewise and graph.
a.) (x+1)*H(x+1)-x*H(x)
b.) (x+1)*H(x+1)

Welcome to MHB, paulmdrdo!

The Heaviside step function switches value at x=0.
Where does H(x+1) switch value?
So which are the relevant boundaries to consider for (a)?
Following up, what does (a) look like if x is below the lowest boundary?

#### paulmdrdo

##### Active member
Re: Unit step function. help!

Welcome to MHB, paulmdrdo!

The Heaviside step function switches value at x=0.
Where does H(x+1) switch value?
So which are the relevant boundaries to consider for (a)?
Following up, what does (a) look like if x is below the lowest boundary?
thanks for the reply! the point of interest in (a) is -1. the function values at x<-1 are all 0.
but i'm still confused with that kind of problem like in (a). could you provide me your solution in problem (a). i just want to compare my thought process with others when i'm solving that. thanks!

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

thanks for the reply! the point of interest in (a) is -1. the function values at x<-1 are all 0.
but i'm still confused with that kind of problem like in (a). could you provide me your solution in problem (a). i just want to compare my thought process with others when i'm solving that. thanks!
The first step in the piecewise solution of (a) is:
(x+1) H(x+1)-x H(x) = \left\{ \begin{aligned} (x+1) H(x+1)-x H(x) & \qquad \text{if } x< -1 \\ (x+1) H(x+1)-x H(x) & \qquad \text{if } -1 < x< 0 \\ (x+1) H(x+1)-x H(x) & \qquad \text{if } x > 0 \\ \text{special value} & \qquad \text{if } x = -1 \vee x = 0 \\ \end{aligned}\right.

Note that with the Heaviside step function there are a couple more boundary conditions that I'm going to ignore for now, since H(0) is defined to be 1/2.

Can you simplify the piecewise solution?

#### paulmdrdo

##### Active member
Re: Unit step function. help!

The first step in the piecewise solution of (a) is:
(x+1) H(x+1)-x H(x) = \left\{ \begin{aligned} (x+1) H(x+1)-x H(x) & \qquad \text{if } x< -1 \\ (x+1) H(x+1)-x H(x) & \qquad \text{if } -1 < x< 0 \\ (x+1) H(x+1)-x H(x) & \qquad \text{if } x > 0 \\ \text{special value} & \qquad \text{if } x = -1 \vee x = 0 \\ \end{aligned}\right.

Note that with the Heaviside step function there are a couple more boundary conditions that I'm going to ignore for now, since H(0) is defined to be 1/2.

Can you simplify the piecewise solution?
(x+1) H(x+1)-x H(x) = {0, if x<-1
..............................{x, if -1<x<0
..............................{1, x>0

but why did you consider x=-1 and x=0 special value?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

(x+1) H(x+1)-x H(x) = {0, if x<-1
..............................{x, if -1<x<0
..............................{1, x>0
Can you reevaluate the case -1<x<0?

but why did you consider x=-1 and x=0 special value?
Hmm, I just found that different sources define H(x) differently.
According to Wolfram $H(0)=\frac 1 2$, but according to wiki $H(0)=1$.

#### paulmdrdo

##### Active member
Re: Unit step function. help!

Can you reevaluate the case -1<x<0?

Hmm, I just found that different sources define H(x) differently.
According to Wolfram $H(0)=\frac 1 2$, but according to wiki $H(0)=1$.
oh! is there another answer to that? how to do that?

Last edited:

#### paulmdrdo

##### Active member
Re: Unit step function. help!

oh! is there another answer to that? how to do that?
hey i just noticed something here
if x=-1 the function value is 0 and when x=0 the fuction value is 1

so we can define the function as
(x+1) H(x+1)-x H(x) = {0, if x<=-1
...............................{x, if -1<x<0
...............................{1, x=>0
am I correct?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

oh! is there another answer to that? how to do that?
After closer inspection, in this particular case both answers turn out to be the same:
$$(x+1) H(x+1)-x H(x) = \left\{ \begin{array}{ll} 0 & \qquad \text{if } x< -1 \\ x+1 & \qquad \text{if } -1 \le x < 0 \\ 1 & \qquad \text{if } x \ge 0 \\ \end{array}\right.$$

Note that the case $-1 \le x < 0$ is different from what you have.

#### paulmdrdo

##### Active member
Re: Unit step function. help!

After closer inspection, in this particular case both answers turn out to be the same:
$$(x+1) H(x+1)-x H(x) = \left\{ \begin{array}{ll} 0 & \qquad \text{if } x< -1 \\ x+1 & \qquad \text{if } -1 \le x < 0 \\ 1 & \qquad \text{if } x \ge 0 \\ \end{array}\right.$$

Note that the case $-1 \le x < 0$ is different from what you have.
uhm, please bear for my being ignorant here.

when i evaluated the function at x=-1 it gives 0. why is that different to -1<=x<0?
can you give me example of numerical computation of it?

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

when i evaluated the function at x=-1 it gives 0.
That is correct.

why is that different to -1<=x<0?
It isn't.
But you specified for $-1 \le x<0$ the value $x$.
That implies that at $x=-1$ it gives $-1$, which is incorrect.

#### paulmdrdo

##### Active member
Re: Unit step function. help!

That is correct.

It isn't.
But you specified for $-1 \le x<0$ the value $x$.
That implies that at $x=-1$ it gives $-1$, which is incorrect.
thank you! I'm so amazed! you're so generous in answering me queries! I've never been in a forum like this one. hope you'll continue helping a math learners like me. I can't learn math on my own thanks to MHB! more power. by the way I'm a 6th grader. learning this is so challenging!

#### paulmdrdo

##### Active member
Re: Unit step function. help!

That is correct.

It isn't.
But you specified for $-1 \le x<0$ the value $x$.
That implies that at $x=-1$ it gives $-1$, which is incorrect.

(x+1) H(x+1)-x H(x) = {0, if x<-1
..............................{x, if -1<=x<=0
..............................{1, if x>0

and

(x+1) H(x+1)-x H(x) = {0, if x<=-1
................................{x+1, if -1<=x<=0
................................{1, if x>0

also,
(x+1) H(x+1)-x H(x) = {0, if x<=-1
................................{x, if -1<x<0
................................{1, x=>0
are these correct?

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

(x+1) H(x+1)-x H(x) = {0, if x<-1
..............................{x, if -1<=x<=0
..............................{1, if x>0

and

(x+1) H(x+1)-x H(x) = {0, if x<=-1
................................{x+1, if -1<=x<=0
................................{1, if x>0

also,
(x+1) H(x+1)-x H(x) = {0, if x<=-1
................................{x, if -1<x<0
................................{1, x=>0
are these correct?
The place where you put the equalities are not particularly relevant, but the case -1<x<0 really has to read x+1 instead of x.

#### paulmdrdo

##### Active member
Re: Unit step function. help!

The place where you put the equalities are not particularly relevant, but the case -1<x<0 really has to read x+1 instead of x.
actually this is the answer i saw on my solution's manual

(x+1) H(x+1)-x H(x) = {0, if x<-1
..............................{x, if -1<=x<=0
..............................{1, if x>0

but I still don't fully understand what are the steps used in solving this.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

actually this is the answer i saw on my solution's manual

(x+1) H(x+1)-x H(x) = {0, if x<-1
..............................{x, if -1<=x<=0
..............................{1, if x>0

but I still don't fully understand what are the steps used in solving this.
Then the solutions manual is wrong.
Sorry.

#### paulmdrdo

##### Active member
Re: Unit step function. help!

Then the solutions manual is wrong.
Sorry.
yeah. i also suspected that. now it is confirmed. you told about relevant boundaries I should consider, how would I determine those relevant boundaries?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: Unit step function. help!

yeah. i also suspected that. now it is confirmed. you told about relevant boundaries I should consider, how would I determine those relevant boundaries?
Just check what your function does at x=-1 and x=0.
When there are "jumps", you should consider what happens exactly at those jumps.
In your case (a) there aren't any jumps, meaning it doesn't matter.

In practice those jumps are usually not particularly relevant for the Heaviside step function.

#### paulmdrdo

##### Active member
Re: Unit step function. help!

Just check what your function does at x=-1 and x=0.
When there are "jumps", you should consider what happens exactly at those jumps.
In your case (a) there aren't any jumps, meaning it doesn't matter.

In practice those jumps are usually not particularly relevant for the Heaviside step function.
can you spot what i'm doing wrong.

what i did is I plugged x-values to the function
it turns out that on the interval (-∞ ,-1) the function value is 0. and then on the interval (-1, 0) the function values are the same as the x-values (on the interval(-1,0)) that i started with. and then i graphed it. and on the interval (0,+∞ ) the function values is 1.
the graph of the function looks like continuous. when i try to define it piecewise I don't know how to put my cases correctly.