MathGroup Archive 2011

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

Search the Archive

Re: Replacement faild

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119610] Re: Replacement faild
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 12 Jun 2011 11:03:24 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

You will not get exact results using inexact numbers (machine precision).

eq1 = -(1104.6607499200002`/(-y + T)^2) + (x (1 + 2 T))/(T + T^2)^2 == 0;

eq2 = 2209.3214998400003`/(-y + T)^3 - 
    x ((2 (1 + 2 T)^2)/(T + T^2)^3 - 2/(T + T^2)^2) == 0;

sol = Solve[Rationalize[eq1 && eq2, 0], {x, y}, Reals][[1]] // Simplify

{x -> (1418800860*(1 + 3*T + 3*T^2)^2)/(1284377*(1 + 2*T)^3), 
   y -> T^3/(1 + 3*T + 3*T^2)}

{eq1, eq2} /. sol // Simplify

{True, True}


Bob Hanlon

---- Math Math <mathematica023 at gmail.com> wrote: 

=============
Hi,
I'm new for this forum, and really i'm new for Mathematica also!
I've got this problem: two equation in a system. I use NSolve to have the
solutions of system, but when i try to verify the solutions Mathematica
doesn't give True, but another value.
Can anyone help me?

eq1 = -(1104.6607499200002`/(-y + T)^2) + (x (1 + 2 T))/(T + T^2)^2 == 0 ;
eq2 = 2209.3214998400003`/(-y + T)^3 -x ((2 (1 + 2 T)^2)/(T + T^2)^3 - 2/(T
+ T^2)^2) == 0 ;
sol = NSolve[eq1 && eq2, {x, y}, Reals] // FullSimplify;
eq2 /. sol // FullSimplify
eq1 /. sol // FullSimplify
NSolve::ratnz: NSolve was unable to solve the system with inexact
coefficients. The answer was obtained by solving a corresponding exact
system and numericizing the result. >>
....



  • Prev by Date: Re: Command for show results in live
  • Next by Date: Re: Is there ToNumber?
  • Previous by thread: Replacement faild
  • Next by thread: Command for show results in live