5
$\begingroup$

After using FullSimplify on an input expression, Mathematica ends up with $$ -c L \sqrt{\frac{\delta \epsilon }{c L \sqrt{-\left((\delta -1) \epsilon (\delta +\epsilon ) \left(\text{nx}^2+\text{ny}^2+\text{nz}^2\right)\right)}}}-\frac{\delta \sqrt{\frac{c (1-\delta )^{3/2} L}{\delta }} \sqrt[4]{\frac{\epsilon }{(\delta +\epsilon ) \left(\text{nx}^2+\text{ny}^2+\text{nz}^2\right)}}}{\delta -1} $$ This output expression should in fact evaluate to zero, but Mathematica does not see it. How can I nudge it to the right result?

Note that $\delta$ and $\epsilon$ are both positive reals.

The code for the expression is

-((Sqrt[(c L (1 - δ)^(3/2))/δ] δ (ϵ/((nx^2 + ny^2 + 
       nz^2) (δ + ϵ)))^(1/4))/(-1 + δ)) - 
 c L Sqrt[(δ ϵ)/(c L Sqrt[-((nx^2 + ny^2 + nz^2) (-1 + δ) ϵ (δ + ϵ))])]
$\endgroup$
9
  • 2
    $\begingroup$ It's not zero? Try: (expr) /. nx^2 + ny^2 + nz^2 -> 1 /. \[Delta] -> 2 /. \[Epsilon] -> 3 /. c -> 1 /. L -> 1 // N ? $\endgroup$ Commented Aug 29 at 7:57
  • $\begingroup$ Your example is very useful. When I insert values as you suggest, I get $-1.76022 + 1.76022i$, that is, a complex number. This can be understood from the observation that you set $\delta=2$ and I have $(1-\delta)$ under a square root. In fact, in my expression $\delta$ and $\epsilon$ are infinitesimals, or, if you like, positive reals with small value (certainly less than one). Apparently, one can not tell Mathematica directly that variables are infinitesimals. I note that if I set $\delta=0.5$ then the expression evaluates to zero. $\endgroup$ Commented Aug 29 at 8:54
  • 2
    $\begingroup$ @TrondSaue, the fact that $\delta$ and $\epsilon$ are infinitesimal is extremely important. In that case, you should simply do Limit, namely Limit[e, {δ -> 0, ϵ -> 0}] returns 0. $\endgroup$ Commented Aug 29 at 9:13
  • 2
    $\begingroup$ ResourceFunction["RadicalDenest"][expr] evaluates to 0 $\endgroup$ Commented Aug 29 at 19:18
  • 1
    $\begingroup$ @BobHanlon, I think this nice function deserves an answer on its own! $\endgroup$ Commented Aug 29 at 19:25

2 Answers 2

6
$\begingroup$

You can use PowerExpand with Assumptions -> True, followed by FullSimplify with appropriate assumptions on the parameters.

e = -((Sqrt[(c L (1 - δ)^(3/2))/δ] δ (ϵ/((nx^2 + ny^2 + nz^2) (δ + ϵ)))^(1/
           4))/(-1 + δ)) - c L Sqrt[(δ ϵ)/(c L Sqrt[-((nx^2 + ny^2 + 
              nz^2) (-1 + δ) ϵ (δ + ϵ))])] /. {nx^2 + ny^2 + nz^2 -> n}

assum = L > 0 && c > 0 && ϵ > 0 && n > 0 && δ > 0;
FullSimplify[PowerExpand[e, Assumptions -> True], assum]

$$\begin{cases} 0 & \delta < 1 \\ \text{Indeterminate} & \delta = 1 \\ -\frac{2 \sqrt{c \delta L}}{\sqrt[4]{-\frac{(\delta -1) n (\delta +\epsilon )}{\epsilon }}} & \text{otherwise} \end{cases} $$

Alternatively, you can try with some concrete values of $\delta$.

Table[PowerExpand[e], {δ, 1/10, 9/10, 1/10}]
(* {0, 0, 0, 0, 0, 0, 0, 0, 0} *)
    
Table[FullSimplify[e, assum], {δ, 1/10, 9/10, 1/10}]
(* {0, 0, 0, 0, 0, 0, 0, 0, 0} *)

As I've mentioned in the comment, if $\delta$ and $\epsilon$ represent infinitesimals, you can also do the Limit.

Limit[e, δ -> 0]
(* 0 *)

Limit[e, ϵ -> 0]
(* 0 *)

Limit[e, {δ -> 0, ϵ -> 0}]
(* 0 *)
$\endgroup$
3
$\begingroup$
$Version

(* "14.3.0 for Mac OS X ARM (64-bit) (July 8, 2025)" *)

Clear["Global`*"]

expr = -((Sqrt[(c L (1 - \[Delta])^(3/
               2))/\[Delta]] \[Delta] (\[Epsilon]/((nx^2 + ny^2 + 
               nz^2) (\[Delta] + \[Epsilon])))^(1/4))/(-1 + \[Delta])) - 
   c L Sqrt[(\[Delta] \[Epsilon])/(c L Sqrt[-((nx^2 + ny^2 + 
              nz^2) (-1 + \[Delta]) \[Epsilon] (\[Delta] + \[Epsilon]))])];

Since there are nested radicals, ResourceFunction["RadicalDenest"] should be explored.

ResourceFunction["RadicalDenest"][expr]

(* 0 *)
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.