7

I am using NSolve to solve an equation, as shown here:

T == (0.000250709 E^(0.0269867/(0.0000734429 + 1. T)))/(1.00025 - 
    1. E^(0.0539734/(0.0000734429 + 1. T)))

NSolve[T == (0.000250709 E^(0.0269867/(0.0000734429 + 
          1. T)))/(1.00025 - 
     1. E^(0.0539734/(0.0000734429 + 1. T))), {T}, Reals]

It gives me the warning Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result. >>, but still displays the result. Is it wrong to use NSolve for for such a general task, or am I missing a parameter?

BillyJean
  • 1,273
  • 7
  • 25

1 Answers1

10

No errors if you work with exact arithmetic instead:

NSolve[Rationalize[
         T == (0.000250709 E^(0.0269867/(0.0000734429 + 1. T)))/
              (1.00025 - 1. E^(0.0539734/(0.0000734429 + 1. T))), 10^-10], {T}, Reals]

(*{{T -> -6.55871*10^-164}, {T -> 216.923}}*)
Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453