1
$\begingroup$

This question was initially (wrongfully) posted on Mathematics SE.

I have the following expression:

$$ \sqrt{1 + 10^{\frac{rdb}{10}} + 2^{1 + \frac{rdb}{20}} 5^{\frac{rdb}{20}} \cos(\mathrm{pdiff})} $$

when applying FullSimplify (or Simplify) to this function, Mathematica yields $$ \sqrt{1 + 10^{\frac{rdb}{10}} + 10^{\frac{rdb}{20}} \csc(\mathrm{pdiff}) \sin(\mathrm{pdiff})} $$

Screenshot from Mathematica:

Screenshot

This simplification does change the domain on which the function is defined, all multiples of $\pi$ are now excluded from the set of allowed values of $\mathrm{pdiff}$.

In my opinion, Mathematica is wrong in that case. Am I right?

$\endgroup$
  • 1
    $\begingroup$ By design those functions produce results that are generically correct. $\endgroup$ – Daniel Lichtblau May 11 at 15:58
2
$\begingroup$
expr = Sqrt[1 + 10^(rdb/10) + 2^(1 + rdb/20) 5^(rdb/20) Cos[pdiff]];

fd = FunctionDomain[expr, {rdb, pdiff}]

(* 10^(rdb/10) + 2^(1 + rdb/20) 5^(rdb/20) Cos[pdiff] >= -1 *)

As you stated, Simplify or FullSimplify change the domain

exprs = expr // Simplify

(* Sqrt[1 + 10^(rdb/10) + 10^(rdb/20) Csc[pdiff] Sin[2 pdiff]] *)

FunctionDomain[exprs, {rdb, pdiff}]

(* pdiff/π ∉ Integers && 
 10^(rdb/10) + 10^(rdb/20) Csc[pdiff] Sin[2 pdiff] >= -1 *)

This can be avoided by setting the Trig option to False in Simplify or FullSimplify

exprs2 = expr // Simplify[#, Trig -> False] &

(* Sqrt[1 + 10^(rdb/10) + 2^(1 + rdb/20) 5^(rdb/20) Cos[pdiff]] *)

In this case, no simplification occurs and the domains are identical

expr === exprs2 && fd === FunctionDomain[exprs2, {rdb, pdiff}]

(* True *)
| improve this answer | |
$\endgroup$

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.