Thread Subject: conversion of difference equation to differential equation

Subject: conversion of difference equation to differential equation

From: talha

Date: 8 Apr, 2009 19:30:48

Message: 1 of 7

X1,t+1 = F.exp(-b1.X2,t).X2,t + (1 - m1).exp(-b2.X2,t).X1,t
X2,t+1 = P.exp(-b3.X2,t).X1,t + (1 - m2).X2,t

Hello to everybody,
I need to convert the set of nonlinear difference equations above
toODEs(ordinary differential equations). In the equation, only the
X1and X2's are the variables, the rest is just the parameters. If
anyone could help me, I will be very thankful.
I need the ODE forms since the program I use in Matlab only can
solveODE's.
my best regards to everybody
talha

Subject: conversion of difference equation to differential equation

From: Romeo

Date: 8 Apr, 2009 20:07:01

Message: 2 of 7

talha <talhaaydin@hotmail.com> wrote in message <dd2f6920-594e-4a14-b341-ed0ec511e56f@z14g2000yqa.googlegroups.com>...
> X1,t+1 = F.exp(-b1.X2,t).X2,t + (1 - m1).exp(-b2.X2,t).X1,t
> X2,t+1 = P.exp(-b3.X2,t).X1,t + (1 - m2).X2,t
>
> Hello to everybody,
> I need to convert the set of nonlinear difference equations above
> toODEs(ordinary differential equations). In the equation, only the
> X1and X2's are the variables, the rest is just the parameters. If
> anyone could help me, I will be very thankful.
> I need the ODE forms since the program I use in Matlab only can
> solveODE's.
> my best regards to everybody
> talha

This is not the way to proceed at all. There's no sense in coming back to differential level, you can do that only in exceptional cases if you know the differential problem before discretization. Anyway the link between discrete and continous formulation is that dX/dt=(X,t+1-X,t)/(delta t) so just add -X,t both side, 1/(delta t), limit on t->0 and just hope that some easy to see solution function comes out

Subject: conversion of difference equation to differential equation

From: Yi Cao

Date: 8 Apr, 2009 20:09:01

Message: 3 of 7

talha <talhaaydin@hotmail.com> wrote in message <dd2f6920-594e-4a14-b341-ed0ec511e56f@z14g2000yqa.googlegroups.com>...
> X1,t+1 = F.exp(-b1.X2,t).X2,t + (1 - m1).exp(-b2.X2,t).X1,t
> X2,t+1 = P.exp(-b3.X2,t).X1,t + (1 - m2).X2,t
>
> Hello to everybody,
> I need to convert the set of nonlinear difference equations above
> toODEs(ordinary differential equations). In the equation, only the
> X1and X2's are the variables, the rest is just the parameters. If
> anyone could help me, I will be very thankful.
> I need the ODE forms since the program I use in Matlab only can
> solveODE's.
> my best regards to everybody
> talha

But, to solve the difference equation, you do not need any solver, just a loop, with a set of initial values, you can iteratively find all solutions..

Yi

Subject: conversion of difference equation to differential equation

From: talha

Date: 8 Apr, 2009 20:29:55

Message: 4 of 7

On Apr 8, 11:09=A0pm, "Yi Cao" <y....@cranfield.ac.uk> wrote:
> talha <talhaay...@hotmail.com> wrote in message <dd2f6920-594e-4a14-b341-=
ed0ec511e...@z14g2000yqa.googlegroups.com>...
> > X1,t+1 =3D F.exp(-b1.X2,t).X2,t + (1 - m1).exp(-b2.X2,t).X1,t
> > X2,t+1 =3D P.exp(-b3.X2,t).X1,t + (1 - m2).X2,t
>
> > Hello to everybody,
> > I need to convert the set of nonlinear difference equations above
> > toODEs(ordinary differential equations). In the equation, only the
> > X1and X2's are the variables, the rest is just the parameters. If
> > anyone could help me, I will be very thankful.
> > I need the ODE forms since the program I use in Matlab only can
> > solveODE's.
> > my best regards to everybody
> > talha
>
> But, to solve the difference equation, you do not need any solver, just a=
 loop, with a set of initial values, you can iteratively find all solutions=
..
>
> Yi

Hello Yi,
Actually you are right about that, and in fact I already solved it in
excel but I need the ODE forms since I am going to use MATCONT program
in matlab to see the bifurcations chaos etc. thanks for the help. have
a wonderful day:)
talha

Subject: conversion of difference equation to differential equation

From: Yi Cao

Date: 9 Apr, 2009 05:43:01

Message: 5 of 7

talha <talhaaydin@hotmail.com> wrote in message <609e978d-1658-4fcc-89fa-e91753f4d7b6@u8g2000yqn.googlegroups.com>...
> On Apr 8, 11:09=A0pm, "Yi Cao" <y....@cranfield.ac.uk> wrote:
> > talha <talhaay...@hotmail.com> wrote in message <dd2f6920-594e-4a14-b341-=
> ed0ec511e...@z14g2000yqa.googlegroups.com>...
> > > X1,t+1 =3D F.exp(-b1.X2,t).X2,t + (1 - m1).exp(-b2.X2,t).X1,t
> > > X2,t+1 =3D P.exp(-b3.X2,t).X1,t + (1 - m2).X2,t
> >
> > > Hello to everybody,
> > > I need to convert the set of nonlinear difference equations above
> > > toODEs(ordinary differential equations). In the equation, only the
> > > X1and X2's are the variables, the rest is just the parameters. If
> > > anyone could help me, I will be very thankful.
> > > I need the ODE forms since the program I use in Matlab only can
> > > solveODE's.
> > > my best regards to everybody
> > > talha
> >
> > But, to solve the difference equation, you do not need any solver, just a=
> loop, with a set of initial values, you can iteratively find all solutions=
> ..
> >
> > Yi
>
> Hello Yi,
> Actually you are right about that, and in fact I already solved it in
> excel but I need the ODE forms since I am going to use MATCONT program
> in matlab to see the bifurcations chaos etc. thanks for the help. have
> a wonderful day:)
> talha

In this case, accuracy of transient response is not important. You may try the way described by Romeo to use MATCONT.

Yi

Subject: conversion of difference equation to differential equation

From: talha

Date: 10 Apr, 2009 19:53:43

Message: 6 of 7

On Apr 8, 11:07=A0pm, "Romeo " <romeo_aristoga...@yahoo.com> wrote:
> talha <talhaay...@hotmail.com> wrote in message <dd2f6920-594e-4a14-b341-=
ed0ec511e...@z14g2000yqa.googlegroups.com>...
> > X1,t+1 =3D F.exp(-b1.X2,t).X2,t + (1 - m1).exp(-b2.X2,t).X1,t
> > X2,t+1 =3D P.exp(-b3.X2,t).X1,t + (1 - m2).X2,t
>
> > Hello to everybody,
> > I need to convert the set of nonlineardifferenceequationsabove
> > toODEs(ordinary differentialequations). In the equation, only the
> > X1and X2's are the variables, the rest is just the parameters. If
> > anyone could help me, I will be very thankful.
> > I need the ODE forms since the program I use in Matlab only can
> > solveODE's.
> > my best regards to everybody
> > talha
>
> This is not the way to proceed at all. There's no sense in coming back to=
 differential level, you can do that only in exceptional cases if you know =
the differential problem before discretization. Anyway the link between dis=
crete and continous formulation is that dX/dt=3D(X,t+1-X,t)/(delta t) so ju=
st add -X,t both side, 1/(delta t), limit on t->0 and just hope that some e=
asy to see solution function comes out

Hello Romeo and Yi,
thanks for your helps again. I cannot believe I did not think that
simple way of convertion. It actually really helped. However, in the
difference equation case, when I solved those there were oscillations
aroound the solution and in fact in my project, the aim is to see
those oscillations but when I put those two ode to matcont it just
goes to the solution and it appears there is no oscillations. if you
have any idea to help me on that, I mean about matcont, please help
me.
thanks a lot

Subject: conversion of difference equation to differential equation

From: reza

Date: 16 Jun, 2009 13:45:04

Message: 7 of 7

Hello to everybody,
I would like to konw how I can use difference equations (discrete time dynamical systems) in Matcont.
Thank you very much for your time.
Reza
talha <talhaaydin@hotmail.com> wrote in message <609e978d-1658-4fcc-89fa-e91753f4d7b6@u8g2000yqn.googlegroups.com>...
> On Apr 8, 11:09=A0pm, "Yi Cao" <y....@cranfield.ac.uk> wrote:
> > talha <talhaay...@hotmail.com> wrote in message <dd2f6920-594e-4a14-b341-=
> ed0ec511e...@z14g2000yqa.googlegroups.com>...
> > > X1,t+1 =3D F.exp(-b1.X2,t).X2,t + (1 - m1).exp(-b2.X2,t).X1,t
> > > X2,t+1 =3D P.exp(-b3.X2,t).X1,t + (1 - m2).X2,t
> >
> > > Hello to everybody,
> > > I need to convert the set of nonlinear difference equations above
> > > toODEs(ordinary differential equations). In the equation, only the
> > > X1and X2's are the variables, the rest is just the parameters. If
> > > anyone could help me, I will be very thankful.
> > > I need the ODE forms since the program I use in Matlab only can
> > > solveODE's.
> > > my best regards to everybody
> > > talha
> >
> > But, to solve the difference equation, you do not need any solver, just a=
> loop, with a set of initial values, you can iteratively find all solutions=
> ..
> >
> > Yi
>
> Hello Yi,
> Actually you are right about that, and in fact I already solved it in
> excel but I need the ODE forms since I am going to use MATCONT program
> in matlab to see the bifurcations chaos etc. thanks for the help. have
> a wonderful day:)
> talha

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
conversion diff... Sprinceana 16 Jun, 2009 16:59:49
rssFeed for this Thread

Contact us at files@mathworks.com