Hot answers tagged

8 votes

Fastest method forfinding a solution to x*log(x)

This equation is not polynomial. Assuming both $K$ and $C$ are positive (as in your linked problem), then the solution of $C x \ln_2(x) - K = 0$ can be found in terms of the Lambert $W$ function or ...
horchler's user avatar
  • 763
5 votes
Accepted

Roots of a function for eigensystem

I suspect the main problem is the magnitude of the values. If you divide through by $\cosh$ to make all the numbers smaller, then ApproxFun doesn't seem to have a problem finding all the roots. ...
Kirill's user avatar
  • 11.4k
5 votes

What is an efficient way to calculate zeros of Bessel functions?

This is a classical problem in numerical methods research: evaluating the zeros of special functions. Many years of research have gone into devising efficient methods. The canonical starting point for ...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Efficient root finding algorithm for monotonic function

It seems your main concern is bracketing the root in as few iterations as possible, since each iteration is costly. In some cases you have found the regula falsi method to be unreliable, suggesting ...
Simply Beautiful Art's user avatar
4 votes

Finding the roots of a function like $3+\cos(x)+0.005/(x-a)$?

I suggest you sample the function and fit a rational function to the samples. You can find $a$ among the poles of the rational function, and the root among the real zeros. There are many good methods ...
Amit Hochman's user avatar
  • 1,081
3 votes

Finding the roots of a function like $3+\cos(x)+0.005/(x-a)$?

This is a standard problem in numerical analysis. The standard approach if you can't compute derivatives of the function is to use a "bisection search" or, if you want to be fancy, its ...
Wolfgang Bangerth's user avatar
3 votes

Find the roots of a complicated polynomial

One technique is to use a library with arbitrary large integers and use fixed point arithmetic. Just scale up x by some integer factor, then compute your polynomial in fixed-point, keeping only the ...
Jeffrey's user avatar
  • 131
3 votes

ODE Event detection for calculating multiple roots of continuous sinusoidal equation

Assuming it is not too expensive to evaluate the function, I would recommend using the chebfun toolbox (matlab), as shown here: https://www.chebfun.org/docs/guide/guide03.html It builds an ...
Amit Hochman's user avatar
  • 1,081
3 votes

Iterative root finding of 2-dimensional system of non-linear equations with monotonicity properties

Because the functions are strictly increasing, this can be reduced to the one-dimensional case. In each one-dimensional problem there are more efficient standard methods available, more efficient than ...
Kirill's user avatar
  • 11.4k
3 votes
Accepted

Efficient and stable computation of inverse CDF

The assumptions you have are no more specific than what you need to assume to make something like Newton's method work. In fact, you don't even assume enough to make the problem unique: you only ...
Wolfgang Bangerth's user avatar
2 votes
Accepted

Difference between Brent's and Alefeld-Potra-Shi for root finding

The asymptotic order of convergence of Brent's method tends to be either 1.618 and 1.689, of which the Alefeld-Potra-Shi's methods lie directly in between. The main difference of the Alefeld-Potra-Shi'...
Simply Beautiful Art's user avatar
2 votes
Accepted

Finding self-kissing points on a plane curve?

There exists a clever algorithm for doing this, based on ideas due to Cayley, using the Bézout matrix. I learned this from [1], which describes an algorithm for a generic version of this problem. If ...
Kirill's user avatar
  • 11.4k
2 votes
Accepted

Confusion about determining the jacobian in a rootfinding algorithm

If you look at the full output of your script, sol has fields ipvt and qtf. Both of these ...
Kirill's user avatar
  • 11.4k
2 votes

ODE Event detection for calculating multiple roots of continuous sinusoidal equation

I don't know about a generalized approach, but satellite around Earth can not physically orbit around it in less than about 87 minutes; at an altitude of 100 km the period is about 5190 seconds, but ...
uhoh's user avatar
  • 1,038
2 votes

Robust ways to find zeros of the Tricomi confluent hypergeometric function as a function of its parameters

It looks like the eigenvalues depend smoothly on your $r$ parameter. Since the problem seems to be easy to solve for small values of $r$, you can compute the eigenvalues for a set of radii $r_1,r_2,...
Wolfgang Bangerth's user avatar
2 votes

Dekker's root-finding method and fixed interval border (should shrink to root)

A full log of the Dekker method run as in [1] confirms your observation and shows that the example is indeed a bad situation for the Dekker method, a combination of a multiple root inside the start ...
Lutz Lehmann's user avatar
  • 5,984
2 votes
Accepted

Defining a condition number and termination criteria for Newton's method

Any reasonable convergence criterion must be invariant to scaling of the function. A decent stopping criterion is therefore if $\|f(x_k)\|≤ \epsilon\|f(x_0)\|$ where $x_0$ is the starting point of the ...
Wolfgang Bangerth's user avatar
1 vote

Finding the roots of a function like $3+\cos(x)+0.005/(x-a)$?

As I understand, your function (call it $f(x)$) has only one simple pole at $x=a$ and possibly more than one zero, and $a$ is not known, except that it is in $[0,2\pi]$. In addition, you do not know $...
Avram Sidi's user avatar
1 vote

Test on a set of high degree polynomials whose coefficients in {-1,0,1}

You can use backtracking to generate your polynomials. This can be parallelized in pretty much any language you choose. You may also want to call the Sturm sequence finder in the FLINT library from ...
Juan M. Bello-Rivas's user avatar
1 vote
Accepted

Obtaining extra output argument(s) from the objective function used by fsolve in MATLAB

As I said in my comment, I don't think you can necessarily count on the value of x in the last call to your function being the value that is returned as the ...
Bill Greene's user avatar
  • 5,984
1 vote
Accepted

Finding common roots of two multivariate equations

The derivatives $\partial_u f(u,v)$ and $\partial_v f(u,v)$ are two vectors tangent to yor surface that in general span the tangent space to the surface at the point $f(u,v)$. Then the normal vector ...
Futurologist's user avatar
1 vote

Solution of quartic equation

Numerical recipes in c provides closed form expression for real roots of quadratic and cubic which presumably have decent precision. Since the algebraic solution of the quartic involves solving a ...
Nemocopperfield's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible