From: Kiril on
Hi folks, i have to find max of this function fun = @(x1, x2) (46 - 7.5*x1 - 3.5*x2 - 18.333*x1^2);
I mean have to write code in matlab to find the max of this function (if exist). But i never work with Optim toolbox. So can someone help me i have one day to do it, i'll never managed to read optim toolbox so fast? Please help .....
Thanks !
From: Walter Roberson on
Kiril wrote:
> Hi folks, i have to find max of this function fun = @(x1, x2) (46 -
> 7.5*x1 - 3.5*x2 - 18.333*x1^2);
> I mean have to write code in matlab to find the max of this function (if
> exist).

You can see trivially that a maximum does not exist: since x2 appears
linearly, for any given x1, one of x2 = infinity or x2 = -infinity will
be infinity.
From: Kiril on
> You can see trivially that a maximum does not exist: since x2 appears
> linearly, for any given x1, one of x2 = infinity or x2 = -infinity will
> be infinity.

O.K. ... but i have to write code to prove it! that's my project!
From: Mark Shore on
"Kiril " <kkirqkov(a)gmail.com> wrote in message <huq24h$soh$1(a)fred.mathworks.com>...
> > You can see trivially that a maximum does not exist: since x2 appears
> > linearly, for any given x1, one of x2 = infinity or x2 = -infinity will
> > be infinity.
>
> O.K. ... but i have to write code to prove it! that's my project!

Without a bounding interval: see Walter Roberson's comment. This seems an inappropriate function to use for this type of class assignment.
From: Rune Allnor on
On 10 Jun, 08:53, "Kiril " <kkirq...(a)gmail.com> wrote:
> > You can see trivially that a maximum does not exist: since x2 appears
> > linearly, for any given x1, one of x2 = infinity or x2 = -infinity will
> > be infinity.
>
> O.K. ... but i have to write code to prove it! that's my project!

That's not possible: One can not *prove* anything by
means of code. If you want proof, you will need to
do the analytical analysis.

Rune