Re: minimize with complex numbers

• To: mathgroup at smc.vnet.net
• Subject: [mg91300] Re: minimize with complex numbers
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Thu, 14 Aug 2008 07:00:01 -0400 (EDT)

```On 8/13/08 at 4:40 AM, shammashahbaz at yahoo.com (shama shahbaz) wrote:

>i have transformed my complex valued problem into real value problem as be=
low but still when i try to MInimize it i didnt get a solution

>(a1+b1i)x[1] +(a2+b2i) x[2]=0

You almost certainly have a syntax issue here. That is not to
say this isn't a valid Mathematica expression. Rather it almost
certainly isn't what you think.

This expression in Mathematica will evaluate as follows:

multiply this result by the *function* x evaluated at 1

multiply this result by the *function* x evaluated at 2

add the two products found above
then *set* the entire thing to 0

In essence, minimizing this expression is equivalent to
minimizing the constant 0 which clearly makes no sense.

First, what is it you are trying to represent as x[1]? Is this
supposed to be a subscripted variable?
If so, that is possible to do in Mathematica but not
particularly convenient. You can create subscripted variables
that behave like unsubscripted variables using the Notation
package. Failure to use that package will almost certainly give
results you don't expect at some point.

So, the first thing to get out of the problems you have is
simply not to use subscripted variables until you become more
expert with Mathematica.

Next, if you intended for the expression to be an *equation* you
need to be aware a single "=" is an assignment operator in
Mathematica. Equations are expressed using a double "=", e.g.

x + y == 0

would be an equation in Mathematica.

But for a minimization problem, it really doesn't make sense to
minimize an equation.

>Minimize[{(0.83 u1+0.4 u2-0.25 u3+3 u4+0.16 v1+0.6 v2+1.25 v3-2 v4)2+(2 u1=
-0.16 u2-0.6 u3-1.25 u4+3 v1+0.83 v2+0.4 v3-0.25 v4)2+(0.4 u1-0.25 u2+3 u3+=
0.83 u4+0.6 v1+1.25 v2-2 v3+0.16 v4)2+(-1.25 u1+2 u2-0.16 u3-0.6 u4-0.25 v1=
+3 v2+0.83 v3+0.4 v4)2+(-0.25 u1+3 u2+0.83 u3+0.4 u4+1.25 v1-2 v2+0.16 v3+0=
.6 v4)2+(-0.6 u1-1.25 u2+2 u3-0.16 u4+0.4 v1-0.25 v2+3 v3+0.83 v4)2+(3 u1+0=
.83 u2+0.4 u3-0.25 u4-2 v1+0.16 v2+0.6 v3+1.25 v4)2+(-0.16 u1-0.6 u2-1.25 u=
3+2 u4+0.83 v1+0.4 v2-0.25 v3+3 v4)2},{u1>0,v1>0,u2>0,v2>0,u3>0,v3>0,u4>0,v=
4>0},{u1,v1,u2,v2,u3,v3,u4,v4}]

>The error is
>Minimize::vdom : Variable domain {u1,v1,u2,v2,u3,v3,u4,v4}
>should be either Reals or Integers. i didnt understand it can
>anybody tell me what should i do .

The first thing you should do when you get an error message you
don't understand is read the online documentation for the
function you are trying to use. In particular for Minimize you
will find it expects at most three arguments

an expression to minimize
a list of variables
a domain for those variable

You provided

an expression to minimize
a list of inequalities
a list of variables

Mathematica saw the third argument wasn't a valid domain and
generated the error message you saw

If you look at the examples in the online documentation you will
see the constraints on the variables are to be included in a
single list with the expression to be minimized. That is:

Minimize[{x - 2 y, x^2 + y^2 <= 1}, {x, y}]

will minimize x 2 y subject to the constraint x^2 + y^2 <=1

But

Minimize[{x - 2 y}, {x^2 + y^2 <= 1}, {x, y}]

will generate the same kind of error message you saw.

However, when I correct your syntax to be what Minimize expects,
I get the result that the expression is 0 when all of the
variables are 0. Since that almost certainly isn't a useful
result, I strongly suspect you have other problems that are not