Message Boards Message Boards

0
|
1836 Views
|
8 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Two equivalent expressions give False with ===

Posted 1 year ago

Could someone explain why these two expressions are not equivalent?

Sqrt[(a^2 + b^2)^7] === (a^2 + b^2)^(7/2)

Thanks.

POSTED BY: Jon Joseph
8 Replies
Posted 1 year ago

=== checks for equality of expressions. Compare

FullForm[Sqrt[(a^2 + b^2)^7]]

Power[Power[Plus[Power[a, 2], Power[b, 2]], 7], Rational[1, 2]]

with

FullForm[(a^2 + b^2)^(7/2)]

Power[Plus[Power[a, 2], Power[b, 2]], Rational[7, 2]]

POSTED BY: Eric Rimbey
Posted 1 year ago

Okay. Agreed. The way Mathematica parses these expressions is different. But algebraically these two expressions are equivalent. Is there anyway to expand them to demonstrate this fact? I've tried

Sqrt[(a^2+b^2)^7//Expand] and Expand[(a^2+b^2)^(7/2)] with no luck. Thoughts? (And thanks).

(By simply checking (3^2+4^2)^(7/2) and Sqrt[(3^2+4^2)]^7 I, of course, get the same answer)

POSTED BY: Jon Joseph
Posted 1 year ago
PowerExpand[Sqrt[(a^2 + b^2)^7]] === PowerExpand[(a^2 + b^2)^(7/2)]
POSTED BY: Hans Milton
Posted 1 year ago

Great. Thanks very much.

POSTED BY: Jon Joseph

Your expressions are not equivalent over the complexes:

Sqrt[(a^2 + b^2)^7] == (a^2 + b^2)^(7/2) /. {a -> I, b -> I}
{Sqrt[(a^2 + b^2)^7], (a^2 + b^2)^(7/2)} /. {a -> I, b -> I}
POSTED BY: Gianluca Gorni
Posted 1 year ago

I used assumptions that both a and b are non-negative real numbers. I still needed to use PowerExpand to make it work. Thanks for the feedback.

POSTED BY: Jon Joseph
Posted 1 year ago

Using Simplify with assumptions :

Simplify[{Sqrt[(a^2+b^2)^7],(a^2+b^2)^(7/2)},Element[{a,b},NonNegativeReals]]
POSTED BY: Hans Milton
Posted 1 year ago

Ohh.. I like that. A better demonstration. Thanks Hans Milton.

POSTED BY: Jon Joseph
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract