2
$\begingroup$

Are there tools in Mathematica to simplify the following expression further, for $0<x<1$?

pdf = -((2 (-2 Sqrt[(1 - x) x] + 2 Sqrt[(1 - x) x^3] + 
         Sqrt[2] Sqrt[x - x^(3/2)] + Sqrt[2] Sqrt[x + x^(3/2)] - 
         Sqrt[2] Sqrt[x^3 + x^(7/2)] + 
         Sqrt[x] (-1 + Sqrt[2] Sqrt[x - x^(3/2)] - 
            Sqrt[2] Sqrt[x + x^(3/2)] + Sqrt[2] Sqrt[x^3 + x^(7/2)] - 
            x (-2 + Sqrt[2 - 2 Sqrt[x]] + x + 
               Sqrt[2] Sqrt[x - x^(3/2)]))))/(\[Pi] (-2 + Sqrt[
         2 - 2 Sqrt[x]] + Sqrt[2] Sqrt[1 + Sqrt[x]] - Sqrt[
         1 - x]) (-1 + x) x));
Assuming[{0 < x < 1}, FullSimplify[pdf]]

(This is the result of PDF@TransformedDistribution[(2 x - 1)^2, x \[Distributed] BetaDistribution[3/2, 3/2]])

$\endgroup$

1 Answer 1

5
$\begingroup$
$Version

(* "13.2.1 for Mac OS X ARM (64-bit) (January 27, 2023)" *)

Clear["Global`*"]

dist = TransformedDistribution[(2 x - 1)^2, 
   x \[Distributed] BetaDistribution[n/2, n/2]];

pdf[n_] = Assuming[0 < x < 1, PDF[dist, x] // FullSimplify]

(* (2^(1 - n) (1 - x)^(-1 + n/2))/(Sqrt[x] Beta[n/2, n/2]) *)

Verifying the validity of the distribution,

Assuming[n > 0, Integrate[pdf[n], {x, 0, 1}] // Simplify]

(* 1 *)

Plot[Evaluate@Table[pdf[n], {n, 1, 4}], {x, 0, 1},
 PlotLegends ->
  Table[StringForm["pdf[``]=``", n, pdf[n]], {n, 4}]]

enter image description here

dist3 = TransformedDistribution[(2 x - 1)^2, 
   x \[Distributed] BetaDistribution[3/2, 3/2]];

pdf3 = Assuming[0 < x < 1, PDF[dist3, x] // FullSimplify]

(* -((2 (-2 Sqrt[(1 - x) x] + 2 Sqrt[(1 - x) x^3] + Sqrt[2] Sqrt[x - x^(3/2)] + 
       Sqrt[2] Sqrt[x + x^(3/2)] - Sqrt[2] Sqrt[x^3 + x^(7/2)] + 
       Sqrt[x] (-1 + Sqrt[2] Sqrt[x - x^(3/2)] - Sqrt[2] Sqrt[x + x^(3/2)] + 
          Sqrt[2] Sqrt[x^3 + x^(7/2)] - 
          x (-2 + Sqrt[2 - 2 Sqrt[x]] + x + 
             Sqrt[2] Sqrt[x - x^(3/2)]))))/(π (-2 + Sqrt[2 - 2 Sqrt[x]] + 
       Sqrt[2] Sqrt[1 + Sqrt[x]] - Sqrt[1 - x]) (-1 + x) x)) *)

Assuming[0 < x < 1, PossibleZeroQ[Simplify[pdf[3] - pdf3]]]

(* True *)

EDIT:

Assuming[0 < x < 1, Simplify[pdf[3] - pdf3]]

(* 0 *)

Comparing graphically,

Plot[{pdf[3], pdf3}, {x, 0, 1},
 PlotStyle -> {Automatic, Dashed},
 PlotLegends -> Placed[{"pdf[3]", "pdf3"}, {.5, .5}],
 WorkingPrecision -> 15]

enter image description here

$\endgroup$

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.