0
$\begingroup$

Solving in 13.2.1 on Windows 10

Solve[Log[a] + Log[b] == 2 && 1/Log[a] + 1/Log[b] == 3, {Log[a],Log[b]}]

, I obtain

{{Log[a] -> 1/3 (3 - Sqrt[3]), Log[b] -> 1/3 (3 + Sqrt[3])}, {Log[a] -> 1/3 (3 + Sqrt[3]), Log[b] -> 1/3 (3 - Sqrt[3])}}

, but

Solve[Tan[a] + Tan[b] == 2 && 1/Tan[a] + 1/Tan[b] == 3, {Tan[a],Tan[b]}]

{}

and

Reduce[Tan[a] + Tan[b] == 2 && 1/Tan[a] + 1/Tan[b] == 3, {Tan[a], Tan[b]}]

Cot[a] == 3 - Cot[b] && Tan[b] == 2 - Tan[a]

The question arises: why Solve and Reduce badly handle it?

Addition.Here is an example of such type question, where unknowns are functions.

$\endgroup$
11
  • 5
    $\begingroup$ To confirm, the “bugs” tag is not appropriate for this thread. $\endgroup$ May 16, 2023 at 14:11
  • 4
    $\begingroup$ You don't have a good track record in this arena. Sorry. As for the design decisions of what to allow or not allow for Solve variable names, they remains in flux. This won't tip the needle though. $\endgroup$ May 16, 2023 at 15:11
  • 5
    $\begingroup$ One argument is that you've filed a few hundred bug reports, virtually none of which have anything beyond middle priority, with the majority being lower. So there is reason based on long-standing evidence to not take seriously an assertion on your part that something like this is a bug. $\endgroup$ May 16, 2023 at 15:22
  • 1
    $\begingroup$ Yes, I think it's correct for the way Solve works. Solve looks for explicit occurrences of f[x] when you use compound solution variables and in your case 1/Tan[a] evaluates away. That's how it's supposed to work. $\endgroup$ May 17, 2023 at 10:21
  • 1
    $\begingroup$ Please read the documentation for Solve carefully and thouroughly, and show us an example where Log[a] or Tan[a] or anything else than a pure symbol (like x or y) is used as vars in the second argument. There is no example of such usage. Therefore, it is not the result that is wrong, you are using Solve wrongly. Just because it somehow happens to work for Log[a], there is no guarantee it will work for Tan[a] because this is not a documented feature. $\endgroup$
    – Domen
    May 17, 2023 at 12:34

1 Answer 1

13
$\begingroup$

Use Trace[Solve[...], TraceInternal -> True] to observe the difference between cases with Tan and Log. You will see that 1/Tan[a] gets converted to Cot[a] before any solving methods are applied while 1/Log[a] remains intact.

Use SetSystemOptions["SimplificationOptions" -> "AutosimplifyTrigs" -> False] to prevent this and get the results.

SetSystemOptions["SimplificationOptions" -> "AutosimplifyTrigs" -> False];

Solve[Tan[a] + Tan[b] == 2 && 1/Tan[a] + 1/Tan[b] == 3, {Tan[a],Tan[b]}]

(* {{Tan[a] -> 1/3 (3 - Sqrt[3]), Tan[b] -> 1/3 (3 + Sqrt[3])}, 
    {Tan[a] -> 1/3 (3 + Sqrt[3]), Tan[b] -> 1/3 (3 - Sqrt[3])}} *)
$\endgroup$
1
  • $\begingroup$ Thank you. Therefore, this is an unfinished work of Mathematica developers. $\endgroup$
    – user64494
    May 16, 2023 at 13:29

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