MathGroup Archive 2009

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

Search the Archive

Re: RowReduce::luc when using NSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99159] Re: [mg99135] RowReduce::luc when using NSolve
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 29 Apr 2009 03:47:49 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

As stated in the documentation, NSolve is intended to give a list of numerical approximations to the roots of a polynomial equation. I suggest that you use FindRoot

eqn = {
   BesselJ[0, 20] - BesselJ[0, 20] r[0] == 3 I BesselJ[0, 60 I] t[0],
   BesselJ[0, 20] + BesselJ[0, 20] r[0] == BesselJ[0, 60 I] t[0]};

FindRoot[eqn,
 {{r[0], 5}, {t[0], 3}}, WorkingPrecision -> 30]

{r[0] -> -0.8000000000000000000000000000000000000000000000000000000301`30. - 
       0.6000000000000000000000000000000000000000000000000000000222`30.*I, 
   t[0] -> 5.66754261149722224656310043127626802663146216598467`30.*^-27 - 
       1.700262783449166673968930129382880407989438649795398`30.*^-26.\
700262783449166673968930129382880407989438649795398`30.**I}

soln = FindRoot[eqn,
  {{r[0], -0.8 - 0.6 I}, {t[0], 0}}]

{r(0)->-0.8-0.6 I,t(0)->5.66754*10^-27-1.70026*10^-26 I}

eqn /. soln

{True,True}


Bob Hanlon

---- mereandor <mereandor at gmail.com> wrote: 

=============
I try to solve a linear equation with the following input to mathematica:

NSolve[{BesselJ[0, 20] - BesselJ[0, 20] r[0] == 3 I BesselJ[0, 60 I] t[0], BesselJ[0, 20] + BesselJ[0, 20] r[0] == BesselJ[0, 60 I] t[0]}, {r[0], t[0]}]

but I get

RowReduce::luc: Result for RowReduce of badly conditioned matrix \
{{-0.167025+0. I,-1.61061*10^9-<<21>> I,0.167025+0. I},{<<1>>}} may \
contain significant numerical errors. >>

This is only the simplest instance of my problem (2(n+1) equations in equally numbered variables). If I don't write the equations down literally but insert them into NSolve as a Table[] statement I don't even get the warning. Then the equations are solved only partially expressing t[n] as linear combination of r[n].

I use Mathematica 6.0

How can I resolve this?

Thanks in advance for any help!




  • Prev by Date: Re: Select and Cases Give Different Answers
  • Next by Date: Re: Select and Cases Give Different Answers
  • Previous by thread: Re: RowReduce::luc when using NSolve
  • Next by thread: Re: RowReduce::luc when using NSolve