fischer: Computes Fischer's function and (optionally) its Jacobian

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/fischer.R

Description

Computes Fischer's function and (optionally) its Jacobian

Usage

1
fischer(u, v, du, dv, plus = TRUE)

Arguments

u

n-array or vector, first function evaluated at x

v

n-array or vector, second function evaluated at x

du

n-array or vector, derivative of first argument evaluated at x (optional)

dv

n-array or vector, derivative of second argument evaluated at x (optional)

plus

logical, use 'plus' version if TRUE (default), 'minus' if FALSE (optional)

Details

Fischer's function φ:R\times R \rightarrow R is specified by

φ^{\pm}(u,v) = u + v \pm √{u^2 + v^2}, u,v\in R

In this implementation, u,v are assumed to be function of x.

Value

If inputs du and dv are provided, it returns a list with fields

Otherwise, it returns only the matrix f.

Author(s)

Randall Romero-Aguilar

References

Miranda, Fackler 2002 Applied Computational Economics and Finance, section 3.8

See Also

Other nonlinear equations: minmax; ssmooth

Examples

1
2
3
4
5
6
u   <-  c(1,2,3,4)
v   <-  c(1,2,2,1)
du  <-  c(0,1,1,0)
dv  <-  c(1,1,1,1)
fp  <- fischer(u,v,du,dv)
fm  <- fischer(u,v,plus=FALSE)

randall-romero/CompEconR documentation built on May 26, 2019, 10:56 p.m.