Re: Newton's method
- To: mathgroup at smc.vnet.net
- Subject: [mg26256] Re: Newton's method
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Sun, 10 Dec 2000 00:19:32 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <90kpnd$r1n@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
no wonder, that the Newton method can't find a solution,
with
f = Sqrt[x^2 - 2584]*Coth[0.00128*Sqrt[x^2 - 2584]] + Sqrt[x^2 - 1013]
a simple table for x in [32,52] show
Table[f, {x, 32, 51}]
{783.901, 789.33, 792.599, 795.23, 797.523, 799.599, 801.524, 803.335, \
805.058, 806.71, 808.304, 809.85, 811.354, 812.823, 814.262, 815.673, \
817.061, 818.428, 819.776, 821.107}
there is no zero. I don't know *what* you are seeing in the plots.
Or has you just looked where f crosses the x-axes ?
Regards
Jens
drek wrote:
>
> Hi all,
> I am trying to use the Newton-Raphson method to find the root to an
> equation.
> The formula looks like this:
>
> newton[f_, x_, x0_, n_, opts___] :=
> With[{df = D[f, x]}, FixedPointList[(x - f/df) /. x -> # &, N[x0], n,
> opts]]
>
> with f=Sqrt[x^2 - 2584] * Coth[0.00128 * Sqrt[x^2 - 2584]]+ Sqrt[x^2 -
> 1013].
>
> When I set
>
> newton[f, x, 31, 20]
>
> I end up getting values which do not converge. However, if I were to plot
> the function using the Plot function in Mathematica (between x values of 32
> and 51), it seems like the root is somewhere near 33.
>
> I would thus like to know if perhaps there is something wrong with this
> formulation for the Newton's method, or that there is some quirk in the Plot
> function and the function, f, in fact do not have a root at all.
>
> Thanks.
>
> Derek