0

Methods to solve(root finding) the function with the restricted domain.

Suppose to solve the function

$sin^{-1}(\sqrt{E_n/V}) +a*\sqrt{2mE_n/h^2}=n*\pi$ 

where

$E_n,V,a,m,h n$ were all positive.

I tried to use Newton-Raphson Method to solve it where I realized that the input of those function must be positive thus from divergence

$iterate E_{n}(i+1)$ 

might be negative, thus produce a false result and stop the iteration.

The only solution I could found was thorough trust zone methods as

 $E_n<=V$ 

was guaranteed by the function's physical meaning. However, it took much longer time.

Was there a way to use some fast computation like Newton-Raphson Method for this expression.

  • 2
    You could try expressing each of the positive variables as squares of unconstrained variables. (`F^2_n` instead of `E_n`, `W^2` instead of `V`, etc.) – Ted Hopp Mar 25 '18 at 06:10
  • You could also use the secant method (or a hybrid NR), which requires an initial range. Conveniently `arcsin` requires an argument in the range `[-1, 1]`, and the sign requirement for `E` reduces this to `[0, 1]`. – meowgoesthedog Mar 25 '18 at 20:57
  • when I am too lazy to do the math or unable or nothing else works for such cases I use this [How approximation search works](https://stackoverflow.com/a/36163847/2521214) the main trick is to select the bounds and steps but you already have the bounds ... – Spektre Mar 26 '18 at 11:26
  • I guess you're solving equation for E and rest are constant parameters. Then you can use Ridders method which converges quadratically or revert to bisection if Newton iteration takes you out of root bracket – Shimuuar Mar 26 '18 at 21:53

1 Answers1

0

Summary from the comments to close the topic.

If the input of the funciton was restricted to, i.e.>0.

  1. We could set m^2_n instead of x as squares of unconstrained variables – Ted Hopp

  2. Secant method – meowgoesthedog

  3. Ridders' method. - Shimuuar

  4. Trust zone methods.