Re: Experimental`'NumericalFunction''

• To: mathgroup at smc.vnet.net
• Subject: [mg115971] Re: Experimental`'NumericalFunction''
• From: Peter Pein <petsie at dordos.net>
• Date: Fri, 28 Jan 2011 06:11:53 -0500 (EST)
• References: <ihrb5t\$8sl\$1@smc.vnet.net>

```Taking a look at earlier posts allows the guesses:
n=5;d[n+1]=0;p=43/500;q=1;conj=Conjugate;

after entering f as shown below and
Cases[f, _Complex, Infinity] // Length
we see that there are 192 complex terms in f, but this is not what the

In[12]:= Cases[
simpf = Simplify[ComplexExpand[f]], _Complex, \[Infinity]]
Out[12]= {}

In[13]:=
FindMinimum[{simpf,Sum[a[i]^2+b[i]^2,{i,0,n}]==1},Variables[simpf]]//Chop
Out[13]=
{-1.,{a[0]->0,a[1]->0.707107,a[2]->0,a[3]->0,a[4]->0,a[5]->0,b[0]->0,b[1]->0.707107,b[2]->0,b[3]->0,b[4]->0,b[5]->0}}

In[14]:=
NMinimize[{simpf,Sum[a[i]^2+b[i]^2,{i,0,n}]==1},Variables[simpf]]//Chop
Out[14]=
{-1.,{a[0]->0,a[1]->0.906539,a[2]->0,a[3]->0,a[4]->0,a[5]->0,b[0]->0,b[1]->0.422122,b[2]->0,b[3]->0,b[4]->0,b[5]->0}}

In[15]:= a[1]^2+b[1]^2/.Last[%]
Out[15]= 1.

and again |d[1]|=1 seems to be the solution.

Peter

On 27.01.2011 09:42, DrMajorBob wrote:
> You didn't tell us what "conj" is or what values "q" and "i" have, and you
> didn't show the NMinimize statement.
>
> Bobby
>
> On Wed, 26 Jan 2011 04:03:42 -0600, tarun dutta<tarunduttaz at gmail.com>
> wrote:
>
>> NMinimize::nnum: The function value
>> Experimental`NumericalFunction[{Hold[prob],Block},{{{},Hold[a[0]]},
>> {{},Hold[a[1]]},{{},Hold[a[2]]},{{},Hold[a[3]]},{{},Hold[a[4]]},
>> {{},Hold[a[5]]},{{},Hold[b[0]]},{{},Hold[b[1]]},{{},Hold[b[2]]},
>> {{},Hold[b[3]]},<<2>>},{{<<1>>}},{<<1>>},{444,<<5>>,None},
>> {None,None,None}] is not a number at
>> {a[0],a[1],a[2],a[3],a[4],a[5],b[0],b[1],b[2],b[3],<<2>>} =
>> {0.304936,0.266141,0.365626,0.132704,0.870404,0.952376,-0.523097,0.275125,-0.797803,0.291049,<<2>>}.
>>>>
>>
>> the expression what I am using does not contain any imaginary parts
>> after simplification,still it shows above error..the expression ( f )
>> is following-----
>>
>> d[i_] = a[i] + I*b[i];
>> f = Together[
>>     Sum[4*p*(Sqrt[i + 1]*d[i]*
>>           conj[d[i + 1]]*(Sum[
>>             Sqrt[i + 1]*conj[d[i]]*d[i + 1], {i, 0, n}]) +
>>          Sqrt[i + 1]*conj[d[i]]*
>>           d[i + 1]*(Sum[
>>             Sqrt[i + 1]*d[i]*conj[d[i + 1]], {i, 0, n}])) + (i (i -
>>             1) - q*i)* d[i]*conj[d[i]], {i, 0, n}]];
>>
>> so kindly give some valuable insight...
>> with regards,
>> tarun
>>
>
>

```

• Prev by Date: Re: eigenstructure table in linear model fit
• Next by Date: Re: Declaring the golbal variables in Packages
• Previous by thread: Re: Experimental`'NumericalFunction''
• Next by thread: importing DICOM files not working in 8.0