# How do I check whether these expressions are identical?

Consider:

R0n = (β Λ (-1 + ξ) (-1 +  ρ))/((α + γ + θ + μ) (μ + ξ +  ρ));
xn = σ1^2 + m;
yn = 2 (μ + ρ + ξ) - σ1^2 - m;
k1 = 1/(μ + α + θ + γ);
k2 = Sqrt[R0n]/η;


Then I wish to check whether the following are identical:

(k1 β (1 - ρ) (1 - ξ)/ k2) (xn Λ^2/((μ + ρ + ξ)^2 yn))^(1/2)


and

η ((R0n xn)/yn)^(1/2)


I tried FullSimplify but it is still a mess and didn't make things clearer.

Edit:

Applying FullSimplify to the first expression, we get:

 (β η (-1 + ξ) (-1 + ρ) Sqrt[-((Λ^2 \
(m + σ1^2))/((μ + ξ + ρ)^2 (m -
2 (μ + ξ + ρ) + σ1^2)))])/Sqrt[(β \
Λ (α + γ + θ + μ) (-1 + \
ξ) (-1 + ρ))/(μ + ξ + ρ)]


Applying it to the second:

η Sqrt[-((β Λ (-1 + ξ) (-1 + ρ) (m \
+ σ1^2))/((α + γ + θ + μ) (μ + \
ξ + ρ) (m - 2 (μ + ξ + ρ) + σ1^2)))]


Now shifting β (-1 + ξ) (-1 + ρ) into the radical, and applying Fullsimplify to inside of the radical, we get:

-((β Λ (-1 + ξ) (-1 + ρ) (m + \
σ1^2))/((α + γ + θ + μ) (μ + \
ξ + ρ) (m - 2 (μ + ξ + ρ) + σ1^2)))


which is identical to the inside of the radical of the second expression.

• I did get something, I'm pretty certain they're identical but I hope someone can confirm.
– Math
Nov 17, 2022 at 16:44
• Probably you can edit the question to include the details behind "I did get something". There are trivial cases for which these are equal, like $\eta = 0$, but I don't see that been true in general. Nov 17, 2022 at 16:52
• all constants are positive. does that help?
– Math
Nov 17, 2022 at 17:02

$Version (* "13.1.0 for Mac OS X x86 (64-bit) (June 16, 2022)" *) Clear["Global*"] R0n = (β Λ (-1 + ξ) (-1 + ρ))/((α + \ γ + θ + μ) (μ + ξ + ρ)); xn = σ1^2 + m; yn = 2 (μ + ρ + ξ) - σ1^2 - m; k1 = 1/(μ + α + θ + γ); k2 = Sqrt[R0n]/η; var = {m, α, β, γ, η, θ, Λ, μ, ξ, ρ, σ1};  You need to specify some assumptions or constraints on the variables. For example, Assuming[Element[var, PositiveReals] && ρ > 1 && ξ > 1, (k1 β (1 - ρ) (1 - ξ)/ k2) (xn Λ^2/((μ + ρ + ξ)^2 yn))^(1/ 2) == η ((R0n xn)/yn)^(1/2) // FullSimplify] (* True *)  EDIT: Or, another example Assuming[ Element[var, PositiveReals] && 0 < ξ < 1 && 0 < ρ < 1, (k1 β (1 - ρ) (1 - ξ)/ k2) (xn Λ^2/((μ + ρ + ξ)^2 yn))^(1/ 2) == η ((R0n xn)/yn)^(1/2) // FullSimplify] (* True *)  • Hmm, why did you assume$\rho$and$\xi$were$>1$? the expression should technically read$\beta (1-\rho)(1-\xi)$with$0\leq \rho, \xi \leq1\$
– Math
Nov 17, 2022 at 17:10
• To insure that Sqrt[R0n] isn't complex. Nov 17, 2022 at 17:14
• If there are known constraints you should include that information in the question. And Mathematica generally needs to be provided that information as well. Nov 17, 2022 at 17:28

Here is a Monte Carlo way to verify this.

You may choose random positive reals for the parameters and check if the outcome is true. You then repeat this many times. And if you always get True the probability of the claim to be true goes towards 1:

AllTrue[Table[
e1 == e2 /.
Thread[{\[Mu], \[Xi], \[Rho] , m, \[Sigma]1, k1, k2, xn,
yn, \[CapitalLambda]} ->  RandomReal[{0, 100}, 10]], 100], # &]

(* True *)
`