39
$\begingroup$

First of all, I am sorry if this is a question too simple or stupid.

Consider the equation:

$$ \log((x+2)^2) = 2 \log(5) $$

If I apply the logarithm law $ \log_a(b^c) = c \log_a(b) $

$$ \begin{align} 2 \log(x+2) & = 2 \log(5) \\ \log(x+2) &= \log(5) \\ x+2 &= 5 \\ x &= 3 \end{align} $$

But I can see that I am missing a solution, $x = -7$. I noticed that

$$ \begin{align} \log((x+2)^2) &= 2 \log(5) \\ \Updownarrow \\ 2 \log(x+2) &= 2 \log(5) \end{align} $$

Is NOT true. The domain of the first equation is $x \in \mathbb{R}$ but the second equation's is $x \geq -2$.

I know the correct solution.


So I understand that this is not an equivalent transformation of the equation. What I don't know is how I should avoid this. Is there something to keep in mind that would help me evade this mistake? Naturally, I wouldn't have noticed the missing solution, unless I checked the domain of the second equation, which I wouldn't really have had a reason for...

$\endgroup$
  • 15
    $\begingroup$ $$\log(x^2)\equiv 2\log|x|$$ $\endgroup$ – projectilemotion Jun 7 '17 at 18:56
  • 3
    $\begingroup$ $\log(x^2) = 2 \log |x|$...no? $\endgroup$ – the_candyman Jun 7 '17 at 18:57
  • 7
    $\begingroup$ There is no such thing as a stupid question, only stupid answers. Other than that a typo; the domain of the second equation is $x\geq -2$ not $x\geq 2$. $\endgroup$ – kingW3 Jun 7 '17 at 19:06
  • 7
    $\begingroup$ You should generally get into the habit of explicitly writing down, whether you went from one equation $A$ to $B$ by equivalence ($A\iff B$) or by implication ($A \implies B$). Apart from that, I think it would be ill-advised to follow specific rules on how to avoid these kinds of mistakes. There are so many different situations; the only thing you can do is stay focused and every now and then stop yourself from mechanically jotting down proofs to convince yourself about the meaning behind the symbols you have written thus far (what implicit assumptions have you used? Are they true?). $\endgroup$ – polynomial_donut Jun 7 '17 at 19:17
  • 1
    $\begingroup$ silly and stupid questions are still okay, though. the point is to learn. and someone who refuses to answer a question because they think it is stupid is a jerk. why not help someone? $\endgroup$ – The Count Jun 7 '17 at 23:28
45
$\begingroup$

The formula $$\log_a b^c = c \log_a b$$ is true only if $b > 0$ (if we assume that $\log_a$ is a real-valued function). Therefore, an alternative method of solution can proceed as follows: $$\log (x+2)^2 = 2 \log 5 = \log 5^2 = \log 25,$$ and because now all the arguments to $\log$ on both sides must be positive, we have $$(x+2)^2 = 25$$ or $$(x+2-5)(x+2+5) = (x-3)(x+7) = 0,$$ and both solutions are found.

$\endgroup$
  • 3
    $\begingroup$ I think a large chunk of this answer is superfluous, as I have mentioned in the question that I knew the correct solution. Nevertheless, thank you. $\endgroup$ – bertalanp99 Jun 7 '17 at 20:39
  • 28
    $\begingroup$ @bertalanp99 The subtlety lies in how I handle the computation in a way that avoids the loss of valid solutions to the equation, and this choice is directly informed by understanding when particular algebraic manipulations are valid. Your question, which asks how you can avoid the loss of valid solutions, is therefore answered in a broad sense by addressing the fact that one must carefully consider the impact of manipulating expressions and functions with respect to their domains and codomains. $\endgroup$ – heropup Jun 7 '17 at 20:59
23
$\begingroup$

Rule of thumb when dealing with squares (even powers) if you don't have an absolute value you're most likely missing it.

Here as written in comments $\ln(x^2)=2\ln(|x|)$ because as you said their domains must be the same. This is because $\ln(ab)=\ln a+\ln b$ only if $a,b>0$.

Another example is that $\sqrt{x^2}=|x|$.

$\endgroup$
10
$\begingroup$

Congratulations on understanding why the other solution exists and why you missed it.

How to avoid this:

Whenever you see a real number squared, or raised to any even power, (make sure it's not a complex number that you're dealing with!), perform the following substitution:

$$x^2 \iff |x|^2$$

Note that both expressions are always equal (in real numbers), so it is 100% correct to make this substitution at any time.

Only then, perform your rules.

In other words, never "take the square out" unless it's surrounded by the absolute-value function.

In your example, $(x+2)^2$ would first become $|x+2|^2$, and only then you should proceed as you did, and this way you wouldn't miss any solutions.

$\endgroup$
  • 2
    $\begingroup$ This helps avoid this particular mistake, but I think the best long-term strategy is to know when your manipulations apply, know the domains of functions, etc. This will help someone not make any errors whether or not they know off the top of their head that for real $x$ we have $\sqrt{x^2}=|x|$. $\endgroup$ – Mark S. Jun 8 '17 at 12:38
  • $\begingroup$ @MarkS. I agree! I wrote this answer as an addition to the other answers. I agree that in a broader sense, the key is to pay attention to domains and other implicit assuptions that one is making when performing some algebraic "rules" or "laws". I just wanted to help further with something more concrete than simply "pay attention". But yes, I agree with you! $\endgroup$ – Pedro A Jun 8 '17 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.