# 1.3.2 Composite Function (Comparison Method) Example 1 – 3

Example 1
Given $f:x↦hx+k,g:x↦{\left(x+1\right)}^{2}+4$   and $fg:x↦2{\left(x+1\right)}^{2}+5.$  Find
(a) the value of g²(2),
(b) the value of h and of k.

Example 2
Given $f:x↦1-x$   and $g:x↦p{x}^{2}+q$  .  If the composite function gf  is defined by $gf:x↦3{x}^{2}-6x+5$  , find
(a) the value of p and of q,
(b) the value of ${g}^{2}\left(-1\right)$  .

Example 3:
Given f: xhx + k and f2 : x → 4x + 15.
(a)  Find the values of h and of k.
(b)  Take > 0, find the values of x for which f (x2) = 7x

Solution:
(a)
Step 1:
Find f2 (x)
Given f (x) = hx + k
f2 (x) = ff (x) = f (hx + k)
= h (hx + k) + k
= h2x + hk + k

Step 2:
Compare with given f2 (x)
f2 (x) = 4x + 15
h2x + hk+ k = 4x + 15
h2 = 4
h = ± 2
When, h = 2
hk + k = 15
2k + k = 15
k = 5

When, h = –2
hk + k = 15
–2k + k = 15
k = –15

(b)
h > 0, h = 2, k = 5
Given f (x) = hx + k
f (x) = 2x + 5

f (x2) = 7x
2 (x2) + 5 = 7x
2x2 7x+ 5 = 0
(2x 5)(x–1) = 0
2x 5 = 0   or  x –1= 0
x = 5/2
or
x
= 1