nonlinear complex equation using fminsearch

Hi
I want to solve equation like below with using Matlab - fminsearch function- but results shows that if initial value changes then results for function will be different. Can you help me to solve the nonlinear complex equation like this? (a is complex =a’+ia”)
f(a)=(a-i+1)(a+i-1)/(a^2+1)=0
For other samples when f(x)=f’(x)+if”(x) too.

3 comentarios

Hossein
Hossein el 13 de Jun. de 2016
Hi Could you solve the problem? I have faced the similar problem, yet cannot solve it.
John D'Errico
John D'Errico el 13 de Jun. de 2016
Editada: John D'Errico el 13 de Jun. de 2016
Note that fminsearch does not apply to complex results. This is essentially true of all optimizers, since a complex number is truly a vector quantity. Optimizers like fminsearch can only be used on scalar valued functions.
Anyway, the complex numbers do not have a simple relational operator that applies to them, so one cannot say that if a and b are complex numbers, that a<b or a> b. You CAN choose to compare only the real part of those numbers, or the magnitude, etc.
In MATLAB, the relational operators (inequality tests) apply to the real parts of a number, comparing only that aspect.
In the case of your equation “(a-i+1)(a+i-1)/(a^2+1)=0” the two solutions are obvious, namely
a = i-1
and
a = 1-i
This is because a quotient of finite complex numbers is zero if and only if the numerator is zero, and a product of finite complex numbers is zero if and only if one or both of the factors is zero.
Quite aside from not being able to handle complex values, the ‘fminsearch’ function is totally inappropriate for solving your equations. You are not asking for a minimum, but rather the solution to an exact equation.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Optimization en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Oct. de 2013

Comentada:

el 14 de Jun. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by