From: leo leonardo on
I have a quadratic polynomial in n variables that mean it has the form
f(x)=(a*X1^2)+(b*X1*x2)+(c*X2^2)+d+....+(e*X15^2)+(f*X15*X16)+(g*X16^2)+h

a,b,c,d,e,f,g are constant.
I want to find at which X1 X2 ...X16 the f(x) has the miniumm value that mean i want to find at which value of X1 X2 ...X16 we have dF(x)/dx = 0
could you helpe me please to solve that in Matlab?
From: Matt J on
"leo leonardo" <haboubg(a)hotmail.com> wrote in message <hnrbav$ts$1(a)fred.mathworks.com>...
> I have a quadratic polynomial in n variables that mean it has the form
> f(x)=(a*X1^2)+(b*X1*x2)+(c*X2^2)+d+....+(e*X15^2)+(f*X15*X16)+(g*X16^2)+h
>
> a,b,c,d,e,f,g are constant.
> I want to find at which X1 X2 ...X16 the f(x) has the miniumm value that mean i want to find at which value of X1 X2 ...X16 we have dF(x)/dx = 0
> could you helpe me please to solve that in Matlab?
==============


But it's clear from the formula that dF(x)/dx = 0 occurs when all Xi=0.
From: leo leonardo on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hnrco0$ouv$1(a)fred.mathworks.com>...
> "leo leonardo" <haboubg(a)hotmail.com> wrote in message <hnrbav$ts$1(a)fred.mathworks.com>...
> > I have a quadratic polynomial in n variables that mean it has the form
> > f(x)=(a*X1^2)+(b*X1*x2)+(c*X2^2)+d+....+(e*X15^2)+(f*X15*X16)+(g*X16^2)+h
> >
> > a,b,c,d,e,f,g are constant.
> > I want to find at which X1 X2 ...X16 the f(x) has the miniumm value that mean i want to find at which value of X1 X2 ...X16 we have dF(x)/dx = 0
> > could you helpe me please to solve that in Matlab?
> ==============
>
>
> But it's clear from the formula that dF(x)/dx = 0 occurs when all Xi=0.

thank you but i don't want solution with zero i want any another solution
From: Matt J on
"leo leonardo" <haboubg(a)hotmail.com> wrote in message <hnreg7$q04$1(a)fred.mathworks.com>...
> "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hnrco0$ouv$1(a)fred.mathworks.com>...
> > "leo leonardo" <haboubg(a)hotmail.com> wrote in message <hnrbav$ts$1(a)fred.mathworks.com>...
> > > I have a quadratic polynomial in n variables that mean it has the form
> > > f(x)=(a*X1^2)+(b*X1*x2)+(c*X2^2)+d+....+(e*X15^2)+(f*X15*X16)+(g*X16^2)+h
> > >
> > > a,b,c,d,e,f,g are constant.
> > > I want to find at which X1 X2 ...X16 the f(x) has the miniumm value that mean i want to find at which value of X1 X2 ...X16 we have dF(x)/dx = 0
> > > could you helpe me please to solve that in Matlab?
> > ==============
> >
> >
> > But it's clear from the formula that dF(x)/dx = 0 occurs when all Xi=0.
>
> thank you but i don't want solution with zero i want any another solution


If you write down the gradient of f(x) and set it equal to zero, you will get a set of linear equations which in matrix form will look like

A*x=0

If A is singular, x=0 is the only solution. If A is non-singular, the solutions are given by null(A).

However, if x=0 is an unacceptable solution, it's a little hard to see why any solution in the null space of A would be adequate to you. What if I give you a solution that is super-close to x=0, but not equal to it?
From: leo leonardo on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hnrjiq$niv$1(a)fred.mathworks.com>...
> "leo leonardo" <haboubg(a)hotmail.com> wrote in message <hnreg7$q04$1(a)fred.mathworks.com>...
> > "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hnrco0$ouv$1(a)fred.mathworks.com>...
> > > "leo leonardo" <haboubg(a)hotmail.com> wrote in message <hnrbav$ts$1(a)fred.mathworks.com>...
> > > > I have a quadratic polynomial in n variables that mean it has the form
> > > > f(x)=(a*X1^2)+(b*X1*x2)+(c*X2^2)+d+....+(e*X15^2)+(f*X15*X16)+(g*X16^2)+h
> > > >
> > > > a,b,c,d,e,f,g are constant.
> > > > I want to find at which X1 X2 ...X16 the f(x) has the miniumm value that mean i want to find at which value of X1 X2 ...X16 we have dF(x)/dx = 0
> > > > could you helpe me please to solve that in Matlab?
> > > ==============
> > >
> > >
> > > But it's clear from the formula that dF(x)/dx = 0 occurs when all Xi=0.

thank you for your help.I think your solution is right but i think i will have A*x=B
and not A*x=0 because in my equation i have vorgotten that i have some kX
k is constant.which mean at the end if the matrix A is non singular i will have solution.
thank you very much once again.
> >
> > thank you but i don't want solution with zero i want any another solution
>
>
> If you write down the gradient of f(x) and set it equal to zero, you will get a set of linear equations which in matrix form will look like
>
> A*x=0
>
> If A is singular, x=0 is the only solution. If A is non-singular, the solutions are given by null(A).
>
> However, if x=0 is an unacceptable solution, it's a little hard to see why any solution in the null space of A would be adequate to you. What if I give you a solution that is super-close to x=0, but not equal to it?