Description Usage Arguments Value Author(s) References Examples
Computes root of function via Broyden's Inverse Update Method
1 2 |
f |
function, R^d –> R^d |
x |
d-array, initial guess for root |
... |
additional arguments to pass to |
opt |
list, options to control rootfinding process
|
A list with fields
x
d-array, root of f
fval
d-array, value of f
at solution
fjacinv
d.d matrix, inverse of Jacobian estimate
Randall Romero-Aguilar, based on Miranda & Fackler's CompEcon toolbox
Miranda, Fackler 2002 Applied Computational Economics and Finance
1 2 3 4 5 6 | broyden(function(x) (x-2)^3, 4)
broyden(function(x) (x-2)^3, 3, opt = list(showiters=TRUE))
# Compute fixedpoint of f(x1,x2)= [x1^2 + x2^3; x1*x2 - 0.5]
# Initial values [x1,x2] = [-1,-1]. True fixedpoint is x1 = -(1/8)^(1/5), x2 = 1/(2*x1).
broyden(function(x) c(x[1]^2 + x[2]^3, x[1]*x[2] - 0.5), c(-1,-1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.