MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Minimize with complex values

shama shahbaz wrote:
> HI
> i want to minimize the absolute value of the following expression  how ca=
> n i do this in methamatica

I assume you mean "Mathematica".

> [exp(pi/4) +exp(3*pi/4)*exp(jp)]+[exp(pi/4) *exp(-5*pi*/4)]+[exp(3*pi/4=
> )*exp(-3*pi*j/4)exp(jp)]+
> [exp(pi/4) *exp(-10*pi*j/4)]+[exp(pi/4) *exp(-3*pi*j/2)exp(jp)]+[exp(pi=
> /4)*exp(-15*pi*j/4)]+
> [exp(3*pi/4)*exp(-9*pi*j/4)exp(jp)]
> p is the unknown value ,and it represent the phase...which is other than 0 =
> there any way to calculate it.
> Regards

One way would be to write the objective function in viable Mathematica 
syntax, then use an optimization function such as NMinimize.

expression = Abs[Exp[Pi/4] + Exp[3*Pi/4]*Exp[I*p] +
   Exp[Pi/4]*Exp[-5*Pi*I/4] + Exp[3*Pi/4]*Exp[-3*Pi*I/4]*Exp[I*p] +
   Exp[Pi/4]*Exp[-10*Pi*I/4] + Exp[Pi/4]*Exp[-3*Pi*I/2]*Exp[I*p] +
   Exp[Pi/4]*Exp[-15*Pi*I/4] + Exp[3*Pi/4]*Exp[-9*Pi*I/4]Exp[I*p]];

In[3]:= NMinimize[expression, p]
Out[3]= {14.1582, {p -> -1.87025}}

Generally speaking, if you want to use Mathematica on a problem, you 
will need to use Mathematica syntax and Mathematica functions.

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Re: Minimize with complex values
  • Next by Date: Re: Help to remove equivalent (redundant) solutions from FindRoot[]
  • Previous by thread: Minimize with complex values
  • Next by thread: Re: Minimize with complex values