Help check my calculation? "If f(x) = 2x - 3 & g(x) = x^2+5, find (a) gf(2) = g(f(2)), (b) fg(-3) = f(g(-3))

Jacob

New member
Joined
Jan 27, 2019
Messages
4
If f(x) = 2x - 3 & g(x) = x^2+5, find:

a) gf(2) = g(f(2))
= g(2(2)-3)
= 2x - 3 (4 - 3)
= 2x - 12 + 9
= 2x - 3 #

b) fg(-3) = f(g(-3))
= f(-3^2+5)
= 2x - 3 ( -9 + 5)
= 2x + 27 - 15
= 2x + 12 #

Am I doing it correctly?
 

Subhotosh Khan

Super Moderator
Staff member
Joined
Jun 18, 2007
Messages
18,139
If f(x) = 2x - 3 & g(x) = x^2+5, find:

a) gf(2) = g(f(2))
= g(2(2)-3)
= 2x - 3 (4 - 3)
= 2x - 12 + 9
= 2x - 3 #..........................Incorrect - see below

b) fg(-3) = f(g(-3))
= f(-3^2+5)
= 2x - 3 ( -9 + 5)
= 2x + 27 - 15
= 2x + 12 #..........................Incorrect - see below

Am I doing it correctly?
If f(x) = 2x - 3 & g(x) = x^2+5, find:

a) gf(2) = g(f(2))

f(2) = 2*2 - 3 = 1

gf(2) = g(f(2)) = g(1) = 1^2 + 5 = 6

b) fg(-3) = f(g(-3))

g(-3) = (-3)^2 + 5 = 9 +5 = 14

fg(-3) = f(g(-3)) = f(14) = 2*14 - 3 = 25
 

JeffM

Elite Member
Joined
Sep 14, 2012
Messages
3,237
If f(x) = 2x - 3 & g(x) = x^2+5, find:

a) gf(2) = g(f(2))
= g(2(2)-3)
= 2x - 3 (4 - 3)
= 2x - 12 + 9
= 2x - 3 #

b) fg(-3) = f(g(-3))
= f(-3^2+5)
= 2x - 3 ( -9 + 5)
= 2x + 27 - 15
= 2x + 12 #

Am I doing it correctly?
No. A composition of functions is itself a function. You feed the composition a number, and it spits out a number.

One obvious way to do this kind of problem is to apply the function rules from the inside out as required by PEMDAS.

\(\displaystyle f(2) = 2(2) - 3 = 1.\)

\(\displaystyle \therefore g(f(2)) = g(1) = 1^2 + 5 = 6.\)

Now you try the second problem and tell us what you get?
 

Jomo

Elite Member
Joined
Dec 30, 2014
Messages
3,032
If f(x) = 2x - 3 & g(x) = x^2+5, find:

a) gf(2) = g(f(2))
= g(2(2)-3)
= 2x - 3 (4 - 3)
= 2x - 12 + 9
= 2x - 3 #

b) fg(-3) = f(g(-3))
= f(-3^2+5)
= 2x - 3 ( -9 + 5)
= 2x + 27 - 15
= 2x + 12 #

Am I doing it correctly?
A quick way to know you are wrong is because g(f(2)) must be a pure number, not an expression involving x.
 

HallsofIvy

Elite Member
Joined
Jan 27, 2012
Messages
4,797
As Jomo said, "gf(2)" has no "x" so its value cannot depend on x! \(\displaystyle f(x)= 2x- 3\) so f(2)= 2(2)- 3= 4- 3= 1. \(\displaystyle g(x)= x^2+ 5\) so \(\displaystyle g(f(2))= g(1)= 1^2+ 5= 1+ 5= 6\).
 
Top