×

# Composite function: help needed

On a recent quiz, I was given the question: If

$f(x)=x^2-2x+1$

$g(x)=ax+b$

$f(g(x))=4x^2-3x-1$

Find a+b.

This first part is not necessary to be read, but it helps for sure. Skip to the $$\textbf{(I)}$$ if you don't want to read this first half.

Seem simple enough? Let's expand

$(ax+b)^2-2(ax+b)+1=4x^2-3x-1$

$a^2x^2+2abx+b^2-2ax-2b+1=4x^2-3x-1$

Let's match the coefficients of $$x^2$$

$a^2x^2=4x^2$

$a=\pm2$

Now assume $$a=2$$ for now, match the coefficients of $$x^1$$

$4bx-4x=-3x$

$b=\frac{1}{4}$

Yay, it's pretty, therefore $$a+b=\frac{9}{4}$$

Nope

Match the coefficients of $$x^0$$ we get

$b^2-2b+1=-1$

$b^2-2b+2=0$

$b=1\pm i$

Wat.

Now here, you might ask, "well what if a=-2" and I will respond, "Glad you asked, but don't worry, I did the calculations and it still doesn't work, I'm just a lazy sloth who is too lazy to type it out." :P

But wait, let's try another approach, because the question doesn't ask for a and b, it just asks for $$a+b$$. For all we know, $$(a,b)=(6+\sqrt i,~\text{Pikachu})$$. Also, there are many problems which ask for a+b where you can't solve for a and b.

Here's an example:

A right triangle with one leg 6, hypotenuse a, and other leg b, find $$a^2-b^2$$

Clearly we can't solve for a and b, but we do know that by Pythagorean theorem, $$a^2-b^2=36$$

Notice what we did in the original equation, we assumed that$$a=\pm 2$$ and there is no solution for b. Well, what if a=Charizard???

Now my approach ( I did method (I) on the 40 min quiz which took me about 25 mins to figure out, I still finished the other 5 or 6 questions in time though) was to plug in $$x=1$$ which im not sure if this is valid. By doing this, $$g(1)=a+b$$.

Now, we proceed with 3 sub-solutions from here.

$$\textbf{(I)}$$ Set $$f(g(1))=(a+b)^2-2(a+b)-1=4(1)^2-3(1)-1\] $(a+b-1)^2=0$ $a+b=1$ ------ Skip to the "skip here" because I think the next two are false \(\textbf{(II)}$$. My friend did this and I think its wrong.

Do the reverse of part 1.

$f(g(1))=4(a+b)^2-3(a+b)-1=1^2-2(1)+1$

$(4(a+b)+1)((a+b)-1))=0$

$\therefore a+b=1,-\frac{1}{4}$

$$\textbf{(III)}~~$$ MY OTHER FRIEND DID THIS, PLEASE CHECK IF THIS IS WRONG, I told him it is but he says it's right. ,Plugging in $$g(1)$$ into $$f(x)$$ we get

$f(g(1))=(a+b)^2-2(a+b)+1$

Setting this equal to the $$f(g(x))$$ we were given yields

$f(g(1))=(a+b)^2-2(a+b)+1=4(a+b)^2-3(a+b)-1$

$0=3(a+b)^2-(a+b)-2$

$0=(3(a+b)+2)((a+b)-1)$

$\therefore a+b=-\frac{2}{3}, ~ 1$

Skip Here

If anyone could provide answers for the following questions I'd greatly appreciate it

What I'm wondering is

1) Why do all the above methods have 1 as a solution? Or is it just a coincidence. Or is it the answer and all others are extraneous.

2) Are the two solutions (2 and 3) false?

3) is this problem unsolvable, false, more than one solution exists, or is it impossible because of some concept like $$|x|<0$$

4) Am I right?

5) this problem is not Alg 2 difficulty (unless all answers are extraneous)

Note by Trevor Arashiro
1 year, 8 months ago

Sort by:

Not every equation needs to have a solution. An extreme example could be like $$f(x)=1+x$$, find the value of $$x$$ such that $$f(f(x)) = f(x)$$.

Solving this would give an absurd situation as $$1+(1+x)=1+x \rightarrow 2=1 ?$$ · 1 year, 8 months ago

I believe the answer is. "This question is wrong".

There are no corresponding values of $$a, b$$ which will make the statement true, even if we allow for complex constants. Staff · 1 year, 8 months ago

The other question that I have is that if I type into wolfram "solve for a and b" the result is false. But if I plug in "find a+b" I get a bunch of ugly results. · 1 year, 8 months ago

(II) is clearly wrong. Staff · 1 year, 8 months ago

Thank you for the clarification · 1 year, 8 months ago