Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Constrained Maximisation' topicStudent Support Forum > General > "Constrained Maximisation"

Next Comment >Help | Reply To Topic
Author Comment/Response
Urs Baer
12/31/98 09:32am

Can anybody please tell me why in the numerical maximisation problem given
below, the constraint that s >= 0 is not recognized by Mathematica? The
answer says: ''{s>=0} does not contain any valid equations or inequalities.''
I want to find a non-negative s so that the expression gets to its maximum.

Thank you
Urs

\!\(\*
RowBox[{
\(y[0] := 1.40\), '';'', \(y[1] := 1.50\), '';'', \(y[2] := 1.40\), '';'',
\(y[3] := 1.50\), '';'', \(y[4] := 1.40\), '';'', '' '', \(y[5] := 1.50\),
'';'',
\(y[6] := 1.40\), '';'', \(y[7] := 1.50\), '';'', \(y[8] := 1.40\), '';'',
\(y[9] := 1.50\), '';'', \(y[10] := 1.40\), '';'', ''\n'',
\(PP[0]\ := \ 1000\), '';'', \(he[0] := \ \(-10\)\), '';'', ''\n'',
RowBox[{''For'', ''['',
RowBox[{
\(t = 1\), '','', '' '', \(i\ < \ 11\), '','', '' '', \(t++\), '','', '' '',
''\n'',
'' '',
RowBox[{\(x[t]\ := \ ln \((y[t]/y[t - 1])\)\), '';'', ''\n'', '' '',
RowBox[{
StyleBox[\(PP[t]\),
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox['':='',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
RowBox[{
StyleBox[\(PP[t - 1]\),
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''+'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
SuperscriptBox[
StyleBox[''s'',
FontFamily->''Arial''], \(\n2\)]}]}], '';'', ''\n'', '' '',
\(F[t]\ := \ PP[t]\ + \ 4.9348\), '';'', ''\n'', '' '',
\(K[t]\ := \ PP[t]\ *\ F[t]\^\(-1\)\), '';'', ''\n'', '' '',
RowBox[{
StyleBox[\(he[t]\),
FontFamily->''Arial''],
StyleBox['':='',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
RowBox[{
StyleBox[\(he[t - 1]\),
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''+'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
RowBox[{
StyleBox[\(K[t]\),
FontFamily->''Arial''],
StyleBox[''*'',
FontFamily->''Arial''],
RowBox[{
StyleBox[''('',
FontFamily->''Arial''],
RowBox[{
StyleBox[''1.27036'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''+'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
RowBox[{
StyleBox[''ln'',
FontFamily->''Arial''],
RowBox[{
StyleBox[''('',
FontFamily->''Arial''],
SuperscriptBox[
StyleBox[\(x[t]\),
FontFamily->''Arial''], ''2''],
StyleBox['')'',
FontFamily->''Arial'']}]}],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''-'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[\(he[t - 1]\),
FontFamily->''Arial'']}],
StyleBox['')'',
FontFamily->''Arial'']}]}]}]}],
StyleBox['';'',
FontFamily->''Arial''], ''\n'', '' '',
RowBox[{
StyleBox[\(P[t]\),
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox['':='',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
RowBox[{
RowBox[{
SuperscriptBox[
StyleBox[\((1 - K[t])\),
FontFamily->''Arial''], ''2''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''*'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[\(PP[t]\),
FontFamily->''Arial'']}],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''+'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
RowBox[{
StyleBox[''4.9348'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''*'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
SuperscriptBox[
StyleBox[\(K[t]\),
FontFamily->''Arial''], ''2'']}]}]}], '';'', ''\n'', '' '',
RowBox[{
StyleBox[\(q[t]\),
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox['':='',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
RowBox[{
RowBox[{
StyleBox[''ln'',
FontFamily->''Arial''],
RowBox[{
StyleBox[''('',
FontFamily->''Arial''],
SuperscriptBox[
StyleBox[\(x[t]\),
FontFamily->''Arial''], ''2''],
StyleBox['')'',
FontFamily->''Arial'']}]}],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''+'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''1.27036'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[''-'',
FontFamily->''Arial''],
StyleBox['' '',
FontFamily->''Arial''],
StyleBox[\(he[t - 1]\),
FontFamily->''Arial'']}]}],
StyleBox['';'',
FontFamily->''Arial'']}]}], ''\n'', '']''}], '';'', ''\n'',
RowBox[{''ConstrainedMax'', ''['',
RowBox[{
RowBox[{''{'',
RowBox[{
RowBox[{\(\(-1\)/2\), ''*'',
RowBox[{''Sum'', ''['',
StyleBox[\(F[t], {t, 10}\),
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
StyleBox['']'',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}]}]}],
StyleBox[''-'',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
RowBox[{
StyleBox[\(1/2\),
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
StyleBox[''*'',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
RowBox[{
StyleBox[''Sum'',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
StyleBox[''['',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
RowBox[{
StyleBox[
RowBox[{
SuperscriptBox[
StyleBox[\(q[t]\),
FontSize->10], ''2''],
StyleBox[''/'',
FontSize->10],
StyleBox[\(F[t]\),
FontSize->10]}],
FontFamily->''Courier'',
FontSize->14,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
StyleBox['','',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
StyleBox[\({t, 10}\),
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}]}],
StyleBox['']'',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}]}]}]}],
StyleBox[''}'',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}]}], '','',
StyleBox[\({s >= 0}\),
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
StyleBox['','',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}],
StyleBox[\({s}\),
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}]}],
StyleBox['']'',
FontFamily->''Courier'',
FontSize->10,
FontWeight->''Plain'',
FontSlant->''Plain'',
FontTracking->''Plain'',
FontColor->GrayLevel[0],
FontVariations->{''Underline''->False,
''Outline''->False,
''Shadow''->False,
''StrikeThrough''->False}]}]}]\)




URL: ,

Subject (listing for 'Constrained Maximisation')
Author Date Posted
Constrained Maximisation Urs Baer 12/31/98 09:32am
Re: Constrained Maximisation Forum Modera... 12/31/98 09:39am
Re: Unconstrained Maximisation Urs Baer 01/03/99 10:18am
Re: Unconstrained Maximisation Forum Modera... 01/03/99 12:34pm
Re: Constrained Maximisation Urs Baer 01/03/99 10:25am
Re: Constrained Maximisation Forum Modera... 01/03/99 12:30pm
Re: Constrained Maximisation Urs Baer 01/05/99 07:56am
Unconstrained Maximisation Urs Baer 01/12/99 10:33am
Re: Unconstrained Maximisation Forum Modera... 01/12/99 11:01am
Next Comment >Help | Reply To Topic