MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

SameQ to check for simplified radical expressions... doesn't work

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120958] SameQ to check for simplified radical expressions... doesn't work
  • From: Roy Simpson <roy at mathemaddicts.com>
  • Date: Fri, 19 Aug 2011 06:33:06 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hello,

I have what appears to be a simple issue, but I cannot for the life of me figure it out.  I will have a randomized number, a, and I am going to simplify the square root of this.  Then I want to compare this to a radical expression that a student enters, say b.  Thus, the idea should be something like

Simplify[Sqrt[a]] === Sqrt[b]

For sake of this example, let's suppose the number I want to consider is the square root of 360.  I only want the statement to return TRUE if the rhs of this SameQ is exactly 6*Sqrt[10].

Unfortunately,

Simplify[Sqrt[360]] === Sqrt[360]
returns TRUE.

I tried a few variations with Hold, but they always return false if the student enters the correct answer.  For example, if the student entered 6*Sqrt[10], then

Simplify[Sqrt[360]] === Hold[6*Sqrt[10]]
returns FALSE

What am I doing wrong?  Any help would be appreciated.




  • Prev by Date: Shooting method
  • Next by Date: Parameter Optimization to match a PDE solution to experimental results
  • Previous by thread: Re: Shooting method
  • Next by thread: Re: SameQ to check for simplified radical expressions... doesn't work