Solving Piecewise Functions with Two Absolute Values

  • Thread starter Loppyfoot
  • Start date
  • Tags
    Functions
In summary, when solving for a function in piecewise form, take the absolute value of each function's argument.
  • #1
Loppyfoot
194
0

Homework Statement


Express the function in piecewise form without using absolute values.


Homework Equations


g(x) = |x| + |x-1|


The Attempt at a Solution


Alright, so I can do this problem when there is only one absolute value piece, but there are two different ones; so I do not know where to begin. Are the breakpoints at 0 and 1? How do I go about generating a piece wise function when both of them are absolute values?
 
Physics news on Phys.org
  • #2
Loppyfoot said:

Homework Statement


Express the function in piecewise form without using absolute values.

Homework Equations


g(x) = |x| + |x-1|

The Attempt at a Solution


Alright, so I can do this problem when there is only one absolute value piece, but there are two different ones; so I do not know where to begin. Are the breakpoints at 0 and 1? How do I go about generating a piece wise function when both of them are absolute values?
As you say, there are two 'breakpoints', therefore you will need to split the domain into three sections:
  1. x<0
  2. 0<x<1
  3. x>1
 
  • #3
Could you explain how you got those? I have always struggled with piecewise functions, and I want to master them. Also, how does one get the left side of the piecewise? (ie; not the inequality part)
 
  • #4
Loppyfoot said:
Could you explain how you got those? I have always struggled with piecewise functions, and I want to master them. Also, how does one get the left side of the piecewise? (ie; not the inequality part)
As you know, we only need to worry about the mod function when the argument becomes negative. So when x < 0, the arguments of both mod functions is negative. When 0 < x < 1, the argument of the first mod function is positive whilst the second is negative. Finally, when x > 1 the arguments of both mod functions are positive and we therefore don't need to worry about them any more.
 
  • #5
The back of my good has this;
1-2x ; x<0
1; 0<x<1
2x-1; x>1
I understand that we do not need to worry about the mod functions after the one breakpoint, but how does my book come up with the "(1-2x, 1, and 2x-1)?

Thanks
 
  • #6
Let's consider the case of x < 0. In this case do you agree that the argument of both mod functions is negative?

How does the presence of the mod function affect the argument if it is negative?
 
  • #7
Let's consider the case of x < 0. In this case do you agree that the argument of both mod functions is negative? So if x<0, wouldn't the absolute value be positive? Is this the mod function?
 
  • #8
Loppyfoot said:
Let's consider the case of x < 0. In this case do you agree that the argument of both mod functions is negative? So if x<0, wouldn't the absolute value be positive? Is this the mod function?
The mod function is defined as follows

[tex]\left|x\right| = \left\{\begin{array}{lll} x & \text{for} & x \geq 0 \\ -x & \text{for} & x < 0 \end{array}\right.[/tex]

Do you understand?
 
  • #9
Ok, I see that now; that is the first mod function.
 
  • #10
Loppyfoot said:
Ok, I see that now; that is the first mod function.

Well, I'm not sure if you really get the concept of absolute value of a (real) number. So I'm going over it again. If you find any steps, or explanation confusing, just don't hesitate to shout it out.

The absolute value of a (real) number a is defined as follow:

[tex]|a| = \left\{ \begin{array}{cl} a & \mbox{, if } a \geq 0 \\ -a & \mbox{, if } a < 0 \end{array} \right.[/tex]

Or:

[tex]|a| = \left\{ \begin{array}{cl} a & \mbox{, if } a > 0 \\ -a & \mbox{, if } a \leq 0 \end{array} \right.[/tex]

Since |0| = 0 = -0, so the 2 definitions are actually the same.

Since, the former one is more common, we'll be working with it. So, if a is non-negative, then just simply keep it, i.e: |a| = a. For example: |4| = 4, |0| = 0.

If a is negative, we then take the opposite (additive inverse) of it, i.e: |a| = -a. For example: |-7| = -(-7) = 7, |-100| = -(-100) = 100.

Or, roughly speaking, the absolute value of a number is always non-negative, and is the "distance" from that number to 0 (the origin), in the real number line.

--------------

Ok, I'll give you an example:

Example:

Express the following function in piecewise form.

f(x) = |x - a|, for a is any real constant.

The first step of this type of questions is to solve for x, where the function(s) inside the absolute signs are 0.

x - a = 0 => x = a.

So, the breakpoint is at a.

Split it into 2 cases:

  1. x >= a:
    When x >= a, x - a is non-negative, right? So, we have: |x - a| = x - a​
  2. x < a:
    When x < a, x - a is always negative, right? So, we have: |x - a| = -(x - a) = -x + a​

So, our piecewise function is:

[tex]|f(x)| = \left\{ \begin{array}{cl} x - a & \mbox{, if } x \geq a \\ a - x & \mbox{, if } x < a \end{array} \right.[/tex]

--------------

Back to your question, after finding the 2 breakpoints, namely 0, and 1. We then, split it into 3 different parts:

  1. x < 0:
    When x < 0, x is negative, right? So |x| = -x​
    When x < 0, x - 1 is also negative, right? So |x - 1| = -(x - 1) = -x + 1​
    So, when x < 0, your function will be (without absolute signs) f(x) = |x| + |x - 1| = -x + (-x + 1) = -2x + 1​
  2. 0 <= x < 1: (pay attention to the <= sign, it should be less than or equal, not just less than, since you should consider x = 0 as well)
    This can be worked out in almost the same manner.​
  3. x >= 1:
    This part should be simple too, just follow my example. :)​
 
Last edited:

What is a piecewise function?

A piecewise function is a mathematical function that is defined by different equations for different parts of its domain. It is commonly used to represent real-life situations where the relationship between two variables changes at a certain point.

What is an absolute value?

An absolute value is the magnitude of a number, regardless of its sign. It is represented by two vertical bars surrounding the number. For example, the absolute value of -5 is 5.

How do I solve a piecewise function with two absolute values?

To solve a piecewise function with two absolute values, first identify the different equations for each part of the domain. Then, set up a system of equations using the given conditions and solve for the variable. Finally, check your solution by plugging it back into the original function.

What is the significance of solving a piecewise function with two absolute values?

Solving a piecewise function with two absolute values allows us to find the exact value of the function at specific points in its domain. This is useful in many real-life situations, such as analyzing data or making predictions based on a given relationship.

What are some common mistakes to avoid when solving a piecewise function with two absolute values?

Some common mistakes to avoid when solving a piecewise function with two absolute values include forgetting to consider all parts of the domain, mixing up the equations for each part, and making calculation errors. It is important to carefully check your work and double-check your solutions to ensure accuracy.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
901
  • Calculus and Beyond Homework Help
Replies
3
Views
352
  • Calculus and Beyond Homework Help
Replies
6
Views
363
  • Calculus and Beyond Homework Help
Replies
1
Views
256
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
651
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
692
Back
Top