Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15779
| From | psycho_dad <s.nesseris@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: FindRoot with Logarithmic terms |
| Date | 2011-01-29 10:43 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ii0r0s$jhr$1@smc.vnet.net> (permalink) |
| References | <ihu8is$1pj$1@smc.vnet.net> |
On Jan 28, 12:16 pm, skunkwerk <skunkw...@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
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
FindRoot with Logarithmic terms skunkwerk <skunkwerk@gmail.com> - 2011-01-28 11:16 +0000 Re: FindRoot with Logarithmic terms psycho_dad <s.nesseris@gmail.com> - 2011-01-29 10:43 +0000 Re: FindRoot with Logarithmic terms Peter Breitfeld <phbrf@t-online.de> - 2011-01-29 10:44 +0000
csiph-web