Mark asked in Science & MathematicsMathematics · 2 months ago

# why do these equations graph differently?

y = 2log(base2)(x-3) -4 and log(base2)(x-3)^2 - 4 graph differently even though based on the laws of logarithms, they should be equivalent functions.

Update:

I meant to put a "y =" in front of the second function.

Relevance
• 2 months ago

Sounds like you may need to be specific about what is squared.

log₂(x - 3)² may be interpreted as doing the log first then squaring the result.

You want to make sure it's log₂[(x - 3)²] so the value is squared first then the log is applied.

I set up three graphs, the first two like you did (red and blue), and the third the way I set it up with the additional set of parenthesis (green).

Part of the green line appears gray as that's where it's overlapping with the red line.  The green version also includes more values when x is less than 3 since we are squaring it we never try to take the log of a negative number.

So that's what this is doing.  It's getting the square of the log and not the log of the square like you want.

• 2 months ago

The log rule you are using is:

log a^b = b log a for a > 0

People often forget about the a > 0 part.

y = 2 log(x-3) - 4 and y = log (x-3)^2 - 4 are not the same unless the domain is restricted to  x > 3 or some subset of that interval.   When x is less than 3, you get a negative number for x-3 and the log rule doesn't apply.

• ?
Lv 7
2 months ago

It probably the order of operations. In the second one, make sure to square it before you take the log.

• 2 months ago

depends on where you put your parans... this is ambiguous.

log₂((x-3)²) – 4

that is the same as 2log₂(x-3) – 4

and they will graph the same.

but log₂((x-3)²) – 4

is NOT the same as

(log₂(x-3))² – 4

you are probably missing or misusing parans.