Re: Solvability sensitive to small changes in numerical input
- To: mathgroup at smc.vnet.net
- Subject: [mg47568] Re: Solvability sensitive to small changes in numerical input
- From: "Peter Pein" <petsie at arcor.de>
- Date: Fri, 16 Apr 2004 05:20:40 -0400 (EDT)
- References: <c5j7sp$r29$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Gareth J. Russell" <gjr2008 at columbia.edu> schrieb im Newsbeitrag news:c5j7sp$r29$1 at smc.vnet.net... > Hi, > > I have a function that includes the Solve command > > f[a1_, a2_, b_] := Module[{c}, > > c = 2*b/(b - 1); > > Solve[b/(1 + (a1*n)^c) + b/(1 + (a2*n)^c) == 2, n] > > ] ] > > but it seems very sensitive to the numerical input. For example, > > f[2., 0.05, 6.19] > > and > > f[2., 0.05, 6.21] > > Produce the error "The equations appear to involve the variables to be > solved for in an essentially non-algebraic way." > > Whereas > > f[2., 0.05, 6.20] > > produces the solutions > > {{n -> -23.8725 - 13.2503i]}, {n -> -23.8725 + 13.2503i}, { > n -> 0.183281 - 0.707873i}, {n -> 0.183281 + 0.707873i]}, {n -> 27. > 3032}} > > Can anyone enlighten me as to what is going on here? Other peoples' work > suggests that, given a1 = 2., it should be possible to get numerical > solutions for a large range of values of a2 and b. > > If it makes a differences we make the assumptions a1 > 0, a2 > 0, a2 < > a1 and b >= 1. > > Oh, and v5.0.1.0 on Mac OS X > > Thanks! > > Gareth Russell > > Columbia University > Hi Gareth, if you're interested in the real solution, try f[a1_, a2_, b_] := With[{c = (2*b)/(b - 1)}, 8^(1/c)*(1/(Sqrt[(a1^c + a2^c)^2*(c - 4)^2 + 32*(a1*a2)^c*(c - 2)] + (a1^c + a2^c)*(c - 4)))^(1/c)] -- Peter Pein, Berlin to write to me, start the subject with [