Solving Piecewise Functions with U(x) - U(x-1): Explanation and Graph

In summary, paulmdrdo found that the piecewise defined function is given by:U(x)-U(x-1) = {0, x>=1; 1, 0<=x<1; 0, x<0}. Mark demonstrated how to graph the function and found that the difference between the function values is outside of the [0,1] interval. Paul then asked if there was a way to solve the piecewise function algebraically, and Mark explained that this could be done by graphing the function values and then solving for the function.
  • #1
paulmdrdo1
385
0
given function U(x)

U(x) = { 0, if x<0
{1, if x>=0

define the fuction piecewise and graph.
* U(x) - U(x-1)

how to solve this? please explain! thanks!
 
Mathematics news on Phys.org
  • #2
Re: piecewise function questions

Hello and welcome to MHB, paulmdrdo! (Wave)

We are given:

\(\displaystyle U(x)=\begin{cases}1 & x<0\\ 0 & x\ge0 \\ \end{cases}\)

I would graph this, then graph $U(x-1)$ beneath it, recogninzing that this is just the original graph shifted 1 unit to the right. Now, subtract the lower graph from the upper graph, to create a third graph beneath the other two, representing $g(x)=U(x)-U(x-1)$. From this, you should be able to define $g(x)$ as a piecewise defined function.

Show us what you find. :D
 
  • #3
Re: piecewise function questions

paulmdrdo said:
given function U(x)

U(x) = { 0, if x<0
{1, if x>=0

define the fuction piecewise and graph.
* U(x) - U(x-1)

how to solve this? please explain! thanks!

thank you mark! now i have an idea how to solve this graphically. but is there a way to solve this algebraically?
 
  • #4
Re: piecewise function questions

I think doing this graphically is the easiest method. Otherwise, you will wind up doing essentially the same thing, but without the benefit of a graph to make it more clear.
 
  • #5
Re: piecewise function questions

MarkFL said:
I think doing this graphically is the easiest method. Otherwise, you will wind up doing essentially the same thing, but without the benefit of a graph to make it more clear.

oh no! please bear with my stupidity. i don't know how to subtract the graph visually. what am I going to subtract, the x-values or the y-values?
 
  • #6
Re: piecewise function questions

You will subtract the function values (the $y$-values) for all real $x$. Can you see what the difference $g(x)$ is outside of $[0,1]$?
 
  • #7
Re: piecewise function questions

MarkFL said:
You will subtract the function values (the $y$-values) for all real $x$. Can you see what the difference $g(x)$ is outside of $[0,1]$?

mark i tried subtracting the coordinates of the lower graph from the coordinates of upper graph. but i don't know if that's correct. can you give me some examples. thanks!
 
  • #8
What did you find when you did the subtraction?
 
  • #9
Re: piecewise function questions

paulmdrdo said:
mark i tried subtracting the coordinates of the lower graph from the coordinates of upper graph. but i don't know if that's correct. can you give me some examples. thanks!

what i did was

(0,1) - (0,0) = (0, 1) - included
(1,1) - (1,1) = (0,0) - not included
and so on...
still I'm not sure about this. please can you show me what you did to solve this.
 
  • #10
This is what I did:

View attachment 856

Now, after you are make sure you see what I did, can you use the bottom graph, and write the piecewise function definition for it?
 

Attachments

  • paulmdrdo.jpg
    paulmdrdo.jpg
    8.4 KB · Views: 63
  • #11
MarkFL said:
This is what I did:

https://www.physicsforums.com/attachments/856

Now, after you are make sure you see what I did, can you use the bottom graph, and write the piecewise function definition for it?

based on the third graph the new function is defined by,

U(x)-U(x-1) = {0, x>=1; 1, 0<=x<1; 0, x<0

but I'm having a hard time subtracting the graph visually.
 
  • #12
First, do you see that on:

\(\displaystyle (-\infty,0)\) we have: \(\displaystyle g(x)=0\)

\(\displaystyle (0,1)\) we have: \(\displaystyle g(x)=1\)

\(\displaystyle (1,\infty)\) we have \(\displaystyle g(x)=0\)

So, I would draw these with open end-points at $x=0,\,1$ Then, to see which to fill in and which to leave open, observe that:

\(\displaystyle U(0)-U(0-1)=1-0=1\)

\(\displaystyle U(1)-U(1-1)=1-1=0\)

Now, this means we may amend our intervals as:

\(\displaystyle (-\infty,0)\) we have: \(\displaystyle g(x)=0\)

\(\displaystyle [0,1)\) we have: \(\displaystyle g(x)=1\)

\(\displaystyle [1,\infty)\) we have \(\displaystyle g(x)=0\)

and so we may write:

\(\displaystyle g(x)=\begin{cases}0 & x<0 \\ 1 & 0\le x<1 \\ 0 & 1\le x \\ \end{cases}\)
 
  • #13
MarkFL said:
First, do you see that on:

\(\displaystyle (-\infty,0)\) we have: \(\displaystyle g(x)=0\)

\(\displaystyle (0,1)\) we have: \(\displaystyle g(x)=1\)

\(\displaystyle (1,\infty)\) we have \(\displaystyle g(x)=0\)

So, I would draw these with open end-points at $x=0,\,1$ Then, to see which to fill in and which to leave open, observe that:

\(\displaystyle U(0)-U(0-1)=1-0=1\)

\(\displaystyle U(1)-U(1-1)=1-1=0\)

Now, this means we may amend our intervals as:

\(\displaystyle (-\infty,0)\) we have: \(\displaystyle g(x)=0\)

\(\displaystyle [0,1)\) we have: \(\displaystyle g(x)=1\)

\(\displaystyle [1,\infty)\) we have \(\displaystyle g(x)=0\)

and so we may write:

\(\displaystyle g(x)=\begin{cases}0 & x<0 \\ 1 & 0\le x<1 \\ 0 & 1\le x \\ \end{cases}\)

thank you very much mark! you're very generous in answering my questions! i now fully understand it! thanks!
 

FAQ: Solving Piecewise Functions with U(x) - U(x-1): Explanation and Graph

1. What is a piecewise function?

A piecewise function is a mathematical function that is defined by different equations or rules for different parts of its domain, rather than a single equation or rule for the entire domain.

2. How do you graph a piecewise function?

To graph a piecewise function, you need to graph each individual equation or rule separately on the corresponding domain. Then, you can combine the individual graphs to create the graph of the piecewise function.

3. How do you determine the domain of a piecewise function?

The domain of a piecewise function is determined by the domain of each individual equation or rule. The domain of the piecewise function is the union of all the individual domains.

4. What is the difference between a continuous and a discontinuous piecewise function?

A continuous piecewise function is one where all the individual equations or rules are connected and there are no gaps or jumps in the graph. A discontinuous piecewise function has gaps or jumps in the graph, indicating a change in the behavior or value of the function.

5. Can a piecewise function have more than two pieces?

Yes, a piecewise function can have any number of pieces. The number of pieces is determined by the number of individual equations or rules used to define the function.

Similar threads

Replies
4
Views
1K
Replies
4
Views
1K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
1
Views
1K
Replies
2
Views
1K
Replies
9
Views
3K
Back
Top