I often deal with problems which I know are real-valued, but Mathematica skips some simplifications because it doesn't know which branch of Sqrt to take. Is there some generic way to tell it to treat all Sqrt (and perhaps other multibranch functions?) that inputs and outputs are real-valued, for the purpose of Simplify?

Motivation -- I was looking to compute $F_\infty(s)$ where $F$ is defined as follows:


This doesn't evaluate in Mathematica, however, a user found that bringing square root inside the product makes it solvable:

1/Sqrt[Product[1 + (2 s)/k^3, {k, 1, \[Infinity]}]] // FullSimplify

$$\frac{1}{\sqrt{\frac{1}{\Gamma \left(1-\sqrt[3]{-2} \sqrt[3]{s}\right) \Gamma \left(\sqrt[3]{2} \sqrt[3]{s}+1\right) \Gamma \left(\frac{i \left(i+\sqrt{3}\right) \sqrt[3]{s}}{2^{2/3}}+1\right)}}}$$

The downside is that FullSimplify doesn't remove the reciprocals. On other hand, manually switching $1/x$ and $\sqrt{x}$ operations lets FullSimplify cancel out the reciprocals (and ToRadicals simplifies it further)

Sqrt[1/Product[1 + (2 s)/k^3, {k, 1, \[Infinity]}]] // FullSimplify // ToRadicals

$$\sqrt{\Gamma \left(1-\sqrt[3]{-2} \sqrt[3]{s}\right) \Gamma \left(\sqrt[3]{2} \sqrt[3]{s}+1\right) \Gamma \left((-1)^{2/3} \sqrt[3]{2} \sqrt[3]{s}+1\right)}$$

  • 2
    $\begingroup$ Product[1/Sqrt[1 + (2 s)/k^3], {k, 1, n}] evaluates fine in version 12.3.1. It gives a horrible answer though, much worse than Product[(1 + (2 s)/k^3)^a, {k, 1, n}] where we can substitute a -> -1/2. $\endgroup$
    – Roman
    Sep 1 at 8:42
  • $\begingroup$ Does Surd[..., 2] help? $\endgroup$
    – murray
    Sep 1 at 19:48
  • $\begingroup$ @murray using Surd doesn't help, it seems to follow same simplification rules as Sqrt $\endgroup$ Sep 2 at 7:34

Try this:

Refine[ToRadicals@FullSimplify[PowerExpand[1/Sqrt[Product[1 + (2 s)/k^3, {k, 1, \[Infinity]}]]], Assumptions -> Element[s, Reals]]]// TraditionalForm

Use Product[1/Sqrt[expr],...] ==Sqrt[Product[1/expr],...]. Than problem of branches doesn't appear.

Sqrt[Product[1/(1 + (2 s)/k^3), {k, 1, \[Infinity]}]] // 
       FullSimplify // ToRadicals

(*   Sqrt[Gamma[1 - (-2)^(1/3) s^(1/3)] Gamma[1 + 2^(1/3) s^(1/3)] Gamma[
     1 + (-1)^(2/3) 2^(1/3) s^(1/3)]]   *)

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.