3
$\begingroup$

I have been having tremendous success with my students due to the following idea:

expandLog = {Log[x_] + Log[y_] :> Log[x y], n_ Log[x_] :> Log[x^n]}

collectLog = {Log[x_ y_] :> Log[x] + Log[y], Log[x_^n_] :> n Log[x]}

Written on Simplify expressions with Log by RunnyKine. Extremely easy to understand and to explain to the students. However, I've finally encountered a difficulty:

This worked:

enter image description here

But this didn't:

enter image description here

I tried a number of different things, like using the Algebraic Manipulation Palette, highlighting the interior, but none worked.

Any suggestions?

$\endgroup$

1 Answer 1

4
$\begingroup$

You just need to write a general rule that takes a base like this:

logbaserule = {Log[k_, x_] + Log[k_, y_] :> Log[k, x y], n_ Log[k_, x_] :> Log[k, x^n]};

revlogbaserule = {Log[k_, x_ y_] :> Log[k, x] + Log[k, y], Log[k_, x_^n_] :> n Log[k, x]};

Now you can apply to your question:

Log[2, x + Sqrt[x^2 - 1]] + Log[2, x - Sqrt[x^2 - 1]] //. logbaserule // Simplify

0

You can also use FullSimplify with a transformation function to go directly to the final result:

tf[x_] := x /. logbaserule

FullSimplify[Log[2, x + Sqrt[x^2 - 1]] + Log[2, x - Sqrt[x^2 - 1]], 
                 TransformationFunctions -> {Automatic, tf}]

0

$\endgroup$
5
  • $\begingroup$ It is nice as the approach, but why the result is zero? Evaluation Log[2, x + Sqrt[x^2 + 1]] + Log[2, x - Sqrt[x^2 + 1]]/.x->0 yields (I \[Pi])/Log[2], rather than zero. $\endgroup$ Mar 29, 2016 at 7:42
  • $\begingroup$ No, I substituted x->0 above. I mean that the approach is, in principle good, but the answer is wrong. On my machine the application of logbaserule gave me a correct answer, but FullSimplify gave 0. $\endgroup$ Mar 29, 2016 at 8:36
  • $\begingroup$ @AlexeiBoulbitch What do you get when you multiply x + Sqrt[x^2 - 1] by x - Sqrt[x^2 - 1] and Simplify? If you get 1, then Log of 1 should be 0 $\endgroup$
    – RunnyKine
    Mar 29, 2016 at 8:43
  • $\begingroup$ @RunnyKine Thanks for your response. This is quite helpful for my students. $\endgroup$
    – David
    Mar 29, 2016 at 16:41
  • $\begingroup$ @David. You're welcome, glad I could help. $\endgroup$
    – RunnyKine
    Mar 29, 2016 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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