5
$\begingroup$

I have a rather complex expression which I would like to simplify and check my work along the way (Mathematica does not simplify very basic things and it is frustrating me). In the following example, all I am doing is writing the square root in the numerator and the square root in the denominator under one radical and Mathematica will not tell me that they are the same thing. the first expression (on the top) is the original and I am subtracting my simplification which should give me zero but it does not. I end up having to plot the differences and the more changes I make to my simplification, the more the computer error propagates which makes that a poor solution for validation.

How do I go about having Mathematica validate these simplifications for me analytically?

-((2^(5/2 - 2*t)*(4 + 2*t)!*Subscript[a, 0]^(-3 - 2*t)*
    (Subscript[a, 0] + Subscript[a, 1])^(4 + 2*t)*
    Sqrt[-((64^t*(5 + 2*t)!^2*Subscript[a, 0]^(12 + 8*t)*Subscript[a, 1]^(5 + 2*t))/
       ((4 + 2*t)!*(16^(2 + t)*(5 + 2*t)!^2*Subscript[a, 0]^(3 + 2*t)*
          Subscript[a, 1]^(5 + 2*t) - (2*(3 + t))!*(4 + 2*t)!*
          (Subscript[a, 0] + Subscript[a, 1])^(8 + 4*t))))])/(5 + 2*t)!) + 
 (2^(5/2 - 2*t)*(4 + 2*t)!*Subscript[a, 0]^(-3 - 2*t)*
   (Subscript[a, 0] + Subscript[a, 1])^(4 + 2*t)*
   Sqrt[-(64^t*(5 + 2*t)!^2*Subscript[a, 0]^(9 + 6*t)*Subscript[a, 1]^(5 + 2*t)*
       (Subscript[a, 0] + Subscript[a, 1])^4)])/
  ((5 + 2*t)!*Sqrt[(4 + 2*t)!*Subscript[a, 0]^(-3 - 2*t)*
     (Subscript[a, 0] + Subscript[a, 1])^4*
     (16^(2 + t)*(5 + 2*t)!^2*Subscript[a, 0]^(3 + 2*t)*Subscript[a, 1]^(5 + 2*t) - 
      (2*(3 + t))!*(4 + 2*t)!*(Subscript[a, 0] + Subscript[a, 1])^(8 + 4*t))])

TraditionalForm of the expression.

$\endgroup$
2
  • 4
    $\begingroup$ please post the code for the function in InputForm so the rest of us can try to help $\endgroup$
    – tkott
    Commented Mar 21, 2012 at 14:08
  • 1
    $\begingroup$ Welcome to Mathematica.SE. When you post here, please make sure that 1. you post copyable code 2. you come up with a clear minimal example (in this case: why doesn't Sqrt[a/b] == Sqrt[a]/Sqrt[b] simplify to True) $\endgroup$
    – Szabolcs
    Commented Mar 21, 2012 at 14:11

1 Answer 1

14
$\begingroup$

You are assuming that

$$ \sqrt{\frac{a}{b}} = \frac{\sqrt{a}}{\sqrt{b}} $$

This is not generally true. Take for example $a=1$ and $b=-1$ for which this identity does not hold.

You need to give additional assumptions to Simplify, in this case that $b>0$.

Simplify[Sqrt[a/b] == Sqrt[a]/Sqrt[b], b > 0]

(* ==> True *)
$\endgroup$
6
  • $\begingroup$ ahh, beat me to it: though you had a better example anyway :) $\endgroup$
    – tkott
    Commented Mar 21, 2012 at 14:11
  • $\begingroup$ As an added note, Reduce is nice in this case for determining when a particular simplification is valid. $\endgroup$
    – rcollyer
    Commented Mar 21, 2012 at 14:19
  • $\begingroup$ thank you, this solve some of my problems. now, how can i get it to evaluate the gamma function as factorial when i have non-negative, integer arguments? i have tried {l >= 0, l :in: Integers} and it does not help. $\endgroup$
    – drjrm3
    Commented Mar 21, 2012 at 14:20
  • $\begingroup$ @Laurbert515 I am not aware of any way to do that (FunctionExpand converts the other way) except though an explicit replacement, ... ./ Gamma[z_] :> Factorial[z-1] $\endgroup$
    – Szabolcs
    Commented Mar 21, 2012 at 14:40
  • $\begingroup$ no problems - thanks for the help! $\endgroup$
    – drjrm3
    Commented Mar 21, 2012 at 14:48

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.