{"base":{"id":"alcm-1-05","subject":"Combined Maths","title":"Types of functions: modulus, composite, odd and even","scene":"alcm","steps":[{"mode":"fig","fig":{"view":[-4,-2,4,5],"items":[{"k":"fn","e":"abs(x)","col":"b","w":7},{"k":"txt","p":[2.6,1.4],"t":"y = x","col":"s","size":28},{"k":"txt","p":[-2.6,1.4],"t":"y = −x","col":"s","size":28}],"axes":{"xl":"x","yl":"y"},"free":true},"work":{"title":"Write it like this","lines":["|x| = x,  x ≥ 0","|x| = −x,  x < 0",{"t":"|−5| = 5,  |3| = 3","note":"never negative"}]},"say":["Tap to define |x|.","Right half: y = x.","Left half: y = −x.","The V shape."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"The modulus function","title":"|x| is the distance from 0","body":"The modulus |x| is x when x ≥ 0 and −x when x < 0, so it is never negative. Its graph is a V with the corner at the origin."},{"mode":"fig","work":{"title":"Write it like this","lines":["f(x) = x²,   g(x) = x + 3",{"t":"fg(x) = f(x + 3) = (x + 3)²","note":"g first"},{"t":"gf(x) = g(x²) = x² + 3","note":"f first"},"fg(1) = 16,   gf(1) = 4",{"t":"fg ≠ gf","note":"order matters"}]},"say":["Tap to compose.","Two simple functions.","Put g(x) into f.","Put f(x) into g.","Different numbers.","Always work from the inside out."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"Composite functions","title":"One function after another","body":"The composite fg(x) = f(g(x)) means do g first, then f. Order matters: fg and gf are usually different."},{"mode":"plot","controls":[{"id":"n","label":"n","min":1,"max":5,"step":1,"value":2}],"view":[-2.5,-5,2.5,5],"axes":{"xl":"x","yl":"y"},"fns":[{"e":"x^n","col":"b"}],"pts":[{"x":"1.5","y":"1.5^n","col":"g","t":"f(a)"},{"x":"-1.5","y":"(-1.5)^n","col":"r","t":"f(−a)"}],"ptitle":"Powers of x","rows":["f(x) = xⁿ,  n = {n|0}",["f(1.5) = {1.5^n|2}","g"],["f(−1.5) = {(-1.5)^n|2}","r"]],"note":"Even powers give even functions (x², cos x); odd powers give odd functions (x, x³, sin x). Most functions, like x + 1, are neither.","st":"Compare the green and red points.","eyebrow":"Even and odd","title":"Symmetry of a graph","body":"f is even if f(−x) = f(x): its graph is symmetric about the y-axis. f is odd if f(−x) = −f(x): it has rotational symmetry about the origin. Move n to see xⁿ change between the two."},{"mode":"fig","fig":{"view":[-3.5,-3.5,3.5,3.5],"items":[{"k":"seg","p":[-3,-3,-2,-3],"col":"b","w":7},{"k":"seg","p":[-2,-2,-1,-2],"col":"b","w":7},{"k":"seg","p":[-1,-1,0,-1],"col":"b","w":7},{"k":"seg","p":[0,0,1,0],"col":"b","w":7},{"k":"seg","p":[1,1,2,1],"col":"b","w":7},{"k":"seg","p":[2,2,3,2],"col":"b","w":7},{"k":"dot","p":[-3,-3],"col":"b"},{"k":"dot","p":[-2,-2],"col":"b"},{"k":"dot","p":[-1,-1],"col":"b"},{"k":"dot","p":[0,0],"col":"b"},{"k":"dot","p":[1,1],"col":"b"},{"k":"dot","p":[2,2],"col":"b"},{"k":"dot","p":[-2,-3],"col":"b","open":1},{"k":"dot","p":[-1,-2],"col":"b","open":1},{"k":"dot","p":[0,-1],"col":"b","open":1},{"k":"dot","p":[1,0],"col":"b","open":1},{"k":"dot","p":[2,1],"col":"b","open":1},{"k":"dot","p":[3,2],"col":"b","open":1}],"axes":{"xl":"x","yl":"y"}},"work":{"title":"Write it like this","lines":["⌊2.7⌋ = 2","⌊−1.2⌋ = −2",{"t":"⌊3⌋ = 3","note":"filled dot: included"},{"t":"jumps at every integer","note":"not continuous"}]},"say":["Tap to read the steps.","Round down.","Down means towards −∞.","An integer stays the same.","The graph breaks at integers."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"Step and piecewise","title":"A rule in pieces","body":"Some functions use different formulas on different parts of the domain. The integer part (floor) function ⌊x⌋ gives the greatest integer ≤ x; its graph is a staircase."},{"mode":"quiz","look":"fig","fig":{"view":[0,0,10,10],"items":[{"k":"txt","p":[5,5.9],"t":"f(x) = 2x − 1","size":84,"col":"v","max":1400},{"k":"txt","p":[5,4.1000000000000005],"t":"g(x) = x²","size":84,"col":"k","max":1400}]},"eyebrow":"Check yourself","title":"Composite","body":"Do g first.","question":"f(x) = 2x − 1, g(x) = x². What is fg(3)?","options":["17","25","11"],"answer":0,"right":"Correct. g(3) = 9, then f(9) = 17.","wrong":"Not quite. 25 is gf(3). For fg, square first, then double and subtract 1."}],"more":[{"type":"cards","id":"detail","eyebrow":"The ideas in detail","title":"Types of functions in detail","items":[{"tag":"Modulus","title":"Graphs with the modulus","body":"y = |f(x)|: draw y = f(x), then reflect every part below the x-axis upwards.\nExample: y = |x − 2| is a V with its corner at (2, 0).\nUnit 7 uses this for inequalities such as |x − 2| < 3."},{"tag":"Domain","title":"When a composite exists","body":"fg exists only when the range of g lies inside the domain of f.\nf(x) = √x (x ≥ 0), g(x) = x − 5: fg(x) = √(x − 5) needs x ≥ 5."},{"tag":"Checking","title":"Testing odd and even with algebra","body":"Replace x by −x and simplify.\nf(x) = x⁴ − 3x²:  f(−x) = x⁴ − 3x² = f(x), even.\ng(x) = x³ + x:  g(−x) = −x³ − x = −g(x), odd.\nh(x) = x² + x:  h(−x) = x² − x, neither."}]},{"type":"cards","id":"ideas","eyebrow":"Marks lost in the exam","title":"Common mistakes","items":[{"tag":"Common mistake","title":"Composing in the wrong order","body":"fg(x) means f(g(x)): the function written next to x acts first."},{"tag":"Common mistake","title":"Thinking every function is odd or even","body":"Most functions are neither. Test f(−x); if it is neither f(x) nor −f(x), say so."}]},{"type":"quiz","id":"quiz","eyebrow":"Go further","title":"Thirty questions: easy, medium, hard","questions":[{"level":"easy","question":"|5| + |−9| = ?","options":["14","4","−4"],"answer":0,"right":"Correct. Each modulus is a distance, so it is positive.","wrong":"Not quite. Make each value positive first."},{"level":"easy","question":"|−3| + |4| = ?","options":["1","−7","7"],"answer":2,"right":"Correct. Each modulus is a distance, so it is positive.","wrong":"Not quite. Make each value positive first."},{"level":"easy","question":"|2| + |−8| = ?","options":["6","10","−6"],"answer":1,"right":"Correct. Each modulus is a distance, so it is positive.","wrong":"Not quite. Make each value positive first."},{"level":"easy","question":"|−6| + |−1| = ?","options":["7","−7","5"],"answer":0,"right":"Correct. Each modulus is a distance, so it is positive.","wrong":"Not quite. Make each value positive first."},{"level":"easy","question":"|−12| = ?","options":["−12","12","1/12"],"answer":1,"right":"Correct. Distance from 0.","wrong":"Not quite. The modulus is never negative."},{"level":"easy","question":"sin x is…","options":["odd","even","neither"],"answer":0,"right":"Correct. sin(−x) = −sin x.","wrong":"Not quite. Compare sin(−x) with sin x."},{"level":"easy","question":"⌊3.7⌋ = ?","options":["4","3.7","3"],"answer":2,"right":"Correct. The floor is the greatest integer ≤ 3.7.","wrong":"Not quite. Round down."},{"level":"easy","question":"⌊−2.3⌋ = ?","options":["−2","−3","2"],"answer":1,"right":"Correct. −3 ≤ −2.3 < −2.","wrong":"Not quite. Round down, towards −∞."},{"level":"easy","question":"An even function satisfies…","options":["f(−x) = −f(x)","f(x) = 0","f(−x) = f(x)"],"answer":2,"right":"Correct. The graph is symmetric in the y-axis.","wrong":"Not quite. Think of x²."},{"level":"easy","question":"cos x is…","options":["even","odd","neither"],"answer":0,"right":"Correct. cos(−x) = cos x.","wrong":"Not quite. Compare cos(−x) with cos x."},{"level":"medium","question":"f(x) = x + 1, g(x) = x². gf(2) = ?","options":["5","14","9"],"answer":2,"right":"Correct. gf means g(f(x)): apply f first.","wrong":"Not quite. Work from the inside out."},{"level":"medium","question":"f(x) = 2x, g(x) = x − 3. gf(5) = ?","options":["4","7","11"],"answer":1,"right":"Correct. gf means g(f(x)): apply f first.","wrong":"Not quite. Work from the inside out."},{"level":"medium","question":"f(x) = x², g(x) = 3x. gf(1) = ?","options":["3","9","12"],"answer":0,"right":"Correct. gf means g(f(x)): apply f first.","wrong":"Not quite. Work from the inside out."},{"level":"medium","question":"f(x) = x⁴ + x² is…","options":["odd","neither","even"],"answer":2,"right":"Correct. Only even powers.","wrong":"Not quite. Replace x by −x."},{"level":"medium","question":"f(x) = x³ + x is…","options":["even","neither","odd"],"answer":2,"right":"Correct. f(−x) = −x³ − x = −f(x).","wrong":"Not quite. Check f(−x)."},{"level":"medium","question":"f(x) = x² + x is…","options":["neither","even","odd"],"answer":0,"right":"Correct. f(−x) = x² − x, which is neither f(x) nor −f(x).","wrong":"Not quite. Mixed powers."},{"level":"medium","question":"Solve |x − 3| = 5.","options":["x = 8 or x = −2","x = 8 only","x = 2 or x = −8"],"answer":0,"right":"Correct. x − 3 = ±5.","wrong":"Not quite. Distance 5 from 3."},{"level":"medium","question":"f(x) = 2x + 1. ff(x) = ?","options":["4x + 1","4x + 3","(2x + 1)²"],"answer":1,"right":"Correct. 2(2x + 1) + 1.","wrong":"Not quite. Put f(x) into f."},{"level":"medium","question":"f(x) = |x| for x = −4 gives…","options":["−4","0","4"],"answer":2,"right":"Correct. |−4| = 4.","wrong":"Not quite. Distance from 0."},{"level":"medium","question":"The graph of an odd function is symmetric about…","options":["the y-axis","the origin","y = x"],"answer":1,"right":"Correct. A half-turn about O maps it to itself.","wrong":"Not quite. Think of x³."},{"level":"hard","question":"f(x) = x², g(x) = x + 2. Solve fg(x) = gf(x).","options":["x = −1/2","x = 0","x = 2"],"answer":0,"right":"Correct. (x + 2)² = x² + 2 ⇒ 4x + 4 = 2.","wrong":"Not quite. Write both composites."},{"level":"hard","question":"f(x) = |x| − |x − 2|. f(5) = ?","options":["8","2","−2"],"answer":1,"right":"Correct. 5 − 3 = 2.","wrong":"Not quite. Evaluate each modulus."},{"level":"hard","question":"If f is odd and g is even, then fg (the product) is…","options":["even","neither","odd"],"answer":2,"right":"Correct. f(−x)g(−x) = −f(x)g(x).","wrong":"Not quite. Like odd × even powers."},{"level":"hard","question":"Solve |2x − 1| = |x + 4|.","options":["x = 5 only","x = 5 or x = −1","x = −5 or x = 1"],"answer":1,"right":"Correct. 2x − 1 = ±(x + 4).","wrong":"Not quite. Equal moduli: equal or opposite."},{"level":"hard","question":"f(x) = 1/(1 − x). fff(x) = ? (x ≠ 0, 1)","options":["x","1/(1 − x)","(x − 1)/x"],"answer":0,"right":"Correct. ff(x) = (x − 1)/x, then f of that is x.","wrong":"Not quite. Compose one step at a time."},{"level":"hard","question":"⌊x⌋ = 3 means…","options":["3 < x ≤ 4","3 ≤ x < 4","2 < x ≤ 3"],"answer":1,"right":"Correct. The floor is 3 on [3, 4).","wrong":"Not quite. Which x round down to 3?"},{"level":"hard","question":"Every function f(x) on R can be written as…","options":["an even part plus an odd part","a polynomial","a modulus"],"answer":0,"right":"Correct. f(x) = ½[f(x) + f(−x)] + ½[f(x) − f(−x)].","wrong":"Not quite. Add and subtract f(−x)."},{"level":"hard","question":"The domain of fg where f(x) = √x and g(x) = x − 4 is…","options":["x ≥ 4","x ≥ 0","x ≥ −4"],"answer":0,"right":"Correct. fg(x) = √(x − 4) needs x − 4 ≥ 0.","wrong":"Not quite. g(x) must be in the domain of f."},{"level":"hard","question":"If f is even and odd at the same time, then…","options":["f(x) = x","f(x) = 1","f(x) = 0 for all x"],"answer":2,"right":"Correct. f(x) = f(−x) = −f(x) ⇒ f(x) = 0.","wrong":"Not quite. Combine the two conditions."},{"level":"hard","question":"The number of solutions of |x| = x² is…","options":["2","1","3"],"answer":2,"right":"Correct. x = 0, 1, −1.","wrong":"Not quite. Solve for x ≥ 0 and x < 0."}]},{"type":"keywords","id":"words","title":"Key words","items":[{"word":"Modulus","meaning":"The size of a number without its sign, |x|."},{"word":"Composite function","meaning":"fg(x) = f(g(x)): g first, then f."},{"word":"Even function","meaning":"f(−x) = f(x); symmetric about the y-axis."},{"word":"Odd function","meaning":"f(−x) = −f(x); symmetric about the origin."},{"word":"Piecewise function","meaning":"A function given by different formulas on different intervals."},{"word":"Floor function","meaning":"⌊x⌋, the greatest integer less than or equal to x."}]},{"type":"checklist","id":"check","title":"I can…","items":["draw and use the modulus function","form composite functions in the right order","decide whether a function is odd, even or neither"]},{"type":"sources","id":"sources","title":"Sources","items":["NIE Sri Lanka, G.C.E. (A/L) Combined Mathematics syllabus, Grade 12 and 13, 2017 (competency level I 2.2)."]}],"slug":"types-of-functions"},"overlay":null}