MathGroup Archive 2009

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

Search the Archive

Re: Re: Wrong Simplify[] Answer for

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104578] Re: [mg104513] Re: Wrong Simplify[] Answer for
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 4 Nov 2009 01:36:11 -0500 (EST)
  • References: <hce437$r4t$1@smc.vnet.net> <hcgmni$cpe$1@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

Anything less than 10^-$MachinePrecision is zero.

$MachinePrecision

15.9546

Bobby

On Tue, 03 Nov 2009 01:51:06 -0600, Lawrence Teo <lawrenceteo at yahoo.com>  
wrote:

> Hi all,
>
> Thanks for the insight. So Simplify[] in Mathematica is right.
> But why I observe small delta if I subtract the two expressions with //  
> N?
> Is it because of machine precision related limitation?
>
> a = Cos[x]^2 - Sin[x]^2
> b = Cos[x]^4 - Sin[x]^4
> Table[a - b, {x, -10, 10}] // N
>
> Return small delta...
> \!\({6.938893903907228`*^-17, 6.245004513516506`*^-17, 0.`,
>     0.`, 7.025630077706069`*^-17, 0.`, 0.`, 3.854338723185968`*^-17,
> 0.`,
>     1.1102230246251565`*^-16, 0.`, 1.1102230246251565`*^-16, 0.`, \
> 3.854338723185968`*^-17, 0.`, 0.`, 7.025630077706069`*^-17, 0.`, 0.`,
> \
> 6.245004513516506`*^-17, 6.938893903907228`*^-17}\)
>
>
>
> On Oct 31, 2:50 pm, Peter Breitfeld <ph... at t-online.de> wrote:
>> Lawrence Teo wrote:
>> > We know that Simplify[Cos[x]^2-Sin[x]^2] -> Cos[2 x]
>> > But why Simplify[Cos[x]^4-Sin[x]^4] -> Cos[2 x] too?
>>
>> > Doing subtraction between the two expressions will give small delta.
>> > This is enough to prove that the two expression shouldn't be the same.
>>
>> > Can anyone give me any insight? Thanks.
>>
>> it's simply true, because:
>>
>> cos^4 x - sin^4 x = (cos^2 x - sin^2 x)(cos^2 x + sin^2 x)
>> = (cos^2 x - sin^2 x) * 1 = cos 2x
>>
>> --
>> _________________________________________________________________
>> Peter Breitfeld, Bad Saulgau, Germany --http://www.pBreitfeld.de
>
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: what's wrong with these expressions?
  • Next by Date: Re: Beginning syntax problems
  • Previous by thread: Re: Re: Wrong Simplify[] Answer for
  • Next by thread: Re: Re: Wrong Simplify[] Answer for