Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: FindRoot with Logarithmic terms

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116026] Re: FindRoot with Logarithmic terms
  • From: psycho_dad <s.nesseris at gmail.com>
  • Date: Sat, 29 Jan 2011 05:28:57 -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 plotted 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 numbers with dimensions {1} at {x} = {0.}
>
> any ideas?
>
> thanks

I forgot to mention in my previous message that doing a series
expansion of your expression around x=1/2, keeping only the terms up
to 4th order and then solving the resulting polynomial equation is
enough to get (semi)analytic approximations to the roots:

In[68]:= ss = Series[expr, {x, 1/2, 4}];
Solve[(ss // Normal) == 0, x] // Flatten;
Select[%[[All, 2]], Im[#] == 0 && 1 > # > 0 &]
(* In the last step we keep only the real roots in the range (0,1) *)

Out[70]= {0.468458, 0.531542}

My guess is that perhaps you could generalize this method and get the
exact roots but I don't have the time to check this.

Cheers


  • Prev by Date: Re: FindRoot with Logarithmic terms
  • Next by Date: Re: Initial condition with DSolve in Mathematica 8 doesn't work
  • Previous by thread: Re: FindRoot with Logarithmic terms
  • Next by thread: Initial condition with DSolve in Mathematica 8 doesn't work