RE: Re: Help to solve numerical equation
- To: mathgroup at smc.vnet.net
- Subject: [mg43786] RE: [mg43753] Re: Help to solve numerical equation
- From: "David Park" <djmp at earthlink.net>
- Date: Sat, 4 Oct 2003 02:05:05 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Jean-Claude, If you can narrow down the domain to a reasonable value then Ted Ersek's RootSearch package from MathSource will get both roots. Needs["Enhancements`RootSearch`"] ?RootSearch RootSearch[lhs==rhs,{x,xmin,xmax}] tries to find all numerical solutions to \ the equation (lhs==rhs) with values of x between xmin and xmax. eq = 0.5*Exp[x*200] + 0.21*Exp[x*500] + 0.1*Exp[x*110] + 0.07*Exp[x*(15)] + 0.018*Exp[x*(-16)] + 0.002*Exp[x*(-263)] - 1; RootSearch[eq == 0, {x, -1, 1}] {{x -> -0.0232796}, {x -> 0.00042907}} Plot[eq, {x, -0.03, 0.004}] David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Jean-Claude Poujade [mailto:poujadej at yahoo.fr] To: mathgroup at smc.vnet.net bobhanlon at aol.com (Bob Hanlon) wrote in message news:<blgiif$feh$1 at smc.vnet.net>... > NSolve is used primarily with polynomial equations. Use FindRoot. > > eq=0.5*Exp[x*200]+0.21*Exp[x*500]+ > 0.1*Exp[x*110]+0.07*Exp[x*(15)]+ > 0.018*Exp[x*(-16)]+0.002*Exp[x*(-263)]-1; > > FindRoot[eq==0,{x,.0004}] > > {x -> 0.00042907} > > > Bob Hanlon Right! But FindRoot doesn't "see" there's another root... --- jcp