Zeros of complex function in SciPy

Click For Summary
SUMMARY

The method scipy.optimize.Newton() can be utilized to find the roots of complex functions, provided that the first derivative is supplied. A key requirement is that the initial guess must have a non-zero imaginary part to ensure convergence to a complex root. For example, to find the roots of the function f(z) = 1 + z^2, one must start with an initial guess that includes an imaginary component. This approach is essential for solving more complex functions effectively.

PREREQUISITES
  • Understanding of complex functions and their properties
  • Familiarity with Python programming language
  • Knowledge of numerical methods, specifically Newton's method
  • Experience with the SciPy library, particularly scipy.optimize
NEXT STEPS
  • Explore the documentation for scipy.optimize.Newton() to understand its parameters and usage
  • Learn about complex derivatives and how to compute them
  • Investigate other root-finding methods in SciPy, such as scipy.optimize.root()
  • Practice solving complex functions using Python with examples beyond f(z) = 1 + z^2
USEFUL FOR

Mathematicians, data scientists, and software developers interested in numerical analysis and root-finding techniques for complex functions using Python and SciPy.

PeteyCoco
Messages
37
Reaction score
1
I've been told that the method scipy.optimize.Newton() will solve complex functions so long as the first derivative is provided. I can't make it work. The documentation for Newton() mentions nothing of complex functions. Could someone show me how one would find the roots of a function like f(z) = 1 + z^2 in SciPy? I need to solve something much more complex, but a simple example will help me immensely.
 
Physics news on Phys.org
Please read the forum rules. Double posts are not allowed.
 
phinds said:
Please read the forum rules. Double posts are not allowed.

I realized that I posted in the wrong forum, but can't delete the old thread. I reported it.
 
I don't know anything about Python, but if you want to find a complex root by Newton's method, make sure the imaginary part of your initial guess is non-zero. Otherwise, the iterations will probably never leave the real line, and therefore won't converge to a complex root.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K