Learn R Programming

mosaic (version 0.5-1)

findZerosMult: Find the zeros of a function of two variables

Description

Compute numerically the zeros of a function of two variables. All free variables (all but the variable on the right side) named in the expression must be assigned a value via ...

Usage

findZerosMult(..., npts = 10, rad = 5, center = c(0, 0),
    sortBy = "byx")

Arguments

...
arguments for values
npts
number of desired zeros to return
rad
radius around center in which to look for zeros
center
center of search for zeros
sortBy
options for sorting zeros for plotting. Options are 'byx', 'byy' and 'radial'. The default value is 'byx'.

Value

  • A data frame of numerical values which should all result in a value of zero when input into original function

Details

sorts points in the domain according to the sign of the function value at respective points. Use continuity and uniroot to find zeros between points of opposite signs. Returns any number of points which may be sorted and plotted according to x, y, or radial values.

Examples

Run this code
findZerosMult(a*x^2-8~a&x, npts = 50)
findZerosMult(a^2+x^2-8~a&x, npts = 1000, sortBy='radial')

Run the code above in your browser using DataLab