What is a piecewise-defined function and how do I write one?

  • Thread starter Thread starter projection
  • Start date Start date
  • Tags Tags
    Functions
Click For Summary
A piecewise-defined function is expressed using different expressions based on the input value, often utilizing the Heaviside step function, H(x), which is defined as 0 for x < 0 and 1 for x ≥ 0. In the given function f(x)=x(1-x)H(x-1)+(4x-x^2-4)H(x-2), the Heaviside function determines which part of the function to use based on the value of x. For x < 1, the function evaluates to 0; for 1 ≤ x < 2, it simplifies to x(1-x); and for x ≥ 2, it combines both parts to yield 3x - 4. A participant pointed out a potential error in the final calculation, suggesting that the correct expression might be -2x^2 + 5x - 4. Understanding piecewise functions and the role of the Heaviside function is crucial for correctly interpreting and writing these types of mathematical expressions.
projection
Messages
48
Reaction score
0
hi, i missed a lecture on this topic and i am really lost...there is a question that asks to write a function in the piecewise-defined form. i have no idea what that means and its not in the textbook of the course...looked everywhere online and can't find anything on it...

they give the function in the form of f(x)=x(1-x)H(x-1)+(4x-x^2-4)H(x-2)

have no idea how to proceed...dont understand what H is doing in there...can someone provide some explanation and a little insight into this topic...would be appreciated.
 
Last edited:
Physics news on Phys.org
You might want to check your textbook for the definition of H(x), the Heaviside step function.

H(x) is defined as "0 is x< 0, 1 if x\ge 0".

From that H(x-1) is 0 if x< 1, 1 if x\ge 1 and H(x-2) is 0 if x< 2, 1 if x\ge 2.

In this example, if x< 1, then both H(x-1) and H(x-2) are 0. If x< 1, f(x)x(1-x)(0)+ (4x- x2-4)(0)= 0. If 1\le x&lt; 2 then H(x-1)= 1 while H(x-2) is 0. f(x)= x(1-x)(1)+ (4x- x2-4)(0)= x(1-x). If x\ge 2 both H(x-1) and H(x-2) are 1 so f(x)= x(1-x)(1)+ (4x- x2-4)(1)= x(x-1)+ 4x- x2- 4= x- x2+ 4x- x2- 4= 3x- 4.

That could also be written
f(x)= \left[\begin{array}{c} 0 \\ x(1-x) \\ 3x- 4\end{array}\right
 
thanks, i understand...but for the third part...isn't it -2x^2+5x-4? i think u made a small error in the final calculation...
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K