Questions tagged [newtons-method]

In numerical analysis, Newton's method (also known as the Newton–Raphson method) is a method for finding successively better approximations to the roots (or zeroes) of a real-valued function.

In numerical analysis, Newton's method (also known as the Newton–Raphson method) is a method for finding successively better approximations to the roots (or zeroes) of a real-valued function.

Formula:

enter image description here

In this formula xn + 1 is the next closest approximation after xn, f(xn) is the function at xn and f'(xn) is the derivative of the function at xn.

First approximation x0 has to be in interval (a,b) where exact solution x* is situated.

418 questions
3
votes
0 answers

Initial guess for Newton-Raphson iteration method in Maximum Likelihood Estimation

I want to estimate the four parameters of Exponentiated Modified Weibull Extension (EMWE) distribution introduced by Sarhan and Apaloo (2013) with the Maximum Likelihood Estimation (MLE). This distribution is used in reliability and survival…
crhburn
  • 103
  • 1
  • 8
3
votes
1 answer

Newton's Basins of Attraction

I am trying to plot the Newton's Basins of Attraction for the polynomial z^3-1 using python. I am using Newton-Raphson Iterative method to plot the graph. Till now, I am able to plot this: What I want to generate is something like this: Could…
Pratanu Mandal
  • 597
  • 8
  • 23
3
votes
1 answer

Newton's method with recursion in Java

I was just curious I have this piece of Java code. My question is what is the reason to return 1.0 * the recursive call? in the else portion of the code My 2nd question is when I declare the E variable as 0.0000001 AND A , X variables as doubles in…
linyu21
  • 81
  • 10
3
votes
1 answer

Matlab - find intersection points between two elipses - newtons method - weird result

Im trying to write a matlab program that is supposed to find intersection point between one elipse and one crooked elipse. ((x − 4)^2/a^2)+((y-2)^2/2)=1 - equation for elipse 0.4x^2+y^2-xy = 10 - equation for crooked elipse r =…
Jakob Svenningsson
  • 4,175
  • 6
  • 23
  • 26
3
votes
3 answers

Computing fractional exponents in C

I'm trying to evaluate a^n, where a and n are rational numbers. I don't want to use any predefined functions like sqrt() or pow() So I'm trying to use Newton's Method to get an approximate solution using this approach: 3^0.2 = 3^(1/5) , so if x…
user3787097
  • 181
  • 3
  • 14
3
votes
1 answer

TypeError: can only concatenate tuple (not "float") to tuple

I'm new to python, so the question might be easy, anyway, thanks for your patience: As I was trying to call the newton-raphson method to calculate the implied volatility in Black-Scholes formula for call/put option pricing, First thing is, the…
StayFoolish
  • 531
  • 1
  • 12
  • 29
3
votes
2 answers

Why `x = x*(1.5f-(xhalf*x*x));` can be a Newton Method iteration?

Ok, by far, I guess many people know the famous fast inverse square root (see more on Writing your own square root function and 0x5f3759df) Here is the code float FastInvSqrt(float x) { float xhalf = 0.5f * x; int i = *(int*)&x; // evil…
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
3
votes
3 answers

Given f, is there an automatic way to calculate fprime for Newton's method?

The following was ported from the pseudo-code from the Wikipedia article on Newton's method: #! /usr/bin/env python3 # https://en.wikipedia.org/wiki/Newton's_method import sys x0 = 1 f = lambda x: x ** 2 - 2 fprime = lambda x: 2 * x tolerance =…
Noctis Skytower
  • 21,433
  • 16
  • 79
  • 117
3
votes
1 answer

Speeding up newton-raphson in pandas/python

I'm currently iterating through a very large set of data ~85GB (~600M lines) and simply using newton-raphson to compute a new parameter. As of right now my code is extremely slow, any tips on how to speed it up? The methods from BSCallClass &…
ast4
  • 791
  • 8
  • 19
2
votes
1 answer

Newton-Raphson Division For Floating Point Divide?

I am trying to implement the Newton-Raphson Division Algorithm Wikipedia entry to implement a IEEE-754 32-bit floating point divide on a processor which has no hardware divide unit. My memory locations are 32-bit two's complement word and I have…
Veridian
  • 3,531
  • 12
  • 46
  • 80
2
votes
1 answer

bezier shape-fill: problem with finding roots for intersection test

I adapted this shadertoy into a Unity shader and have noticed that, while it generally works as expected, there are certain artifacts that appear, as I will further explain. I believe they are related to the calculation of roots in the Bezier…
2
votes
1 answer

Newton's method for 2 equations in Python

I'm a beginning programmer who's currently working on translating a Julia script to Python. It concerns the following piece of Julia code: function p(temp, irr) p_max = P_1 * exp(T_AP / T_P1 - T_AP / (temp + 273.15)) / (1 +…
2
votes
3 answers

ZeroDivisionError: float division

I have got this code to solve Newton's method. But it gives a zero division error. I cannot figure out what is wrong. Thank you. import copy tlist = [0.0, 0.12, 0.16, 0.2, 0.31, 0.34] # list of start time for the phonemes w = w1 = w2 = w3 =…
zingy
  • 811
  • 9
  • 19
  • 35
2
votes
0 answers

Newton Raphson maximisation

I've tried to run the code below for maximum likelihood estimation(MLE) in a simulation study. When I run the code I kept getting the warning message "There were 50 or more warnings (use warnings() to see the first 50)" and also when I checked the…
2
votes
1 answer

Error in bigdecimal/newton for XIRR implementation

I would like to use the bigdecimal/newton module in Ruby for an implementation of XIRR. I have written a script to try it out by following this example. When I run the code (Ruby 1.9.2 on Mac OS X 10.6), I get the following…
wk2752
  • 157
  • 1
  • 8
1 2
3
27 28