Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-l] quadratic uncertainty



On Aug 26, 2010, at 1:03 , John Denker wrote:

On 08/25/2010 08:30 PM, Stefan Jeglinski wrote:
We need to find a good value for x
/and for the uncertainty associated with x/
given that:
a x^2 + b x + c = 0 [1]


In my little error propagation (monte carlo) routines, I get this nice little bit:

a=Quantity('1 +- .0001')
b=Quantity('-2.08 +- .01')
c=Quantity('1.08 +- .01')


In [3]:evaluate('b**2-4*a*c')
Out[3]:0.00699313256158 +- 0.0579303054605

which gives rise to complex solutions if I try:

In [4]:evaluate('-b+sqrt(b**2-4*a*c)/(2*a)')
Out[4]:nan +- nan


Not sure what the best way to handle that is!


bb

--
Brian Blais
bblais@bryant.edu
http://web.bryant.edu/~bblais
http://bblais.blogspot.com/