       Re: Failure to recognize "1"

• To: mathgroup at yoda.physics.unc.edu
• Subject: Re: Failure to recognize "1"
• From: wmm at chem.wayne.edu (Martin McClain)
• Date: Fri, 10 Sep 93 13:13:27 EDT

This looks like one of many things that are not done routinely because they
cost too much time if they are tried on every operation.  You can make it
happen with
(your expr) /. p_^m_ q_^m_ -> (p q)^m
Regards- Martin McClain

>Hi,
>
>I'm currently working with the average of the autocovariance of a Gaussian
>random variable. Hence, I defined the function
>
>fChi2[R2_,sigma_,N_] := PDF[ChiSquareDistribution[N],R2/(sigma^2)]/sigma^2
>
>which is the density function for a chi-squared distribution in the
>non-normalized case. (The Mma function presumes a standard deviation of 1.)
>Anyhow, given my hard won suspicion of Mma integrals, I checked the expected
>value and standard deviation. Running Mma 2.1 on my NeXTstation I got,
>
>In:=
>   Declare[sigma, NonNegative]
>   Declare[sigma, Real]
>   Declare[M, Positive]
>   expectedAvg = Integrate[R2 fChi2[R2,sigma,M],{R2,0,Infinity}]
>   secondMoment = Integrate[R2^2 fChi2[R2,sigma,M],{R2,0,Infinity}]
>   stdDeviation = Sqrt[secondMoment - expectedAvg^2]
>
>
>Out=
>           2
>    M sigma
>   -----------   <------ should be "M sigma"
>    1 M/2  M/2
>   (-)    2
>    2
>
>
>Out=
>                  4
>   M (2 + M) sigma
>   ----------------
>      1 M/2  M/2
>     (-)    2
>      2
>
>
>Out=
>           2      4                   4
>          M  sigma     M (2 + M) sigma
>   Sqrt[-(---------) + ----------------] <-- Sqrt[2 M] sigma^2
>            1 M  M        1 M/2  M/2
>           (-)  2        (-)    2
>            2             2
>
>My question is why Mma doesn't recognize that
>
>      1 M/2  M/2
>     (-)    2      = "1"?
>      2
>
>
>As a result, the above equation doesn't simplify upon application of simplify
>or expand. Is there some subtlety I'm missing or is this a bug in Mma?
>
>Thanks,
>
>Mark.
>---
>Mark Kotanchek
>Guidance & Control Dept - 363 ASB
>Applied Research Lab/Penn State
>P.O. Box 30
>State College, PA 16804
>
>e-mail:	mek at guinan.psu.edu (NeXTmail)
>TEL:	(814)863-0682
>FAX:	(814)863-7843

• Prev by Date: Reading PC MATLAB *.MAT files into Mathematica
• Next by Date: Mathematica for elementary and junior high students
• Previous by thread: Failure to recognize "1"
• Next by thread: FindMinimum