Screen shot of the question from my textbook:
My solution is $f(x)=5(\frac{1}{5})^1$ whereas my textbooks solution is $f(x)=-2(3)^x+7$
Here's my working:
General form: $y=ab^x$.
Y intercept is $(0,5)$ so $a = 5$.
Another point on the graph with integer values is $(1,1)$.
Substituting my values into the general form:
$$f(x)=ab^x$$
$$f(x)=5b^x$$
$$1=5b^1$$
$$\frac{1}{5}=b^1$$
$$b=\frac{1}{5}$$
Thus the function is: $f(x)=5(\frac{1}{5}^x)$
Where did I go wrong and how can I arrive at $f(x)=-2(3)^x+7$?
Best Answer
Notice how the graph has a horizontal asymptote at $y = 7$. This is from the graph being shifted up by 7. This means we should use the form:
$y = ab^x + c$, where c is the horizontal asymptote. This form has technically been used by you before, it's just that c normally equals $0$ so there's no need to write it. E.g., if you graph $y = 2^x$, you'll notice the horizontal asymptote is at $y = 0$ (so the graph hasn't been shifted).
So we have $y = ab^x + 7$. Now for this, because the graph has been shifted you can't get $a$ immediately just by looking at the graph's y-intercept. Instead you need to plug in the y-intercept's x and y coordinates in order to solve for $a$:
$5 = ab^0 + 7$
$5 = a(1) + 7$
$a = -2$
Notice how the $b$ was eliminated above since it was raised to $0$. This is thanks to the x-coordinate of the y-intercept being $0$. If we instead tried to use the other point on the graph first, you'd be left with both $a$ and $b$ in the equation.
Anyway, now that we've solved for $a$, plug -2 into the equation:
$y = -2b^x + 7$
There's only one variable left to solve: $b$. So use the (1,1) coordinate on the graph:
$1 = -2b^1 + 7$
$-6 = -2b$
$b = 3$
So we get: $y = -2(3)^x + 7$
Note - the following video explains a similar problem to yours. The graph is flipped over the y-axis but the method is the same.
https://www.youtube.com/watch?v=12LDAqnsH_w