Writing an absolute value function as a piecewise function

  • Thread starter thornluke
  • Start date
  • #1
37
0

Homework Statement


Write f(x) = |x2-x-12| as a piecewise function.


Homework Equations





The Attempt at a Solution


-x2+x+12 where x>1/2
x2-x-12 where x[itex]\geq[/itex]0

According to the answer book the answers are
-x2+x+12 where -3<x<4
x2-x-12 where x[itex]\geq[/itex]4
2x2-5x-3, x[itex]\leq[/itex]1/2

I am really bad at functions when it comes to domain and range.. :cry:

Help please!
 

Answers and Replies

  • #2
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,331
1,012

Homework Statement


Write f(x) = |x2-x-12| as a piecewise function.

The Attempt at a Solution


-x2+x+12 where x>1/2
x2-x-12 where x[itex]\geq[/itex]0

According to the answer book the answers are
-x2+x+12 where -3<x<4
x2-x-12 where x[itex]\geq[/itex]4
2x2-5x-3, x[itex]\leq[/itex]1/2

I am really bad at functions when it comes to domain and range.. :cry:

Help please!
Start by writing |u| as a piecewise function:
[itex]\displaystyle \left|u\right|=\left\{ \matrix{\ u\,,\ \text{ if }\ u\ge 0\\-u\,,\ \text{ if }\ u<0}\right.[/itex]​

Doing that for |x2-x-12|, gives:
[itex]\displaystyle \left|x^2-x-12\right|=\left\{ \matrix{\ x^2-x-12\,,\ \text{ if }\ x^2-x-12\ge 0\\-(x^2-x-12)\,,\ \text{ if }\ x^2-x-12<0}\right.[/itex]​

That leaves you to solve:
x2-x-12 ≥ 0​
and
x2-x-12 < 0​
 
  • #3
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
16,546
6,904
According to the answer book the answers are
-x2+x+12 where -3<x<4

2x2-5x-3, x[itex]\leq[/itex]1/2
Let me ask you a question.

In the quoted solutions, the first is for the range from -3 to +4. I choose to pick the point -1, which is in this range, and so I know that at the point x=-1, the equation to use is the first of the two.

In the second answer, the range is anything where x is less than +1/2. I choose the point -1, which is certainly less than 1/2, and so I know that for the point x=-1, the second answer is the correct equation.

Now the two equations are not equivalent but the stated answers give them both as the solution for the point x=-1.

What do you think about that?
 

Related Threads on Writing an absolute value function as a piecewise function

Replies
8
Views
47K
Replies
6
Views
735
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
2
Views
6K
  • Last Post
Replies
10
Views
7K
  • Last Post
Replies
1
Views
2K
Replies
4
Views
10K
Replies
5
Views
3K
  • Last Post
Replies
4
Views
536
  • Last Post
Replies
3
Views
1K
Top