[Math] How to apply horizontal stretches to logarithmic functions

algebra-precalculuseducation

I have a question about logarithmic functions. First, I am given the following function $f(x)$:

$f(x) = log_4(x)$

The question asks to apply the following series of transformations to the function $f(x)$:

Apply, to the graph of $f(x)$, a horizontal shift to move the graph left by $4$ units, then a vertical shift up by $8$ units, and lastly, a horizontal stretch by a factor of $5$, to produce the graph $p(x)$.

I did the following:

$p(x) = log_4(x) \rightarrow log_4(x+4) \rightarrow log_4(x+4)+8$

How do I apply the horizontal stretch? I know that a horizontal stretch of factor $5$
becomes must be placed into the function as a factor of $\frac15$ instead. So, should I do this:

$\rightarrow log_4(\frac15(x+4))+8 \rightarrow log_4(\frac15x+\frac45)+8$

or should I do this:

$\rightarrow log_4((\frac15x)+4)+8\rightarrow log_4(\frac15x+4)+8$

I am confused as to which one would be correct, and why?

Best Answer

You just apply the horizontal stretch to the $x$ term so $\log_4\left(\frac15x+4\right)+8$ is correct

As an illustration, in the graph below

  • $y=\log_4\left(x\right)$ is black
  • $y=\log_4\left(x+4\right)$ is pink
  • $y=\log_4\left(x+4\right)+8$ is green
  • $y=\log_4\left(\frac15x+\frac45\right)+8$ is blue
  • $y=\log_4\left(\frac15x+4\right)+8$ is red

and you can see that the point on the green line $(0,9)$ should not get stretched, and so is where the red and green lines cross.

enter image description here

Related Question