Solve nonlinear complex equations
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ed
el 10 de Feb. de 2013
Comentada: Meng Li
el 21 de Jul. de 2015
Hello,
I am trying to numerically solve a nonlinear complex equation and I would like to find all the complex roots. The equation is of the type:
cot(z)*z = 1-z^2*(1+i*z)
Does a specific function exist to find all the complex roots or do I need to separate z in the real and imaginary parts?
Thanks in advance for your help!
0 comentarios
Respuesta aceptada
Matt J
el 10 de Feb. de 2013
Editada: Matt J
el 10 de Feb. de 2013
If you have the Symbolic Math Toolbox, I think SOLVE can be used to get complex-valued solutions. For the numerical solvers, I'm pretty sure you do have to reformulate the problem in terms of real and complex parts. Also, I've never heard of a numerical solver that will robustly find multiple roots for anything except polynomials.
11 comentarios
Walter Roberson
el 21 de Jul. de 2015
You should start a new Question on this.
eff does not appear on the right hand side of your question so I do not know what the (eff) on the left relates to.
You define alpha_n and beta_n in terms of Delta(a) and Delta(c) but there is no obvious way of calculating either of those.
In your Delta(eff) formula, is 4ac = 4*a*c ?
Is alpha_n indicating alpha indexed at n?
Is the sum over odd n from 1 to infinity?
If Delta is being defined recursively (because it is defined in terms of alpha_n and beta_n that are defined in terms of Delta) then you need an initial condition.
Meng Li
el 21 de Jul. de 2015
Delta(eff) is a experimentally measured value and this value can be separated into Delta(a) and Delta(c) through the first equation.
Yes. 4ac=4*a*c; Yes. alpha_n indicating alpha at n; Yes. the sum is over integer from 1 to infinity;
If I want to solve the equation, I should give some initial guess value for Delta(a) and Delta(c). Because the function 'fminsearch' can only give local solutions, I think the initial guess will be very important.
Más respuestas (1)
Azzi Abdelmalek
el 10 de Feb. de 2013
Use fzero function
doc fzero
f=@(z)cot(z)*z -(1-z^2*(1+i*z))
z0=i;
sol=fzero(f,z0); % the solution is near z0
2 comentarios
Matt J
el 10 de Feb. de 2013
Editada: Matt J
el 10 de Feb. de 2013
It's interesting that this worked for z0=i, but it appears to be just a fluke. FZERO can't really handle complex-valued functions. Note,
>> sol=fzero(f,1+i)
Error using fzero (line 309)
Function value at starting guess must be finite and real.
Ver también
Categorías
Más información sobre Solver-Based Nonlinear Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!