Questions tagged [roots]
The roots tag has no usage guidance.
40
questions
3
votes
0
answers
41
views
Sufficient condition for real roots of a polynomial of order $n>5$ with arbitrary real coefficients
I ask for help in solving the problem. I am developing an optimization program that selects the coefficients of a polynomial of order $n> 5$ so that all its zeros are just real numbers. And I ...
2
votes
3
answers
116
views
Finding the roots of a function like $3+\cos(x)+0.005/(x-a)$?
I have a blackbox function that (for the purposes of this question) looks like $3+\cos(x) + 0.005/(x-a)$. The location of this $a$ is unknown (but within $0\to2\pi$). (The $3+\cos(x)$ is just a (bad) ...
1
vote
0
answers
92
views
How can I practice multivariable root-finding?
Recently, I've been reading up on various root-finding / optimization algorithms such as the Levenberg-Marquardt method, Gauss-Newton, Conjugate Gradient, trust-region and trust-region-dogleg.
I've ...
2
votes
1
answer
584
views
Constrained Newton-Raphson root finding
Original Question
I have a set of non-linear equations and I need to find the root where a subset of my solution vector is constrained to be greater than or equal to 0. I have implemented the Newton-...
0
votes
0
answers
45
views
Fastest way to find roots of second order polynomial upto single decimal point?
What is fasted way to find roots of second order polynomial up to single decimal point using a program.
2
votes
2
answers
393
views
What is an efficient way to calculate zeros of Bessel functions?
One approach is the brute force method of evaluating at all points at fixed intervals and when it nears zero write value, this can be combined with adaptive step size. Another approach is ...
2
votes
2
answers
106
views
ODE Event detection for calculating multiple roots of continuous sinusoidal equation
I found a paper [1] that has a method for computing rise and set times of a satellite given a closed form solution. It is a complicated sinusoidal function and the paper has a method to calculate a ...
3
votes
1
answer
88
views
Robust ways to find zeros of the Tricomi confluent hypergeometric function as a function of its parameters
I'm solving a quantum mechanical problem, and the quantization condition requires me to solve the equation
$$
U\left(\frac12(\ell+1-E), \ell+1, r^2\right) = 0,
$$
where $U(a,b,z)$ is the confluent ...
1
vote
1
answer
115
views
Find the roots of a complicated polynomial
For the polynomial
$$p(x) = (x-1)(x-2) \cdots (x-20) - 2^{-23}x^{19}\, ,$$
I tried to use fzero() in MATLAB, and I set the interval to be $[0.5,1.5]\cdots [19.5,...
4
votes
1
answer
327
views
Efficient root finding algorithm for monotonic function
This is my first time asking a question here, so I may not be asking this in the right place. I am trying to find the roots of a monotonic function with as few function evaluations as possible.
I ...
6
votes
1
answer
640
views
Defining a condition number and termination criteria for Newton's method
The condition number of function evaluation
$$
\mathrm{cond}(f,x) := \left| \frac{x f'(x)}{f(x)} \right|
$$
is infinite at a root of $f$. Hence it is useless for rescaling a tolerance which defines an ...
8
votes
0
answers
114
views
Finding the smallest root of a function on $[0, \infty)$
I would like to find the smallest real root of a 1-D real-valued function $f(x)$ on the domain $x\in [0,\infty)$. In this problem, I can make the following guarantees on $f$:
$f$ does have a root at ...
2
votes
1
answer
52
views
Test on a set of high degree polynomials whose coefficients in {-1,0,1}
I'm looking for the best way of implementing the following algorithm: consider the set of all polynomials with a high degree (say, degree 30) whose coefficients ranges from a given set of values (say, ...
1
vote
1
answer
740
views
Confusion about determining the jacobian in a rootfinding algorithm
I have written some Python code to determine the numerical roots of the following non-linear equation:
$$f_m=\tan\lambda_m - \frac{\lambda_m}{1+a}$$
where $\lambda_m\gt0$ and $a\geq0$. The code is:
<...
0
votes
1
answer
421
views
Obtaining extra output argument(s) from the objective function used by fsolve in MATLAB
I have a MATLAB code (see below) that employs 'fsolve' from the optimization toolbox for a root finding problem.
The bottleneck is that, within the objective function calculation, there is a ...
1
vote
0
answers
168
views
vectorizing optimization or root finding [closed]
I need to find the roots of a function. I am currently using scipy.optimize.fsolve
...
1
vote
0
answers
51
views
Calculating fixed point inside limit cycle
So I'm working with a rather complicated dynamical system. Instead of writing it all out. It's probably easier if you just clone my git repository.
...
1
vote
2
answers
504
views
Dekker's method and fixed further border [closed]
Dekker's method and in its evolution Brent's method have as design goal to combine the certainty of a root, certified by function values of opposite sign in an increasingly smaller interval, of ...
1
vote
2
answers
145
views
Iterative root finding of 2-dimensional system of non-linear equations with monotonicity properties
Let $f(x,y)$ and $g(x,y)$ be two $\mathbb{R}^2\rightarrow\mathbb{R}$ functions, both strictly increasing in both arguments. Assume that they are well-behaved functions (continuous, differentiable, etc....
2
votes
1
answer
38
views
Finding common roots of two multivariate equations
I am trying to find points of a surface whose normal is parallel with the 3 dimensional axes (i.e. local maxima, minima and saddle points in x, y and z dimensions).
The function of the surface is ...
3
votes
1
answer
278
views
Fastest method forfinding a solution to x*log(x)
more specifically, $C x \log_2(x)- K = 0$, where $C$ and $K$ are constants ($\log_2$ means log base 2).
I was solving a topcoder problem, SortEstimate, which requires us to solve the aforementioned ...
6
votes
1
answer
194
views
Roots of a function for eigensystem
I want to find the roots for $\kappa$ for the equation
$$\sqrt{\alpha - 1} \cos{\left (\frac{\sqrt{2} \sqrt{\alpha - 1}}{2 \sqrt{\epsilon}} \right )} \cosh{\left (\frac{\sqrt{2} \sqrt{\alpha + 1}}{2 \...
2
votes
1
answer
201
views
Difference between Brent's and Alefeld-Potra-Shi for root finding
I need to find the (unique) root of a nonlinear function $f(x)$, $x \in \mathbb{R}$.
For the record, $f(x)$ is the CDF of a probability density minus a constant $0 < p < 1$ (I am inverting the ...
5
votes
1
answer
634
views
Efficient and stable computation of inverse CDF
What is the most efficient and numerically stable algorithm for computing the inverse CDF $F^{-1}(y)$ of a probability function, assuming that both the PDF $f(x)$ and the CDF $F(x)$ are known ...
8
votes
2
answers
136
views
Bracketing a discontinuity in a step function
I have the function
$f(x) = \begin{cases}
0 \:\: (x < a) \\ 1/2 \:\: (x = a)\\ 1 \:\: (x > a)
\end{cases}$,
where $a$ is unknown. I can compute the function for any value of $x$, and seek to ...
4
votes
1
answer
167
views
solving for unknown inside an expectation
I need to find roots for the following function:
$$f(\theta) \equiv E[R(\theta;\eta)]=0$$
for some unknown $\theta$ which is deterministic, while the expectation is taken over a normally ...
4
votes
1
answer
139
views
Finding self-kissing points on a plane curve?
I have a curve in the complex plane given by
$$ f(t) = \sum_k r_k\exp(2\pi\mathrm{i}(t+\varphi_k)p_k). $$
Some of the parameters are specially chosen: $r_k>0$, $\sum_k r_k=1$, $p_k\in\mathbb{Z}$, $\...
3
votes
2
answers
543
views
Bessel EVP and fzero
I am trying to solve the Eigenvalue problem
$$
x^2 y''+ x y' + x^2 y = \lambda^2 y\,,\quad x\in(0,1)\,,\quad
y(0)=0\,,\quad
y'(1)=y(1)
$$
The differential equation is the Bessel equation. The solution ...
4
votes
1
answer
84
views
Evaluate sine of a polynomial root close to $\pi$
Consider the polynomial
$$ p(x) = -514-462 x+359 x^2+1129 x^3+165 x^4+490 x^5-418 x^6+497 x^7-227 x^8+60 x^9-10 x^{10}, $$
whose root $A\approx 3.14$ is very close to $\pi$:
$$|A-\pi|=2.0746\times 10^...
2
votes
0
answers
67
views
Solving a nonlinear equation with a Markov process and RVs
Assume that we have the following equation and the following assumption. The scope is to solve for some particular variables expressed later.
Update
$$E_{t}\left[ b(A_{t+1})^{1-\gamma} *R_{t+1}^{-\...
3
votes
1
answer
310
views
Testing 1D root-finding procedures for robustness
How can I test whether a given 1D root-finding procedure is robust? I know that there are data sets and resources online for different kinds of optimization, but I have yet to find anything with ...
4
votes
2
answers
190
views
Non-linear root finding with positive definite Jacobian
I am dealing with a system of non-linear equations:
$$
f(\boldsymbol{x}) = \boldsymbol{y}, \;\;\; \boldsymbol{x}, \boldsymbol{y} \in \mathbb{R}^d.
$$
And I know that the Jacobian $J(\boldsymbol{x})$ ...
5
votes
0
answers
733
views
Finding roots of systems of equations with a Jacobian that is singular everywhere
Given $a\in\mathbb{R}^{mn\times n}$, find a $C\in\mathbb{R}^{n}$, $x\in\mathbb{R}^{m\times n}$ such that
$$
0 = f_{k}(\boldsymbol{C}, \boldsymbol{x}):=\sum_{i=1}^{m} C_{i} \left(\prod_{j=1}^{n} a_{kj}^...
6
votes
2
answers
252
views
Continuation procedure to solve for a 2D curve that satisfies f(x,y) = 0
I have some function of $R^2$, that must be numerically computed. For instance, I might be interested in a real-valued contour integral that begins from (x,y) = 0.
$$
f(x,y) = \Re\left[\int_0^{x + iy}...
7
votes
4
answers
8k
views
How to find more than one root of a polynomial?
This program finds the first root of the function f, defined in the code. There are 5 roots of this function. (x=1,2,3,4,5) I wish to find all of the roots in this program and print them to the screen....
10
votes
2
answers
3k
views
Find all the roots of a function in a given interval
I need to find all the roots of a scalar function in a given interval. The function may have discontinuities. The algorithm can have a precision of ε (e.g. it is ok if the algorithm doesn't find two ...
3
votes
1
answer
1k
views
Non-linear root finding when the Jacobian is almost singular
I'm trying to solve a system non linear-equations:
$$
\frac{\partial K(\mathbf{\lambda})}{\partial \lambda_i} - c_i = 0
$$
for $i = 1, \dots, 15$, using Newton's method:
$$
\lambda^{k + 1} = \lambda^k ...
11
votes
3
answers
4k
views
Solution of quartic equation
Is there a open C-implementation for the solution of quartic equations:
$$ax⁴+bx³+cx²+dx+e=0$$
I am thinking of an implementation of Ferrari's solution. On Wikipedia I read that the solution is ...
8
votes
5
answers
372
views
Iterative solution to a nonlinear equation
I appologize in advance if this question is silly.
I need to compute the root of
\begin{equation}
u -f(u) =0
\end{equation}
Where $u$ is a real vector and $f(u)$ is a real-vector valued function.
...
6
votes
2
answers
213
views
Is there a backward stable $\tilde{O}(n \log(1/\epsilon))$ algorithm to factor a complex polynomial?
Finding the roots of a complex polynomial is in general extremely numerically unstable, as discussed in (1). According to Pan ((2), (3)), this produces a cubic complexity lower bound, and he presents ...