Toniolo and Linder, Equation (3a)

Percentage Accurate: 98.2% → 100.0%
Time: 17.0s
Alternatives: 6
Speedup: TODO×

Specification

?
\[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]

Your Program's Arguments

Results

Enter valid numbers for all inputs

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 6 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Alternative 1?

\[\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}} \]
Derivation
  1. Initial program 97.6%

    \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
  2. Step-by-step derivation
    1. distribute-rgt-in97.6%

      \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
    2. metadata-eval97.6%

      \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    3. metadata-eval97.6%

      \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    4. associate-/l*97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    5. metadata-eval97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
  4. Step-by-step derivation
    1. expm1-log1p-u97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}\right)\right)}} \cdot 0.5} \]
    2. expm1-udef97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}\right)} - 1}} \cdot 0.5} \]
  5. Applied egg-rr100.0%

    \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)\right)} - 1}} \cdot 0.5} \]
  6. Step-by-step derivation
    1. expm1-def100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)\right)\right)}} \cdot 0.5} \]
    2. expm1-log1p100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}} \cdot 0.5} \]
    3. *-commutative100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\mathsf{hypot}\left(\sin kx, \sin ky\right) \cdot \left(2 \cdot \frac{\ell}{Om}\right)}\right)} \cdot 0.5} \]
    4. hypot-def98.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\sin kx \cdot \sin kx + \sin ky \cdot \sin ky}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
    5. unpow298.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin kx}^{2}} + \sin ky \cdot \sin ky} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
    6. unpow298.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{{\sin kx}^{2} + \color{blue}{{\sin ky}^{2}}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
    7. +-commutative98.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
    8. unpow298.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\sin ky \cdot \sin ky} + {\sin kx}^{2}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
    9. unpow298.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\sin ky \cdot \sin ky + \color{blue}{\sin kx \cdot \sin kx}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
    10. hypot-def100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
    11. *-commutative100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot 2\right)}\right)} \cdot 0.5} \]
    12. associate-*l/100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \color{blue}{\frac{\ell \cdot 2}{Om}}\right)} \cdot 0.5} \]
    13. associate-*r/100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \color{blue}{\left(\ell \cdot \frac{2}{Om}\right)}\right)} \cdot 0.5} \]
  7. Simplified100.0%

    \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}} \cdot 0.5} \]
  8. Final simplification100.0%

    \[\leadsto \sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}} \]

Alternative 2?

\[\begin{array}{l} \mathbf{if}\;ky \leq 5 \cdot 10^{-136}:\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{2 \cdot \left(\sin ky \cdot \ell\right)}{Om}\right)}}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if ky < 5.0000000000000002e-136

    1. Initial program 96.3%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Step-by-step derivation
      1. distribute-rgt-in96.3%

        \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
      2. metadata-eval96.3%

        \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      3. metadata-eval96.3%

        \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      4. associate-/l*96.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      5. metadata-eval96.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Simplified96.3%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
    4. Taylor expanded in ky around 0 72.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{4 \cdot \frac{{\sin kx}^{2} \cdot {\ell}^{2}}{{Om}^{2}}}}} \cdot 0.5} \]
    5. Step-by-step derivation
      1. associate-/l*72.8%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + 4 \cdot \color{blue}{\frac{{\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
      2. associate-*r/72.8%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
      3. unpow272.8%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{\color{blue}{Om \cdot Om}}{{\ell}^{2}}}}} \cdot 0.5} \]
      4. unpow272.8%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{Om \cdot Om}{\color{blue}{\ell \cdot \ell}}}}} \cdot 0.5} \]
      5. times-frac87.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\color{blue}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
    6. Simplified87.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt87.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}} \cdot \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}}} \cdot 0.5} \]
      2. hypot-1-def87.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)}} \cdot 0.5} \]
      3. div-inv86.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\left(4 \cdot {\sin kx}^{2}\right) \cdot \frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
      4. sqrt-prod86.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{4 \cdot {\sin kx}^{2}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
      5. *-commutative86.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin kx}^{2} \cdot 4}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      6. sqrt-prod86.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{{\sin kx}^{2}} \cdot \sqrt{4}\right)} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      7. unpow286.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sqrt{\color{blue}{\sin kx \cdot \sin kx}} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      8. sqrt-prod48.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\left(\sqrt{\sin kx} \cdot \sqrt{\sin kx}\right)} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      9. add-sqr-sqrt96.6%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\sin kx} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      10. metadata-eval96.6%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot \color{blue}{2}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      11. metadata-eval96.6%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\color{blue}{1 \cdot 1}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      12. frac-times96.6%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{1}{\frac{Om}{\ell}} \cdot \frac{1}{\frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
      13. clear-num96.6%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{\ell}{Om}} \cdot \frac{1}{\frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      14. clear-num96.6%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\ell}{Om} \cdot \color{blue}{\frac{\ell}{Om}}}\right)} \cdot 0.5} \]
    8. Applied egg-rr96.7%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}} \cdot 0.5} \]
    9. Step-by-step derivation
      1. expm1-log1p-u96.7%

        \[\leadsto \sqrt{0.5 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)} \cdot 0.5\right)\right)}} \]
      2. expm1-udef96.7%

        \[\leadsto \sqrt{0.5 + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)} \cdot 0.5\right)} - 1\right)}} \]
      3. associate-*l/96.7%

        \[\leadsto \sqrt{0.5 + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1 \cdot 0.5}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}}\right)} - 1\right)} \]
      4. metadata-eval96.7%

        \[\leadsto \sqrt{0.5 + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{0.5}}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}\right)} - 1\right)} \]
      5. associate-*l*96.7%

        \[\leadsto \sqrt{0.5 + \left(e^{\mathsf{log1p}\left(\frac{0.5}{\mathsf{hypot}\left(1, \color{blue}{\sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)}\right)}\right)} - 1\right)} \]
    10. Applied egg-rr96.7%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{0.5}{\mathsf{hypot}\left(1, \sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\right)} - 1\right)}} \]
    11. Step-by-step derivation
      1. expm1-def96.7%

        \[\leadsto \sqrt{0.5 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{0.5}{\mathsf{hypot}\left(1, \sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\right)\right)}} \]
      2. expm1-log1p96.7%

        \[\leadsto \sqrt{0.5 + \color{blue}{\frac{0.5}{\mathsf{hypot}\left(1, \sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}}} \]
      3. associate-*r*96.7%

        \[\leadsto \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \color{blue}{\left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}}\right)}} \]
      4. *-commutative96.7%

        \[\leadsto \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \color{blue}{\left(2 \cdot \sin kx\right)} \cdot \frac{\ell}{Om}\right)}} \]
    12. Simplified96.7%

      \[\leadsto \sqrt{0.5 + \color{blue}{\frac{0.5}{\mathsf{hypot}\left(1, \left(2 \cdot \sin kx\right) \cdot \frac{\ell}{Om}\right)}}} \]

    if 5.0000000000000002e-136 < ky

    1. Initial program 100.0%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Step-by-step derivation
      1. distribute-rgt-in100.0%

        \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
      2. metadata-eval100.0%

        \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      3. metadata-eval100.0%

        \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      4. associate-/l*100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      5. metadata-eval100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
    4. Step-by-step derivation
      1. expm1-log1p-u100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}\right)\right)}} \cdot 0.5} \]
      2. expm1-udef100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}\right)} - 1}} \cdot 0.5} \]
    5. Applied egg-rr100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)\right)} - 1}} \cdot 0.5} \]
    6. Step-by-step derivation
      1. expm1-def100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)\right)\right)}} \cdot 0.5} \]
      2. expm1-log1p100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(2 \cdot \frac{\ell}{Om}\right) \cdot \mathsf{hypot}\left(\sin kx, \sin ky\right)\right)}} \cdot 0.5} \]
      3. *-commutative100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\mathsf{hypot}\left(\sin kx, \sin ky\right) \cdot \left(2 \cdot \frac{\ell}{Om}\right)}\right)} \cdot 0.5} \]
      4. hypot-def100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{\sin kx \cdot \sin kx + \sin ky \cdot \sin ky}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
      5. unpow2100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin kx}^{2}} + \sin ky \cdot \sin ky} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
      6. unpow2100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{{\sin kx}^{2} + \color{blue}{{\sin ky}^{2}}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
      7. +-commutative100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin ky}^{2} + {\sin kx}^{2}}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
      8. unpow2100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\sin ky \cdot \sin ky} + {\sin kx}^{2}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
      9. unpow2100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\sin ky \cdot \sin ky + \color{blue}{\sin kx \cdot \sin kx}} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
      10. hypot-def100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)} \cdot 0.5} \]
      11. *-commutative100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot 2\right)}\right)} \cdot 0.5} \]
      12. associate-*l/100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \color{blue}{\frac{\ell \cdot 2}{Om}}\right)} \cdot 0.5} \]
      13. associate-*r/100.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \color{blue}{\left(\ell \cdot \frac{2}{Om}\right)}\right)} \cdot 0.5} \]
    7. Simplified100.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}} \cdot 0.5} \]
    8. Taylor expanded in kx around 0 96.8%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{2 \cdot \frac{\ell \cdot \sin ky}{Om}}\right)} \cdot 0.5} \]
    9. Step-by-step derivation
      1. associate-*r/96.8%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{2 \cdot \left(\ell \cdot \sin ky\right)}{Om}}\right)} \cdot 0.5} \]
    10. Simplified96.8%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\frac{2 \cdot \left(\ell \cdot \sin ky\right)}{Om}}\right)} \cdot 0.5} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;ky \leq 5 \cdot 10^{-136}:\\ \;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{2 \cdot \left(\sin ky \cdot \ell\right)}{Om}\right)}}\\ \end{array} \]

Alternative 3?

\[\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}} \]
Derivation
  1. Initial program 97.6%

    \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
  2. Step-by-step derivation
    1. distribute-rgt-in97.6%

      \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
    2. metadata-eval97.6%

      \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    3. metadata-eval97.6%

      \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    4. associate-/l*97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    5. metadata-eval97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
  4. Taylor expanded in ky around 0 75.1%

    \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{4 \cdot \frac{{\sin kx}^{2} \cdot {\ell}^{2}}{{Om}^{2}}}}} \cdot 0.5} \]
  5. Step-by-step derivation
    1. associate-/l*75.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + 4 \cdot \color{blue}{\frac{{\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
    2. associate-*r/75.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
    3. unpow275.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{\color{blue}{Om \cdot Om}}{{\ell}^{2}}}}} \cdot 0.5} \]
    4. unpow275.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{Om \cdot Om}{\color{blue}{\ell \cdot \ell}}}}} \cdot 0.5} \]
    5. times-frac88.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\color{blue}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
  6. Simplified88.3%

    \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
  7. Step-by-step derivation
    1. add-sqr-sqrt88.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}} \cdot \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}}} \cdot 0.5} \]
    2. hypot-1-def88.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)}} \cdot 0.5} \]
    3. div-inv87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\left(4 \cdot {\sin kx}^{2}\right) \cdot \frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
    4. sqrt-prod87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{4 \cdot {\sin kx}^{2}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
    5. *-commutative87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin kx}^{2} \cdot 4}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    6. sqrt-prod87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{{\sin kx}^{2}} \cdot \sqrt{4}\right)} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    7. unpow287.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sqrt{\color{blue}{\sin kx \cdot \sin kx}} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    8. sqrt-prod48.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\left(\sqrt{\sin kx} \cdot \sqrt{\sin kx}\right)} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    9. add-sqr-sqrt95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\sin kx} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    10. metadata-eval95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot \color{blue}{2}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    11. metadata-eval95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\color{blue}{1 \cdot 1}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    12. frac-times95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{1}{\frac{Om}{\ell}} \cdot \frac{1}{\frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
    13. clear-num95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{\ell}{Om}} \cdot \frac{1}{\frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    14. clear-num95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\ell}{Om} \cdot \color{blue}{\frac{\ell}{Om}}}\right)} \cdot 0.5} \]
  8. Applied egg-rr95.3%

    \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}} \cdot 0.5} \]
  9. Step-by-step derivation
    1. expm1-log1p-u95.3%

      \[\leadsto \sqrt{0.5 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)} \cdot 0.5\right)\right)}} \]
    2. expm1-udef95.3%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)} \cdot 0.5\right)} - 1\right)}} \]
    3. associate-*l/95.3%

      \[\leadsto \sqrt{0.5 + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1 \cdot 0.5}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}}\right)} - 1\right)} \]
    4. metadata-eval95.3%

      \[\leadsto \sqrt{0.5 + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{0.5}}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}\right)} - 1\right)} \]
    5. associate-*l*95.3%

      \[\leadsto \sqrt{0.5 + \left(e^{\mathsf{log1p}\left(\frac{0.5}{\mathsf{hypot}\left(1, \color{blue}{\sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)}\right)}\right)} - 1\right)} \]
  10. Applied egg-rr95.3%

    \[\leadsto \sqrt{0.5 + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{0.5}{\mathsf{hypot}\left(1, \sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\right)} - 1\right)}} \]
  11. Step-by-step derivation
    1. expm1-def95.3%

      \[\leadsto \sqrt{0.5 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{0.5}{\mathsf{hypot}\left(1, \sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\right)\right)}} \]
    2. expm1-log1p95.3%

      \[\leadsto \sqrt{0.5 + \color{blue}{\frac{0.5}{\mathsf{hypot}\left(1, \sin kx \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}}} \]
    3. associate-*r*95.3%

      \[\leadsto \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \color{blue}{\left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}}\right)}} \]
    4. *-commutative95.3%

      \[\leadsto \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \color{blue}{\left(2 \cdot \sin kx\right)} \cdot \frac{\ell}{Om}\right)}} \]
  12. Simplified95.3%

    \[\leadsto \sqrt{0.5 + \color{blue}{\frac{0.5}{\mathsf{hypot}\left(1, \left(2 \cdot \sin kx\right) \cdot \frac{\ell}{Om}\right)}}} \]
  13. Final simplification95.3%

    \[\leadsto \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}} \]

Alternative 4?

\[\sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\ell}{Om} \cdot \left(kx \cdot 2\right)\right)}} \]
Derivation
  1. Initial program 97.6%

    \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
  2. Step-by-step derivation
    1. distribute-rgt-in97.6%

      \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
    2. metadata-eval97.6%

      \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    3. metadata-eval97.6%

      \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    4. associate-/l*97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    5. metadata-eval97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
  4. Taylor expanded in ky around 0 75.1%

    \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{4 \cdot \frac{{\sin kx}^{2} \cdot {\ell}^{2}}{{Om}^{2}}}}} \cdot 0.5} \]
  5. Step-by-step derivation
    1. associate-/l*75.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + 4 \cdot \color{blue}{\frac{{\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
    2. associate-*r/75.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
    3. unpow275.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{\color{blue}{Om \cdot Om}}{{\ell}^{2}}}}} \cdot 0.5} \]
    4. unpow275.5%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{Om \cdot Om}{\color{blue}{\ell \cdot \ell}}}}} \cdot 0.5} \]
    5. times-frac88.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\color{blue}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
  6. Simplified88.3%

    \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
  7. Step-by-step derivation
    1. add-sqr-sqrt88.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}} \cdot \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}}} \cdot 0.5} \]
    2. hypot-1-def88.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)}} \cdot 0.5} \]
    3. div-inv87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\left(4 \cdot {\sin kx}^{2}\right) \cdot \frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
    4. sqrt-prod87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{4 \cdot {\sin kx}^{2}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
    5. *-commutative87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin kx}^{2} \cdot 4}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    6. sqrt-prod87.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{{\sin kx}^{2}} \cdot \sqrt{4}\right)} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    7. unpow287.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sqrt{\color{blue}{\sin kx \cdot \sin kx}} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    8. sqrt-prod48.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\left(\sqrt{\sin kx} \cdot \sqrt{\sin kx}\right)} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    9. add-sqr-sqrt95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\sin kx} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    10. metadata-eval95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot \color{blue}{2}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    11. metadata-eval95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\color{blue}{1 \cdot 1}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    12. frac-times95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{1}{\frac{Om}{\ell}} \cdot \frac{1}{\frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
    13. clear-num95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{\ell}{Om}} \cdot \frac{1}{\frac{Om}{\ell}}}\right)} \cdot 0.5} \]
    14. clear-num95.9%

      \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\ell}{Om} \cdot \color{blue}{\frac{\ell}{Om}}}\right)} \cdot 0.5} \]
  8. Applied egg-rr95.3%

    \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}} \cdot 0.5} \]
  9. Taylor expanded in kx around 0 86.9%

    \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{kx} \cdot 2\right) \cdot \frac{\ell}{Om}\right)} \cdot 0.5} \]
  10. Final simplification86.9%

    \[\leadsto \sqrt{0.5 + 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{\ell}{Om} \cdot \left(kx \cdot 2\right)\right)}} \]

Alternative 5?

\[\begin{array}{l} \mathbf{if}\;Om \leq -5 \cdot 10^{-70}:\\ \;\;\;\;1\\ \mathbf{elif}\;Om \leq 6.6 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if Om < -4.9999999999999998e-70 or 6.59999999999999985e31 < Om

    1. Initial program 98.3%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Step-by-step derivation
      1. distribute-rgt-in98.3%

        \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
      2. metadata-eval98.3%

        \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      3. metadata-eval98.3%

        \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      4. associate-/l*98.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      5. metadata-eval98.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Simplified98.3%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
    4. Taylor expanded in ky around 0 82.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{4 \cdot \frac{{\sin kx}^{2} \cdot {\ell}^{2}}{{Om}^{2}}}}} \cdot 0.5} \]
    5. Step-by-step derivation
      1. associate-/l*82.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + 4 \cdot \color{blue}{\frac{{\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
      2. associate-*r/82.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{{Om}^{2}}{{\ell}^{2}}}}}} \cdot 0.5} \]
      3. unpow282.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{\color{blue}{Om \cdot Om}}{{\ell}^{2}}}}} \cdot 0.5} \]
      4. unpow282.3%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\frac{Om \cdot Om}{\color{blue}{\ell \cdot \ell}}}}} \cdot 0.5} \]
      5. times-frac95.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \frac{4 \cdot {\sin kx}^{2}}{\color{blue}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
    6. Simplified95.4%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}} \cdot 0.5} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt95.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + \color{blue}{\sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}} \cdot \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}}} \cdot 0.5} \]
      2. hypot-1-def95.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{\frac{4 \cdot {\sin kx}^{2}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)}} \cdot 0.5} \]
      3. div-inv94.5%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\left(4 \cdot {\sin kx}^{2}\right) \cdot \frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
      4. sqrt-prod94.5%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{4 \cdot {\sin kx}^{2}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
      5. *-commutative94.5%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\sin kx}^{2} \cdot 4}} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      6. sqrt-prod94.5%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{{\sin kx}^{2}} \cdot \sqrt{4}\right)} \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      7. unpow294.5%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sqrt{\color{blue}{\sin kx \cdot \sin kx}} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      8. sqrt-prod45.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\left(\sqrt{\sin kx} \cdot \sqrt{\sin kx}\right)} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      9. add-sqr-sqrt95.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\color{blue}{\sin kx} \cdot \sqrt{4}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      10. metadata-eval95.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot \color{blue}{2}\right) \cdot \sqrt{\frac{1}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      11. metadata-eval95.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\color{blue}{1 \cdot 1}}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      12. frac-times95.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{1}{\frac{Om}{\ell}} \cdot \frac{1}{\frac{Om}{\ell}}}}\right)} \cdot 0.5} \]
      13. clear-num95.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\color{blue}{\frac{\ell}{Om}} \cdot \frac{1}{\frac{Om}{\ell}}}\right)} \cdot 0.5} \]
      14. clear-num95.7%

        \[\leadsto \sqrt{0.5 + \frac{1}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \sqrt{\frac{\ell}{Om} \cdot \color{blue}{\frac{\ell}{Om}}}\right)} \cdot 0.5} \]
    8. Applied egg-rr97.0%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(1, \left(\sin kx \cdot 2\right) \cdot \frac{\ell}{Om}\right)}} \cdot 0.5} \]
    9. Taylor expanded in kx around 0 85.0%

      \[\leadsto \sqrt{0.5 + \color{blue}{0.5}} \]

    if -4.9999999999999998e-70 < Om < 6.59999999999999985e31

    1. Initial program 97.0%

      \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
    2. Step-by-step derivation
      1. distribute-rgt-in97.0%

        \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
      2. metadata-eval97.0%

        \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      3. metadata-eval97.0%

        \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      4. associate-/l*97.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
      5. metadata-eval97.0%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
    3. Simplified97.0%

      \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
    4. Taylor expanded in l around -inf 73.4%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{-2 \cdot \left(\sqrt{{\sin ky}^{2} + {\sin kx}^{2}} \cdot \frac{\ell}{Om}\right)}} \cdot 0.5} \]
    5. Step-by-step derivation
      1. *-commutative73.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\left(\sqrt{{\sin ky}^{2} + {\sin kx}^{2}} \cdot \frac{\ell}{Om}\right) \cdot -2}} \cdot 0.5} \]
      2. associate-*l*73.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\sqrt{{\sin ky}^{2} + {\sin kx}^{2}} \cdot \left(\frac{\ell}{Om} \cdot -2\right)}} \cdot 0.5} \]
      3. unpow273.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{\color{blue}{\sin ky \cdot \sin ky} + {\sin kx}^{2}} \cdot \left(\frac{\ell}{Om} \cdot -2\right)} \cdot 0.5} \]
      4. unpow273.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{\sin ky \cdot \sin ky + \color{blue}{\sin kx \cdot \sin kx}} \cdot \left(\frac{\ell}{Om} \cdot -2\right)} \cdot 0.5} \]
      5. hypot-def76.4%

        \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \left(\frac{\ell}{Om} \cdot -2\right)} \cdot 0.5} \]
    6. Simplified76.4%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \left(\frac{\ell}{Om} \cdot -2\right)}} \cdot 0.5} \]
    7. Taylor expanded in ky around 0 69.3%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(-0.5 \cdot \frac{Om}{\ell \cdot \sin kx}\right)} \cdot 0.5} \]
    8. Step-by-step derivation
      1. *-commutative69.3%

        \[\leadsto \sqrt{0.5 + \left(-0.5 \cdot \frac{Om}{\color{blue}{\sin kx \cdot \ell}}\right) \cdot 0.5} \]
      2. associate-/r*69.3%

        \[\leadsto \sqrt{0.5 + \left(-0.5 \cdot \color{blue}{\frac{\frac{Om}{\sin kx}}{\ell}}\right) \cdot 0.5} \]
    9. Simplified69.3%

      \[\leadsto \sqrt{0.5 + \color{blue}{\left(-0.5 \cdot \frac{\frac{Om}{\sin kx}}{\ell}\right)} \cdot 0.5} \]
    10. Taylor expanded in Om around 0 80.0%

      \[\leadsto \color{blue}{\sqrt{0.5}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -5 \cdot 10^{-70}:\\ \;\;\;\;1\\ \mathbf{elif}\;Om \leq 6.6 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 6?

\[\sqrt{0.5} \]
Derivation
  1. Initial program 97.6%

    \[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)} \]
  2. Step-by-step derivation
    1. distribute-rgt-in97.6%

      \[\leadsto \sqrt{\color{blue}{1 \cdot \frac{1}{2} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}}} \]
    2. metadata-eval97.6%

      \[\leadsto \sqrt{1 \cdot \color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    3. metadata-eval97.6%

      \[\leadsto \sqrt{\color{blue}{0.5} + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    4. associate-/l*97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\color{blue}{\left(\frac{2}{\frac{Om}{\ell}}\right)}}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \frac{1}{2}} \]
    5. metadata-eval97.6%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot \color{blue}{0.5}} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{\sqrt{0.5 + \frac{1}{\sqrt{1 + {\left(\frac{2}{\frac{Om}{\ell}}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}} \cdot 0.5}} \]
  4. Taylor expanded in l around -inf 47.7%

    \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{-2 \cdot \left(\sqrt{{\sin ky}^{2} + {\sin kx}^{2}} \cdot \frac{\ell}{Om}\right)}} \cdot 0.5} \]
  5. Step-by-step derivation
    1. *-commutative47.7%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\left(\sqrt{{\sin ky}^{2} + {\sin kx}^{2}} \cdot \frac{\ell}{Om}\right) \cdot -2}} \cdot 0.5} \]
    2. associate-*l*47.7%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\sqrt{{\sin ky}^{2} + {\sin kx}^{2}} \cdot \left(\frac{\ell}{Om} \cdot -2\right)}} \cdot 0.5} \]
    3. unpow247.7%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{\color{blue}{\sin ky \cdot \sin ky} + {\sin kx}^{2}} \cdot \left(\frac{\ell}{Om} \cdot -2\right)} \cdot 0.5} \]
    4. unpow247.7%

      \[\leadsto \sqrt{0.5 + \frac{1}{\sqrt{\sin ky \cdot \sin ky + \color{blue}{\sin kx \cdot \sin kx}} \cdot \left(\frac{\ell}{Om} \cdot -2\right)} \cdot 0.5} \]
    5. hypot-def49.3%

      \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \left(\frac{\ell}{Om} \cdot -2\right)} \cdot 0.5} \]
  6. Simplified49.3%

    \[\leadsto \sqrt{0.5 + \frac{1}{\color{blue}{\mathsf{hypot}\left(\sin ky, \sin kx\right) \cdot \left(\frac{\ell}{Om} \cdot -2\right)}} \cdot 0.5} \]
  7. Taylor expanded in ky around 0 44.3%

    \[\leadsto \sqrt{0.5 + \color{blue}{\left(-0.5 \cdot \frac{Om}{\ell \cdot \sin kx}\right)} \cdot 0.5} \]
  8. Step-by-step derivation
    1. *-commutative44.3%

      \[\leadsto \sqrt{0.5 + \left(-0.5 \cdot \frac{Om}{\color{blue}{\sin kx \cdot \ell}}\right) \cdot 0.5} \]
    2. associate-/r*44.3%

      \[\leadsto \sqrt{0.5 + \left(-0.5 \cdot \color{blue}{\frac{\frac{Om}{\sin kx}}{\ell}}\right) \cdot 0.5} \]
  9. Simplified44.3%

    \[\leadsto \sqrt{0.5 + \color{blue}{\left(-0.5 \cdot \frac{\frac{Om}{\sin kx}}{\ell}\right)} \cdot 0.5} \]
  10. Taylor expanded in Om around 0 57.9%

    \[\leadsto \color{blue}{\sqrt{0.5}} \]
  11. Final simplification57.9%

    \[\leadsto \sqrt{0.5} \]

Reproduce

?
herbie shell --seed 2023166 
(FPCore (l Om kx ky)
  :name "Toniolo and Linder, Equation (3a)"
  :precision binary64
  (sqrt (* (/ 1.0 2.0) (+ 1.0 (/ 1.0 (sqrt (+ 1.0 (* (pow (/ (* 2.0 l) Om) 2.0) (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0))))))))))