You are on page 1of 31
Mathematics Learning Centre, University of Sydney 27 3 Piecewise functions and solving inequalities In this Chapter we will discuss functions that are defined piecewise (sometimes called piecemeal functions) and look at solving inequalities using both algebraic and graphical techniques 3.1 Piecewise functions 3.1.1 Restricting the domain In Chapter 1 we saw how functions could be defined on a subinterval of their natural domain. This is frequently called restricting the domain of the function. In this Chapter we will extend this idea to define functions piecewise Sketch the graph of y= 1— 2? for x > 0. ‘The graph of y= 12 for x >0. Sketch the graph of y= 1—~ for x <0. ‘The graph of y = 1 —x for x <0. Mathematics Learning Centre, University of Sydney 28 We can now put these pieces together to define a function of the form 1-2? forz20 F(z) = - l-x forr<0 We say that this function is defined piecewise, First note that it is a function; each value of x in the domain is assigned exactly one value of y. This is easy to see if we graph the function and use the vertical line test. We graph this function by graphing each piece of it in turn, ‘The graph shows that f defined in this way is a funetion. The two pieces of y= f(z) meet so f is a continuous function ‘The absolute value function ze forz>0 J(z) =x forr<0 is another example of a piecewise funetion, Example Sketch the function 2 +1 forz 20 f(z) = 2 for r<0 Mathematics Learning Centre, University of Sydney 29 Solution ‘This function is not continuous at x = 0 as the two branches of the graph do not mect. Notice that we have put an open square (or ) around the point (0,2) and a solid square (or circle) around the point (0, 1). This is to make it absolutely clear that f(0) = 1 and not 2. When defining a function piecowise, we must be extremely careful to assign to each x exactly one value of y. 3.2. Exercises 1. For the function 1-2? forx>0 for <0 a. 2f(-1) + (2) b. f(a?) For the function gi en in 1, solve f(x) = 2 3. Below is the graph of y = g(z). Write down the rules its pieces are hyperbolic, circular and linear ich define 9(z) given that Mathematics Learning Centre, University of Sydney 30 4, a. Sketch the graph of / VI-# for -2<2<0 fay=y x b. State the range of f ©. Solve i f(z)=0 i (2) d. Find k if f(x) = k has io ia iii 2 solutions. Sketch the graph of y 6. Sketch the graph of y = g(x) if for x <-1 2 for-l<2<1 % forr>1 Mathematics Learning Centre, University of Sydney 31 7. MeMaths burgers are to modernise their logo as shown below. Write down a piecewise function t pieces (ie. rules that define fat ropresonts this function using (a) 4 (b) 3 (c) 2 function). 8. a. The following piecewise function is of the form ac?+b ford2 Determine the values of a, 6, ¢ and d. b. Complete the graph so that f(x) is an odd function defined for all real x, « # 0. c. Write down the equations that now define f(x), x #0. Mathematics Learning Centre, University of Sydney 32 3.3 Inequalities We can solve inequalities using both algebraic and graphical methods, Sometimes it is easier to use an algebraic method and sometim examples we will use both, as this allows us to make the connections between the algebra and the graphs es a graphical one. For the following Algebraic method Graphical method 1. Solve 3-2 > 1 This is a (2 Unit) linear inequality y Remember to reverse the inequality ‘ sign when multiplying or dividing by a negative number. 3-2r > 1 a -2r > -2 gel When is the line y = 3 — 22 above or on the horizontal line y= 1? From the graph, we sce that this is true for x < 1 2. Solve x? dr +3 <0. Let y This is a (2 Unit) quadratic inequal- ity. Factorise and use a number line 42-3 < 0 -3)(r-1) < 0 ‘The critical values are 1 and 3, which ‘ide the number line into three intervals. We take points in each interval to determine the sign of the inequality; eg use x = 0, x =2and x = 4 as test values. \ / When does the parabola have negative wvalues? OR When is the parabola un- der the z-axis? From the graph, we see that this happens when 1 < x <3 ' ' positive | negative | positive 1 01 2 3 ‘Thus, the solution is 1 < x <3, Mathematics Learning Centre, University of Sydney Solve 5 <1 This is a 3 Unit inequality, There is a variable in the denominator. Remember that a denominator can never be zero, so in this case x 4 4. First multiply by the square of the denominator rd < (edn 44 z-4 < 2-8 +16 0 < 2?—92420 0 < (e-4)(r—5) s on the num- 4.5 and Mark the critical valu ber line and test 2 = 0, x n= 6. positive neg | positive ‘Therefore, x <4 or x > 5. 4, Solve x-3< 2 Consider r—3= 2, x £0. Multiply by 2 we get e—3r = 10 x’ —3x-10 = 0 (x-5)(e+2) = 0 Therefore, the critical 2, 0 and 5 which divide the num- ber line into four intervals. We can user = ~3, 5 = -1, ¢ = Land x = 6 as test values in the inequal- ity. The points x = -3 and x =1 satisfy the inequality, so the soht- tion is x <—2or 0 <2 <5. value: (Notice that we had to include 0 as one of our critical values.) y = =} is not defined for x = 4. It is a hyperbola with vertical asymptote abr equality we need to find the values of x for which the hyperbola lies on or under t y= 1. (5,1) is the point of intersection. So, from the graph we see that 15 <1 when ¢ <4or2>5. 4. To solve our e line Sketch y= x—3 and then y = 22, Note that second of these functions is not de- fined for x =0. For what values of x docs the line lie under the hyperbola? From the graph, we sce that this happens when x < —2 or0 <2 <5. 33 Mathematics Learning Centre, University of Sydney 34 Example Sketch the graph of y = [27-6 Hence, where possible, a. Solve i 2x6) = 2x ii 2x -6| > 2x iii iv |x -6]=2+3 [2x6] <2+3 2x -6|=2-3 . Determine the values of k for which |2x — 6] =x +k has exactly two solutions, Solution a ii Qe-6 for >3 J(z) = [2x ~ 6| = -(2r-6) forx <3 “4.00 -2,00 Mark in the graph of y = It has one point of inter 1. It is parallel to one arm of the absolute value graph ion with y = [2x — 6] = -2r +6 (2 <3) at r= 1.5, When is the absolute value graph above the line y = 2? From the graph, when 2 0. All polynomials are defined for all real x and are continuous functions. 2 We are familiar with the quadratic polynomial, Q(z) = ax? + bx + ¢ where a # 0. This polynomial has degree 2. ‘The function f(z) = ++ is not a polynomial as it has a power which is not an integer > 0 and so does not satisfy the definit 4.1 Graphs of polynomials and their zeros 4.1.1 Behaviour of polynomials when |2| is large One piece of information that can be a great help when sketching a polynomial is the way it behaves for values of x when || is large. That is, values of « which are large in magnitude. ‘The term of the polynomial with the highest power of x is called the leading or dominant term. For example, in the polynomial P(x) = 2° — 3x‘ — 1, the term 2° is the dominant term. When || is large, the dominant term determines how the graph bel larger in magnitude than all the other terms. aves as it is so much Tow the graph behaves for || large depends on the power and coefficient of the dominant term. ‘There are four possibilities which we summarise in the following diagrams: 1, Dominant term with even power and 2. Dominant term with even power and 2 positive coefficient, eg y = 2° negative coefficient, eg Q(x) Mathematics Learning Centre, University of Sydney 37 \ and 3 3. Dominant term with odd power and 4. Dominant term with odd powe positive coefficient, eg y = z* negative coefficient, eg Q(x) = —2 This gives us a good start to graphing polynomials. All we need do now is work out what happens in the middle. In Chapter 5 we will use calculus methods to do this. Here we will use our knowledge of the roots of polynomials to help complete the picture. 4.1.2 Polynomial equations and their roots Ii, for a polynomial P(z), P(k) = 0 then we can say 1, 2=kis a root of the equation P(x) = 0. 2. 2 = kis a zero of P(x) 3. kis an x-intercept of the graph of P(r) 4.1.3 Zeros of the quadratic polynomial The quadratic polynomial equation Q(z) = ax? + bx +c = 0 has two roots that may be’ 1. real (rational or irrational) and distinct, 2. real (rational or irrational) and equal, 3. complex (not real) We will illustrate all of these cases with examples, and will show the relationship between the nature and number of zeros of Q(x) and the «- he graph. 1. Let Q(x) = 2? — dn 43. We find the zeros of Q(z) by solving the equation Q( we —4r=3 0 (z-1)(z-3) = 0 Therefore x = 1 or 3 ‘The roots are rational (hence real) and Mathematics Learning Centre, University of Sydney 38 2 Let Q(x) = 2? — 4x - 3. Solvi g the equation Q(z) = 0 we get, v—dz-3 = 0 44 VIO 12 2 Therefore x = 24 V7. roots are irrational (hence real) and Let Q(x) = 2? —4r +4. Solving the equation Q(x) = 0 we get, a —dr+4 = 0 (e-2% =0 Therefore x = 2. ‘The roots are rational (hence real) and equal. Q(z) = 0 has a repeated or dou- ble root at x = 2 Let Q(x) = 2? — 4 +5. Solving the equation Q(sr) = 0 we get, w—dz+5 = 0 44 YI6—20 * 2 Therefore x = 2+ ¥—4. There are no real roots. In this case the roots are complex. Notice that the graph turns at the dou- ble root «= 2 q 2 4 Notice that the graph does not intersect the z-axis. That is Q(x) > 0 for all real x, Therefore @ is positive definite. Mathematics Learning Centre, University of Sydney 39 We have given above four examples of quadratic polynomials to illustrate the relationship between the zeros of the polynomials and their graphs In particular we saw that: i if the quadratic polynomial has two real distinct zeros, then the graph of the polyno- mial cuts the z-axis at two distinct points; ii if the quadratic polynomial has a real double (or repeated) zero, then the graph sits on the axis; ili if the quadratic polynomial has no real zeros, then a-axis at all. ne graph does not intersect the So far, we have only consider c 4 quadratic polynomials where the coefficient of the x: term is positive which gives us a graph which is concave up. If we consider polynomials Q(x) = ax? + br + where a <0 then we will have a graph which is concave down. For example, the graph of Q(x) = ~(x? ~ 4 +4) is the reflection in the x-axis of the graph of Q(x) = 2? — 4x 44. (See Chapter 2.) 4.1.4 Zeros of cubic polynomials A real cubic polynomial has an equation of the form P(x) = ax* + bx? +ex+d where a # 0, a, 6, ¢ and d are real. Tt has 3 zeros which may be: i 3 real distinct zeros; ii 3 real zeros, all of which are equal (3 equal zeros); iii 3 real zero of which are equal; iv 1 real zero and 2 complex zeros. We will illustrate these cases with the following examples: Mathematics Learning Centre, University of Sydney 1 Let Q(x) = 3x9 — 3x. Solving the equation Q(sr) = 0 we get: 3x°— 32 = 0 Diz+1) = 0 Therefore Lor 0 orl ‘The roots are real (in fact rational) and distinct. Let Q(z) = Solving Q(x) = 0 we get that We can write this as (x — 0)? = 0, So, this equation has three equal real roots at r= 0 0, Let Q(2) Solving the equation Q(z) = 0 we get, Bae = 0 a'(x—1) 0 Therefore x = 0 or 1 ‘The roots are real with a double root at. 4 =0 anda single root at x= 1 Let Q(z) <2? +2 Solving the equation Q(sr) = 0 we get, ein 0 a(z?+1) = 0 Therefore x = 0. ‘There is one real root at x = 0. x? +1 = 0 does not have any real solu- tions. ‘The graph intersects the z-axis once only. Mathematics Learning Centre, University of Sydney 41 Again, in the above examples we have looked only at cubie polynomials where the coefli- cient of the «* term is positive. If we consider the polynomial P(x) = —x* then the graph of this polynomial is the reflection of the graph of P(z) = 2° in the a-axis. ‘The graph of Q(x) = ‘The graph of Q() = —x' 4.2 Polynomials of higher degree We will write down a few rules that we can use wh we have a polynomial of degree > 3. If P(x) is a real polynomial of degree n then: 1. P(x) = 0 has at most n real roots; 2. if P(x) = 0 has a repe this repeated root; ed root with an even power then the graph of P(r) turns at 3. if P(x) = 0 has a repeated root with an odd power then the graph of P(r) has a horizontal point of inflection at this repeated root For example, 1. tells us that if we have a quartic polynomial equation f(r) = 0. Then we know that f(z) =0 has < 4 real roots We can illustrate 2. by the sketching f(x) = x(x ~2)?(x +1). Notice how the graph sits on the z-axis at x = 2, The graph of f(x) = x(x +1)(x-2)? Mathematics Learning Centre, University of Sydney 2 We illustrate 3. by sketching the graph of f(x) = r(x — 2). Notice the horizontal point of inflection at a = 2. The graph of f(x) = x(x ~ 2)* 4.3 Exercises 1. Sketch the graphs of the following polynomials if y = P(2) is: a. a(x + 1)(x—3) b. 2(z + 1)(3- 2) c. (© +1P(x~3) d. (x + 1)(2? - 4x +5) ‘The graphs of the following quartic polynomials are sketched below. Match the graph with the poly ay=r'by iv Mathematics Learning Centre, University of Sydney 43 3. Sketch the graphs of the following quartic polynomials if y = C(x) is: a. a(x - I(x +2)(e +3) b. x(x ~1)(x+2)(3— 2) ) ce. (x —1)(x-3) d. (z+ 1P(2— 37 e. 1)(x - 3) f. (eo yB- g o(e er 40 +5) hh. 2°(x? — 4x +5), By sketching the appropriate polynomial, solve: a. a —4r-12<0 b. (x +2)(2—3)(5—2) >0 e. (n+ 225-2) >0 d. (x +2)(5—2) >0. For what values of k will P(x) > 0 for all veal « if P(x) = G. The diagrams show the graph of y = P(x) where P(x) In each case determine possible values for a, b, ¢ and d. 7. The graph of the polynomial y = f(x) is given below. It has a local maximum and minimum as marked. Use the graph to answer the following questions. a. Stat b. Wh the roots of f(x) is the value of the repeated root. c. For what values of k does the equation f(x) = k have exactly 3 solutions. Mathematics Learning Centre, University of Sydney 44 . Solve the inequality f(x) <0. v Sta hat is the least pos ible degree of f(x)? e the value of the constant of f(x) emo For what values of k is f(x) +k > 0 for all real 2. ‘The graph of the polynomial y = f(x) 4.4 Factorising polynomials So far for the most part, we have looked at polynomials which were already factorised. In this section we will look at methods which will help us factorise polynomials with degree > 2 44.1 Dividing polynomials Suppose we have two polynomials P(x) and A(x), with the degree of P(x) > the degree of A(x), and P(x) is divided by A(x). Then P( A(z) = Qe) +2) where Q(x) is a polynomial called the quotient and R(z) is a polynomial called the remainder, with the degree of R(x) < degree of A(z) We can rewrite this as P(x) = A(z) Q(z) + R(z) For example: If P(x) as follows: 2a + dr +3 and A(x) =x —2, then P(x) can be divided by A(x) 2x? + 4x + 12 x—2[2e +00 + 4r— 3 2x3 — 4a? dn? + 4r— 3 4x? Mathematics Learning Centre, University of Sydney 45 ‘The quotient is 22? + 4x +12 and the remainder is 21. We have 2x5 + dr +3 a Bette 3 gt ae x2 n-2 This can be written as 2x3 + dx — 3 = (x — 2)(2x? + dx + 12) + 21. Note that the degree of the “polynomial” 21 is 0 4.4.2. The Remainder Theorem If the polynomial f(x) is divided by (x — a) then the remainder is f(a) Proof: Following the above, we can write F(z) = A(z) Q(z) + R(z), where A(x) = (x — a). Since the degree of A(z) is 1, the degree of R(x) is zero. That is, R(x) =r where r is a constant. f(z) = (v-a)Q(x)+r where r is a constant. fla) = 0-Qla) +r So, if f(x) is divided by (x ~ a) then the remainder is f(a) Example Find the remainder when P(x) = 3x — 23 +302 —1 is divided by a. x +1, b. 26-1 Solution a. Using the Remainder Theorem: Remainder = P(-1) 3-(-1)-30-1 -27 b. 1 Remainder = P(5) lil 1 = 3(5)'-(5)*+30(5)-1 (5) =) +3005) 301 =yoyiwl 1 16 Mathematics Learning Centre, University of Sydney 46 Example When the polynomial f(z) is divided by 2? — 4, the remainder is 5x +6, What is the remainder when f(x) is divided by (x — 2)? Solution Write f(x) = (2? — 4) -9(x) + (6 +6). Then Remainder = f(2) = 0-q(2) +16 16 A consequence of the Remainder Theorem is the Factor Theorem which we state below. 4.4.3. The Factor Theorem If x = ais a zero of f(z), that is f(a) =0, then (x ~ a) is a factor of f(x) and f(x) may be written as J (2) = (@ ~ a)a(x) for some polynomial q( Also, if (x — a) and (x — 6) are factors of f(x) then (x —a)(x— 6) is a factor of f(x) and —a)(x—b)- Q(z) f(z) for some polynomial Q(z) Another useful fact about zeros of polynomials is given below for a polynomial of degree 3 Ifa (real) polynomial a? + bx? + er +d, where a £0, a, 6, cand d are real, has exactly 3 real zeros a, and 7, then P(x) = a(x —a)(x - 8)(2— 7) ay Furthermore, by expanding the right hand side of (1) and equating coefficients we get: i b +Bty=-2 atsty=-2 ii af tay+py=5; iii apy = Mathematics Learning Centre, University of Sydney 47 ‘This result can be extended for polynomials of degree n. We will give the partial result forn=4. If art + br’ + ex? + dr +e is a polynomial of degree 4 with real coeflicents, and P(r) has four real zeros a, (1,7 and 6, then Plz) = a)(x — B)(x — y)(z - 6) and expanding and equating as above gives agys = Ifa =1 and the equation P(r) = 0 has a root which is an integer, then that integer must be a factor of the constant term. ‘This gives us a place to start when looking for factors of a polynomial. ‘That is, we look at all the factors of the constant term to see which ones (if any) are roots of the equation P(x) = 0. Example Let f(z) = 423-827-242 a. Factotise f(z). b. Sketch the graph of y = f(z). c. Solve f(r) > 0 Solution a. Consider the factors of the constant term, 2. We check to see if £1 and =2 are solutions of the equation f(x) =0 by substitution. Since f(2) = 0, we know that (x — 2) is a factor of f(z). We use long division to determine the quotient 4g? 1 x—2[4a> — Be FD 4a — 8x? J(z) (@-2)(42? — 1) (x — 2)(2x — 1)(2x +1) Mathematics Learning Centre, University of Sydney 48 b. The graph of f( c. f(z) 2 Owhen -}<22, Example Show that (x — 2) and (x ~ 3) are factors of P(x) a — 192 + 30 =0. ~ 19x + 30, and hence solve Solution P(2) = 8~ 38 + 30 = 0 and P(3) = 27 — 57 + 30 = 0 so (x — 2) and (x ~ 3) are both factors of P(r) and (x — 2)(2— 3) = 2? — 5x +6 is also a factor of P(z). Long division of P(x) by x? — 5x +6 gives a quotient of (x + 5) So, P(a) = 23 — 19x + 30 = (x — 2)(x—3)(x +5) Solving P(x) = 0 we get (x ~2)(x~3)(x +8) That is, x = 2 or = 3 or x= ~—5. Instead of using long division we could have used the facts that i the polynomial cannot have more than three real zeros; i the product of the zeros must be equal to ~30. Lot a be the unknown root. ‘Then 2-3: a = —30, so that a = —8, Therefore the solution of P(x) = 2-192 +30=0 ist =2orz=30rr=-5, Mathematics Learning Centre, University of Sydney 49, 4.5 Exercises 1. When the polynomial P(r) is divided by (x — a(x —b) the quotient is Q(cr) and the remainder is R(x). a. Explain why R(x) is of the form ma + ¢ where m and ¢ are constants b. When a polynomial is divided by (x — 2) and (x — 3), the remainders are 4 and 9 respectively. Find the remainder when the polynomial is divided by x? — 51 +6. ¢. When P(e) is divided by (1r—a) the remainder is a?. Also, P(b) = 62. Find R(x) when P(z) is divided by (x —a)(x — 8) a. Divide the polynomial f(x) = 2x4 + 1325 + 182? + x — 4 by g(x) = x? + 5x + 2. Hence write f(x) = 9(z)q(x) + r(x) where q(z) and r(x) are polynomials. b. Show that f(x) and g(x) have no common zeros. (Hint: Assume that a is common zero and show by contradiction that a does not exist.) For the following polynomials, i factorise ii solve P(x) =0 iii sketch the graph of y = P(z) Mathematics Learning Centre, University of Sydney 50 5 Solutions to exercises 1.4 Solutions The domain of f(x) = V9—#* is all real x where —3 1 and the range is all real y>0. The graph of y = |2z|. Its domain is all real z and range all real y > 0. Mathematics Learning Centre, University of Sydney 51 ‘The graph of y= 2. The domain is all real x # 4 and the range is all real y # 0. The graph of y = |22|— 1. The domain is all real x, and the range is all real y>-l 4. a. The perpendicular distance d from (0,0) to x+y +k =O is d= |] b. For the line r+y+k = 0 to cut the circle in two distinct points d < 2. ie |k| < 2V2 or -2V2 < k < 2v2. ‘The graph of y = (4)* The graph of y? = 6. y? = 2° is not a function Mathematics Learning Centre, University of Sydney 52 Ta. ‘The graph of VI=3. This is 2 function withthe domain: allrea:r such TB raph of [x] ~ jy| = 0. This s not that —2

You might also like