MathGroup Archive 2011

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

Search the Archive

Re: FindRoot with Logarithmic terms

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116025] Re: FindRoot with Logarithmic terms
  • From: psycho_dad <s.nesseris at gmail.com>
  • Date: Sat, 29 Jan 2011 05:28:45 -0500 (EST)
  • References: <ihu8is$1pj$1@smc.vnet.net>

On Jan 28, 12:16 pm, skunkwerk <skunkw... at gmail.com> wrote:
> Hi,
>   I'm trying to find the roots of a logarithmic equation that I've plot ted successfully (I can see both roots are between 0 and 1).
>
> expr = 7500*x*(1 - x) + 325*8.314*(x*Log[x] + (1 - x)*Log[(1 - x)])
> FindRoot[expr == 0, {x, 0, 1}]
>
> FindRoot:nlnum: the function value(indeterminate) is not a list of number s with dimensions {1} at {x} = {0.}
>
> any ideas?
>
> thanks

The problem is most probably the starting value for x:
In[18]:= expr /. x -> 0
Limit[expr, x -> 0]

During evaluation of In[18]:= Infinity::indet: Indeterminate
expression 0 (-\[Infinity]) encountered. >>

Out[18]= Indeterminate

Out[19]= 0.

So, changing the initial value for x, gives a nice result:
In[14]:= FindRoot[expr == 0, {x, 0.4}]
FindRoot[expr == 0, {x, 0.6}]

Out[14]= {x -> 0.468458}
Out[15]= {x -> 0.531542}

I hope this helped!


  • Prev by Date: some demonstrations no longer work right in version 8
  • Next by Date: Re: Odd Behavior of GraphicsRow and GraphPlot
  • Previous by thread: Re: FindRoot with Logarithmic terms
  • Next by thread: Re: FindRoot with Logarithmic terms