Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6722 > unrolled thread
| Started by | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| First post | 2011-11-25 10:01 +0000 |
| Last post | 2011-11-25 10:01 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Root finding needs higher accuracy Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-11-25 10:01 +0000
| From | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| Date | 2011-11-25 10:01 +0000 |
| Subject | Re: Root finding needs higher accuracy |
| Message-ID | <janp2f$b2o$1@smc.vnet.net> |
This problem is trivial for Mathematica, because Mathemtica can solve it *exactly*:
Reduce[
Log[x] + x^2/(2 Exp[1]) - 2 x/Sqrt[Exp[1]] + 1 == 0, x, Reals]
x==Root[{4 #1-4 Sqrt[E]&,1.64872127070012814685}]
N[%, 100]
x==1.648721270700128146848650787814163571653776100710148011575079311640661021194215608632776520056366643
Andrzej Kozlowski
On 24 Nov 2011, at 12:57, HwB wrote:
> I would like to numerically find the root of the following function
> with up to 20 digits.
>
> f12[x_] := Log[x] + x^2 / (2 Exp[1]) - 2 x / Sqrt[Exp[1]] + 1
>
> This problem is known to be difficult for solvers in double precision
> arithmetics. I thought it should be easy with Mathematica, but the
> following attempts were not successful.
>
> SetPrecision[
> x /. FindRoot[f12[x], {x, 1.0, 3.4}, Method -> "Brent",
> AccuracyGoal -> Infinity, PrecisionGoal -> 20], 16]
> # 1.648732212532746
> SetPrecision[
> x /. FindRoot[f12[x], {x, 1.0, 3.4}, Method -> "Secant",
> AccuracyGoal -> Infinity, PrecisionGoal -> 20], 16]
> # 1.648710202030051
>
> The true root obviously is Sqrt[Exp[1]]//N = 1.648721270700128...
>
> The symbolic solver explicitely says it cannot solve this expression.
> What do I need to do to get a much more exact result out of
> Mathematica?
>
> Many thanks, Hans Werner
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web