# findipl: Finds the s-left and s-right for a given internal point x[j] In inflection: Finds the Inflection Point of a Curve

 findipl R Documentation

## Finds the s-left and s-right for a given internal point x[j]

### Description

From the definitions (1.3), (2.2) of references ,  it is necessary to find s_l and s_r in order to estimate the Extremum Surface Estimator (ESE) of the inflection point.

### Usage

```findipl(x, y, j)
```

### Arguments

 `x` The numeric vector of x-abscissas, must be of length at least 4. `y` The numeric vector of the noisy or not y-ordinates, must be of length at least 4. `j` The data index j such that x=x_j

### Value

A list is returned that contains

 `j` The data index j such that x=x_j `x` The corresponding x-abscissa `sl` The value of s-left `sr` The value of s-right

### Note

This small function is used when we are scanning for the position of inflection point in ESE method.

### Author(s)

Demetris T. Christopoulos

### References

Demetris T. Christopoulos (2014). Developing methods for identifying the inflection point of a convex/concave curve. arXiv:1206.5478v2 [math.NA]. https://arxiv.org/pdf/1206.5478v2.pdf

Demetris T. Christopoulos (2016). On the efficient identification of an inflection point.International Journal of Mathematics and Scientific Computing, (ISSN: 2231-5330), vol. 6(1). https://veltech.edu.in/wp-content/uploads/2016/04/Paper-04-2016.pdf

See also `ese`.

### Examples

```#
#Lets create some data based on the Fisher-Pry model, without noise:
x<-seq(0,10,by=0.1);y<-5*(1+tanh(x-5));
tese=ese(x,y,0);tese;
#     j1 j2 chi
# ESE 39 63   5
N<-length(x);N
#  101
#We know that total symmetry exists, so for the middle point it is better to compute |sl|=|sr|
j=(N-1)/2+1;j
#  51
#Define the left and right chord:
fl<-function(t){y + (y[j] - y) * (t - x) / (x[j] - x)}
fr<-function(t){y[j] + (y[N] - y[j]) * (t - x[j]) / (x[N] - x[j])}
#Find the s-left and s-right:
LR<-findipl(x,y,j);LR;
#  51.000000  5.000000 -9.031459  9.031459
#Show all results in a plot:
plot(x,y,type="l",col="red")
lines(c(x,x[j]),c(y,y[j]),type="l",col="green")
lines(c(x[N],x[j]),c(y[N],y[j]),type="l",col="blue")
points(x[j],y[j], type = "p",pch = 19,col="black")
text(2.5,1,round(LR,digits=2))
text(6.5,7.5,round(LR,digits=2))
#The two surfaces are indeed absolutely equal |sl|=|sr|
#
```

inflection documentation built on June 15, 2022, 5:07 p.m.