Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to solve a non linear third oder algebraic equation

Subject: How to solve a non linear third oder algebraic equation

From: hk

Date: 4 Apr, 2013 07:41:15

Message: 1 of 11

hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
syms q0 q1
equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;

you help is highly apprecitaed!!!

Subject: How to solve a non linear third oder algebraic equation

From: Torsten

Date: 4 Apr, 2013 08:55:15

Message: 2 of 11

"hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> syms q0 q1
> equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
>
> you help is highly apprecitaed!!!

q0=q1=0 looks fine to me :-).

Best wishes
Torsten.

Subject: How to solve a non linear third oder algebraic equation

From: hk

Date: 4 Apr, 2013 13:30:11

Message: 3 of 11

"Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > syms q0 q1
> > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> >
> > you help is highly apprecitaed!!!
>
> q0=q1=0 looks fine to me :-).
>
> Best wishes
> Torsten.
mr.torsten,
thanks for reply.
But i want a solution other than q0=q1=0.& command or procedure to solve this equations

Subject: How to solve a non linear third oder algebraic equation

From: Torsten

Date: 4 Apr, 2013 14:38:17

Message: 4 of 11

"hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > syms q0 q1
> > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > >
> > > you help is highly apprecitaed!!!
> >
> > q0=q1=0 looks fine to me :-).
> >
> > Best wishes
> > Torsten.
> mr.torsten,
> thanks for reply.
> But i want a solution other than q0=q1=0.& command or procedure to solve this equations

Are you sure a non-trivial solution exists ?
When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...

Best wishes
Torsten.

Subject: How to solve a non linear third oder algebraic equation

From: Hari Kishore

Date: 5 Apr, 2013 01:29:07

Message: 5 of 11

"Torsten" wrote in message <kjk38p$hc7$1@newscl01ah.mathworks.com>...
> "hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > > syms q0 q1
> > > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > >
> > > > you help is highly apprecitaed!!!
> > >
> > > q0=q1=0 looks fine to me :-).
> > >
> > > Best wishes
> > > Torsten.
> > mr.torsten,
> > thanks for reply.
> > But i want a solution other than q0=q1=0.& command or procedure to solve this equations
>
> Are you sure a non-trivial solution exists ?
> When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...
>
> Best wishes
> Torsten.
hi..Mr.torsten,
Iwould be thankful if you post the code with watever initial guess you have considered!!!
thanks..

Subject: How to solve a non linear third oder algebraic equation

From: Torsten

Date: 5 Apr, 2013 06:25:06

Message: 6 of 11

"Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjl9d3$ev6$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kjk38p$hc7$1@newscl01ah.mathworks.com>...
> > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > > > syms q0 q1
> > > > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > >
> > > > > you help is highly apprecitaed!!!
> > > >
> > > > q0=q1=0 looks fine to me :-).
> > > >
> > > > Best wishes
> > > > Torsten.
> > > mr.torsten,
> > > thanks for reply.
> > > But i want a solution other than q0=q1=0.& command or procedure to solve this equations
> >
> > Are you sure a non-trivial solution exists ?
> > When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...
> >
> > Best wishes
> > Torsten.
> hi..Mr.torsten,
> Iwould be thankful if you post the code with watever initial guess you have considered!!!
> thanks..

x0 = [-5; -5]; % Make a starting guess at the solution
options = optimoptions('fsolve','Display','iter'); % Option to display output
[x,fval] = fsolve(@myfun,x0,options) % Call solver

function F = myfun(x)
q0=x(1);
q1=x(2);
F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
      .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];

Maybe you will have to scale the solution variables because of the small coefficients in your functional equation.

Best wishes
Torsten.

Subject: How to solve a non linear third oder algebraic equation

From: Torsten

Date: 5 Apr, 2013 10:49:06

Message: 7 of 11

"Torsten" wrote in message <kjlqo2$ji$1@newscl01ah.mathworks.com>...
> "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjl9d3$ev6$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kjk38p$hc7$1@newscl01ah.mathworks.com>...
> > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> > > > "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > > > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > > > > syms q0 q1
> > > > > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > >
> > > > > > you help is highly apprecitaed!!!
> > > > >
> > > > > q0=q1=0 looks fine to me :-).
> > > > >
> > > > > Best wishes
> > > > > Torsten.
> > > > mr.torsten,
> > > > thanks for reply.
> > > > But i want a solution other than q0=q1=0.& command or procedure to solve this equations
> > >
> > > Are you sure a non-trivial solution exists ?
> > > When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...
> > >
> > > Best wishes
> > > Torsten.
> > hi..Mr.torsten,
> > Iwould be thankful if you post the code with watever initial guess you have considered!!!
> > thanks..
>
> x0 = [-5; -5]; % Make a starting guess at the solution
> options = optimoptions('fsolve','Display','iter'); % Option to display output
> [x,fval] = fsolve(@myfun,x0,options) % Call solver
>
> function F = myfun(x)
> q0=x(1);
> q1=x(2);
> F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];
>
> Maybe you will have to scale the solution variables because of the small coefficients in your functional equation.
>
> Best wishes
> Torsten.

This could be of interest for you:
http://neos-guide.org/content/hompack

Best wishes
Torsten.

Subject: How to solve a non linear third oder algebraic equation

From: Hari Kishore

Date: 5 Apr, 2013 11:04:07

Message: 8 of 11

"Torsten" wrote in message <kjma72$aok$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kjlqo2$ji$1@newscl01ah.mathworks.com>...
> > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjl9d3$ev6$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <kjk38p$hc7$1@newscl01ah.mathworks.com>...
> > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> > > > > "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > > > > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > > > > > syms q0 q1
> > > > > > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > >
> > > > > > > you help is highly apprecitaed!!!
> > > > > >
> > > > > > q0=q1=0 looks fine to me :-).
> > > > > >
> > > > > > Best wishes
> > > > > > Torsten.
> > > > > mr.torsten,
> > > > > thanks for reply.
> > > > > But i want a solution other than q0=q1=0.& command or procedure to solve this equations
> > > >
> > > > Are you sure a non-trivial solution exists ?
> > > > When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...
> > > >
> > > > Best wishes
> > > > Torsten.
> > > hi..Mr.torsten,
> > > Iwould be thankful if you post the code with watever initial guess you have considered!!!
> > > thanks..
> >
> > x0 = [-5; -5]; % Make a starting guess at the solution
> > options = optimoptions('fsolve','Display','iter'); % Option to display output
> > [x,fval] = fsolve(@myfun,x0,options) % Call solver
> >
> > function F = myfun(x)
> > q0=x(1);
> > q1=x(2);
> > F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];
> >
> > Maybe you will have to scale the solution variables because of the small coefficients in your functional equation.
> >
> > Best wishes
> > Torsten.
>
> This could be of interest for you:
> http://neos-guide.org/content/hompack
>
> Best wishes
> Torsten.
Mr.torsten
thank you very much..for your support!!!

Subject: How to solve a non linear third oder algebraic equation

From: Hari Kishore

Date: 9 Apr, 2013 04:58:10

Message: 9 of 11

"Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjmb37$d3a$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kjma72$aok$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kjlqo2$ji$1@newscl01ah.mathworks.com>...
> > > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjl9d3$ev6$1@newscl01ah.mathworks.com>...
> > > > "Torsten" wrote in message <kjk38p$hc7$1@newscl01ah.mathworks.com>...
> > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> > > > > > "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > > > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > > > > > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > > > > > > syms q0 q1
> > > > > > > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > > >
> > > > > > > > you help is highly apprecitaed!!!
> > > > > > >
> > > > > > > q0=q1=0 looks fine to me :-).
> > > > > > >
> > > > > > > Best wishes
> > > > > > > Torsten.
> > > > > > mr.torsten,
> > > > > > thanks for reply.
> > > > > > But i want a solution other than q0=q1=0.& command or procedure to solve this equations
> > > > >
> > > > > Are you sure a non-trivial solution exists ?
> > > > > When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...
> > > > >
> > > > > Best wishes
> > > > > Torsten.
> > > > hi..Mr.torsten,
> > > > Iwould be thankful if you post the code with watever initial guess you have considered!!!
> > > > thanks..
> > >
> > > x0 = [-5; -5]; % Make a starting guess at the solution
> > > options = optimoptions('fsolve','Display','iter'); % Option to display output
> > > [x,fval] = fsolve(@myfun,x0,options) % Call solver
> > >
> > > function F = myfun(x)
> > > q0=x(1);
> > > q1=x(2);
> > > F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];
> > >
> > > Maybe you will have to scale the solution variables because of the small coefficients in your functional equation.
> > >
> > > Best wishes
> > > Torsten.
> >
> > This could be of interest for you:
> > http://neos-guide.org/content/hompack
> >
> > Best wishes
> > Torsten.
> Mr.torsten
> thank you very much..for your support!!!
hii mr.torsten that program is not working on my system? i have access to licensed simulink version, but its not working !! do we require any additional tool box?

Subject: How to solve a non linear third oder algebraic equation

From: Torsten

Date: 9 Apr, 2013 06:49:08

Message: 10 of 11

"Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kk0752$n48$1@newscl01ah.mathworks.com>...
> "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjmb37$d3a$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kjma72$aok$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <kjlqo2$ji$1@newscl01ah.mathworks.com>...
> > > > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjl9d3$ev6$1@newscl01ah.mathworks.com>...
> > > > > "Torsten" wrote in message <kjk38p$hc7$1@newscl01ah.mathworks.com>...
> > > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> > > > > > > "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > > > > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > > > > > > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > > > > > > > syms q0 q1
> > > > > > > > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > > > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > > > >
> > > > > > > > > you help is highly apprecitaed!!!
> > > > > > > >
> > > > > > > > q0=q1=0 looks fine to me :-).
> > > > > > > >
> > > > > > > > Best wishes
> > > > > > > > Torsten.
> > > > > > > mr.torsten,
> > > > > > > thanks for reply.
> > > > > > > But i want a solution other than q0=q1=0.& command or procedure to solve this equations
> > > > > >
> > > > > > Are you sure a non-trivial solution exists ?
> > > > > > When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...
> > > > > >
> > > > > > Best wishes
> > > > > > Torsten.
> > > > > hi..Mr.torsten,
> > > > > Iwould be thankful if you post the code with watever initial guess you have considered!!!
> > > > > thanks..
> > > >
> > > > x0 = [-5; -5]; % Make a starting guess at the solution
> > > > options = optimoptions('fsolve','Display','iter'); % Option to display output
> > > > [x,fval] = fsolve(@myfun,x0,options) % Call solver
> > > >
> > > > function F = myfun(x)
> > > > q0=x(1);
> > > > q1=x(2);
> > > > F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];
> > > >
> > > > Maybe you will have to scale the solution variables because of the small coefficients in your functional equation.
> > > >
> > > > Best wishes
> > > > Torsten.
> > >
> > > This could be of interest for you:
> > > http://neos-guide.org/content/hompack
> > >
> > > Best wishes
> > > Torsten.
> > Mr.torsten
> > thank you very much..for your support!!!
> hii mr.torsten that program is not working on my system? i have access to licensed simulink version, but its not working !! do we require any additional tool box?


You will have to save this part of the code in a separate .m-file on your MATLAB path and call it e.g. myfun.m:

function F = myfun(x)
q0=x(1);
q1=x(2);
F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
 .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];

Then call fsolve as follows:
x0 = [-5; -5]; % Make a starting guess at the solution
options = optimoptions('fsolve','Display','iter'); % Option to display output
[x,fval] = fsolve(@myfun,x0,options) % Call solver

No extra toolbox license necessary.
  
If this does not work, look at the examples provided under
http://www.mathworks.de/de/help/optim/ug/fsolve.html

Best wishes
Torsten.

Subject: How to solve a non linear third oder algebraic equation

From: Torsten

Date: 9 Apr, 2013 10:49:07

Message: 11 of 11

"Torsten" wrote in message <kk0dl4$akk$1@newscl01ah.mathworks.com>...
> "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kk0752$n48$1@newscl01ah.mathworks.com>...
> > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjmb37$d3a$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <kjma72$aok$1@newscl01ah.mathworks.com>...
> > > > "Torsten" wrote in message <kjlqo2$ji$1@newscl01ah.mathworks.com>...
> > > > > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kjl9d3$ev6$1@newscl01ah.mathworks.com>...
> > > > > > "Torsten" wrote in message <kjk38p$hc7$1@newscl01ah.mathworks.com>...
> > > > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjv93$3nd$1@newscl01ah.mathworks.com>...
> > > > > > > > "Torsten" wrote in message <kjjf5j$gsu$1@newscl01ah.mathworks.com>...
> > > > > > > > > "hk " <harikishoreguptha@gmail.com> wrote in message <kjjaqr$5l7$1@newscl01ah.mathworks.com>...
> > > > > > > > > > hi.. i want to solve a third order non linear algebraic equation. but the command "solve" is not useful for this equations( matlab showing "busy" for hours ).. and my equations are..
> > > > > > > > > > syms q0 q1
> > > > > > > > > > equation1=4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > > > > > equation2=.291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > > > > > >
> > > > > > > > > > you help is highly apprecitaed!!!
> > > > > > > > >
> > > > > > > > > q0=q1=0 looks fine to me :-).
> > > > > > > > >
> > > > > > > > > Best wishes
> > > > > > > > > Torsten.
> > > > > > > > mr.torsten,
> > > > > > > > thanks for reply.
> > > > > > > > But i want a solution other than q0=q1=0.& command or procedure to solve this equations
> > > > > > >
> > > > > > > Are you sure a non-trivial solution exists ?
> > > > > > > When I try to solve your system of equations with MATLAB's "fsolve", I get the trivial solution for a lot of different initial guesses for the solution variables q0 and q1...
> > > > > > >
> > > > > > > Best wishes
> > > > > > > Torsten.
> > > > > > hi..Mr.torsten,
> > > > > > Iwould be thankful if you post the code with watever initial guess you have considered!!!
> > > > > > thanks..
> > > > >
> > > > > x0 = [-5; -5]; % Make a starting guess at the solution
> > > > > options = optimoptions('fsolve','Display','iter'); % Option to display output
> > > > > [x,fval] = fsolve(@myfun,x0,options) % Call solver
> > > > >
> > > > > function F = myfun(x)
> > > > > q0=x(1);
> > > > > q1=x(2);
> > > > > F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> > > > > .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];
> > > > >
> > > > > Maybe you will have to scale the solution variables because of the small coefficients in your functional equation.
> > > > >
> > > > > Best wishes
> > > > > Torsten.
> > > >
> > > > This could be of interest for you:
> > > > http://neos-guide.org/content/hompack
> > > >
> > > > Best wishes
> > > > Torsten.
> > > Mr.torsten
> > > thank you very much..for your support!!!
> > hii mr.torsten that program is not working on my system? i have access to licensed simulink version, but its not working !! do we require any additional tool box?
>
>
> You will have to save this part of the code in a separate .m-file on your MATLAB path and call it e.g. myfun.m:
>
> function F = myfun(x)
> q0=x(1);
> q1=x(2);
> F = [4.97*q0-.570e-16*q1-.660e-1*(.158*q0^2+.141*q1^2)*q0-.228e-2*(-.927e-14*q0^2+.257e-15*q1^2)*q1;
> .291e-15*q0+.484*q1-.978e-19*(.158*q0^2+.141*q1^2)*q0+.170e-19*(-.927e-14*q0^2+.257e-15*q1^2)*q1];
>
> Then call fsolve as follows:
> x0 = [-5; -5]; % Make a starting guess at the solution
> options = optimoptions('fsolve','Display','iter'); % Option to display output
> [x,fval] = fsolve(@myfun,x0,options) % Call solver
>
> No extra toolbox license necessary.
>

Sorry, fsolve is part of the Optimization Toolbox.

> If this does not work, look at the examples provided under
> http://www.mathworks.de/de/help/optim/ug/fsolve.html
>
> Best wishes
> Torsten.

Best wishes
Torsten.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us