Converting a Piecewise function to a Heaviside function

In summary, the student is trying to find a function that will represent the on/off switch for a piecewise function, but is having difficulty doing so. He has tried different combinations of functions and has not been successful. He is asking for help from the professor.
  • #1
Coderhk
59
2

Homework Statement


Use the Heaviside function as an on the switch over the interval [a,b].

Homework Equations


Let the H(x) be the Heaviside function defined as a piece-wise function such that it is zero if x is less than zero, and 1 if it is greater than or equal zero. From that, we can use the Heaviside function as an on/off function, to represent piece-wise functions.

The Attempt at a Solution


I know that I can use H(x-a) where a is an element of the reals to indicate a horizontal translation of the Heaviside function. Similarly, I can write (H(x-a)-H(x-b)), where a and b are reals to denote an on the switch over the interval a<x<=b. If I was to reverse the position of "x" and "a", as well as "x" and "b", I could represent the "on" switch over the interval a<=x<b. However, I can't seem to represent the interval a<=x<=b. Where the endpoints are included.
 
Physics news on Phys.org
  • #2
The function H(x-b) is right-continuous and limited-at left (Càdlàg). What would be the corresponding features of H(b-x)?
 
  • #3
andrewkirk said:
The function H(x-b) is right-continuous and limited-at left (Càdlàg). What would be the corresponding features of H(b-x)?
By using H(b-x) instead of H(x-b) we would make the function defined on the left endpoint value but that leaves the right endpoint undefined
 
  • #4
Of course, if you are using Heaviside functions to help calculate LaPlace transforms of piecewise functions, the values at the endpoints don't affect the values of the transforms anyway.
 
  • #5
Coderhk said:

Homework Statement


Use the Heaviside function as an on the switch over the interval [a,b].

Homework Equations


Let the H(x) be the Heaviside function defined as a piece-wise function such that it is zero if x is less than zero, and 1 if it is greater than or equal zero. From that, we can use the Heaviside function as an on/off function, to represent piece-wise functions.

The Attempt at a Solution


I know that I can use H(x-a) where a is an element of the reals to indicate a horizontal translation of the Heaviside function. Similarly, I can write (H(x-a)-H(x-b)), where a and b are reals to denote an on the switch over the interval a<x<=b. If I was to reverse the position of "x" and "a", as well as "x" and "b", I could represent the "on" switch over the interval a<=x<b. However, I can't seem to represent the interval a<=x<=b. Where the endpoints are included.
Investigate some possibilities with H(x − b) , such as −H(x − b) , H(b − x), etc.

Try adding functions and try multiplying functions, etc.
 
  • #6
Coderhk said:
By using H(b-x) instead of H(x-b) we would make the function defined on the left endpoint value but that leaves the right endpoint undefined
What makes you think that? The right endpoint is at x=b. What is the value of H(b-x) when x=b? Draw a graph of the function H(b-x) and it should be immediately apparent how it can solve your problem, in conjunction with other function(s) you have mentioned above.
 
  • #7
andrewkirk said:
What makes you think that? The right endpoint is at x=b. What is the value of H(b-x) when x=b? Draw a graph of the function H(b-x) and it should be immediately apparent how it can solve your problem, in conjunction with other function(s) you have mentioned above.
if x = b at H(b-x) it will be on at the value x <= b. Though I need a<=x<=b.
 
  • #8
SammyS said:
Investigate some possibilities with H(x − b) , such as −H(x − b) , H(b − x), etc.

Try adding functions and try multiplying functions, etc.
I'm have already tried but can't seem to think of what to write. I know I can use H(x-a)-H(x-b) for a<x<=b but this excludes b
 
  • #9
Coderhk said:
if x = b at H(b-x) it will be on at the value x <= b. Though I need a<=x<=b.
That's why I said you'll need at least one of the other functions. Graph the others, and also graph the function you want to construct, and you should get an idea of how to put functions together to achieve the target.
 
  • #10
andrewkirk said:
That's why I said you'll need at least one of the other functions. Graph the others, and also graph the function you want to construct, and you should get an idea of how to put functions together to achieve the target.
I tried using (H(x-a)-H(x-b))+H(b-x)-H(x-a)) Though that doesn't work. I've been stuck for a while. Could you please give me a hint?
 
  • #11
Look at the target curve. Count how many jumps it has and, for each jump, note:
- the x value at which it occurs,
- is it up or down; and
- is the jump left- or right-continuous.

For each jump, find a version of a single Heaviside function that matches the target on all three of those properties at the relevant value of x, disregarding what it does elsewhere (Consider versions that have been discussed above).

Add the Heaviside versions together and graph the result.

You should now have a function whose graph is exactly the correct shape. It may be generally higher or lower than you want though. Can you add or subtract something (not a Heaviside function) that will correct that by shifting the whole graph up or down?
 

FAQ: Converting a Piecewise function to a Heaviside function

1. What is a piecewise function?

A piecewise function is a mathematical function that is defined by different equations for different intervals or segments of the input domain. It is often used to model a complex relationship between variables.

2. What is a Heaviside function?

A Heaviside function, also known as a unit step function, is a mathematical function that has a value of 0 for negative inputs and a value of 1 for positive inputs. It is used to represent a sudden change or "step" in a function.

3. Why would you want to convert a piecewise function to a Heaviside function?

Converting a piecewise function to a Heaviside function can make it easier to work with and manipulate mathematically. It can also help to simplify the representation of a function and make it more intuitive to understand.

4. How do you convert a piecewise function to a Heaviside function?

The process of converting a piecewise function to a Heaviside function involves breaking down the function into separate intervals, finding the corresponding equations for each interval, and then using the Heaviside function to represent the "step" or change in the function at each interval.

5. What are some practical applications of converting a piecewise function to a Heaviside function?

Converting a piecewise function to a Heaviside function can be useful in various fields such as engineering, physics, and economics. It can be used to model real-world situations where there is a sudden change or "step" in a function, such as in the case of a switch being turned on or off in an electrical circuit, or a sudden increase in demand for a product.

Back
Top