Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solution of deifference equation

0 views
Skip to first unread message

naebad

unread,
Nov 29, 2009, 10:56:45 PM11/29/09
to
I have a difference equation

y(k+1)=y(k)+k*(a-y^2(k))

k>0 ,a>0

The equilibrium points are easy to find

y* = +/- sqrt(a)

How can I find the limit on k for stability? I am beginning to think
there is not a closed-form solution.


N.

Tim Wescott

unread,
Nov 29, 2009, 11:33:48 PM11/29/09
to

Do you mean for your gain 'k' to be the same as your time-step variable
'k'?

With that y^2 in there you'll always be able to make the system unstable
whenever a and k are nonzero and your starting value of y is of
sufficient magnitude and the correct sign.

--
www.wescottdesign.com

Robert Israel

unread,
Nov 29, 2009, 11:54:13 PM11/29/09
to
naebad <nae...@yahoo.com> writes:

If y(k) = p + epsilon, where p is one of the equilibrium points,
y(k+1) = p + (1 - 2*k*p)*epsilon - k*epsilon^2
so small deviations from p are amplified if k*p < 0 or k*p > 1.
--
Robert Israel isr...@math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada

naebad

unread,
Nov 30, 2009, 2:46:58 AM11/30/09
to
On Nov 30, 5:54 pm, Robert Israel

Now should I make that P+epsilon.exp(jtheta) where 0<theta<pi ?

naebad

unread,
Nov 30, 2009, 2:48:09 AM11/30/09
to

yes k is the step size if you like.

Robert Israel

unread,
Nov 30, 2009, 3:09:39 PM11/30/09
to
naebad <nae...@yahoo.com> writes:

> On Nov 30, 5:54=A0pm, Robert Israel


> <isr...@math.MyUniversitysInitials.ca> wrote:
> > naebad <nae...@yahoo.com> writes:
> > > I have a difference equation
> >

> > > y(k+1)=3Dy(k)+k*(a-y^2(k))


> >
> > > k>0 ,a>0
> >
> > > The equilibrium points are easy to find
> >

> > > y* =3D +/- sqrt(a)


> >
> > > How can I find the limit on k for stability? I am beginning to think
> > > there is not a closed-form solution.
> >

> > If y(k) =3D p + epsilon, where p is one of the equilibrium points,
> > y(k+1) =3D p + (1 - 2*k*p)*epsilon - k*epsilon^2


> > so small deviations from p are amplified if k*p < 0 or k*p > 1.
> > --

> > Robert Israel =A0 =A0 =A0 =A0 =A0 =A0
> > =A0isr...@math.MyUniversitysInitial=
> s.ca
> > Department of Mathematics =A0 =A0 =A0 =A0http://www.math.ubc.ca/~israel
> > University of British Columbia =A0 =A0 =A0 =A0 =A0 =A0Vancouver, BC,
> > Cana=


> da
>
> Now should I make that P+epsilon.exp(jtheta) where 0<theta<pi ?

No. You should think about what stability and instability mean.

Tim Wescott

unread,
Nov 30, 2009, 3:15:25 PM11/30/09
to

OK, now you've introduced a _third_ possibility.

In your equation, you clearly use 'k' to mean the step index -- i.e. y(k)
is the k'th value of y.

But you also use 'k' as a gain -- in the expression k*(a-y^2(k)).

Do you mean that

y(1) = y(0) + 0 * (a - y^2(0)),
y(2) = y(1) + 1 * (a - y^2(1)),
y(3) = y(2) + 2 * (a - y^2(2)),
etc.?

Or did you inadvertently use 'k' for two different things?

--
www.wescottdesign.com

naebad

unread,
Nov 30, 2009, 7:15:00 PM11/30/09
to

yes!

Tim Wescott

unread,
Nov 30, 2009, 8:38:19 PM11/30/09
to

Which one?????????

--
www.wescottdesign.com

Jerry Avins

unread,
Nov 30, 2009, 9:03:30 PM11/30/09
to
Tim Wescott wrote:
> On Mon, 30 Nov 2009 16:15:00 -0800, naebad wrote:

...

>>> Or did you inadvertently use 'k' for two different things?

>> yes!
>
> Which one?????????

Huh?

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Tim Wescott

unread,
Dec 1, 2009, 1:51:15 AM12/1/09
to
On Mon, 30 Nov 2009 21:03:30 -0500, Jerry Avins wrote:

> Tim Wescott wrote:
> > On Mon, 30 Nov 2009 16:15:00 -0800, naebad wrote:
>
> ...
>
>>>> Or did you inadvertently use 'k' for two different things?
>
>>> yes!
>>
>> Which one?????????
>
> Huh?
>
> Jerry

Exactly!

I asked him "A or B", and he said "yes!".

It left me a bit confused.

--
www.wescottdesign.com

Jerry Avins

unread,
Dec 1, 2009, 4:39:41 AM12/1/09
to
Tim Wescott wrote:
> On Mon, 30 Nov 2009 21:03:30 -0500, Jerry Avins wrote:
>
>> Tim Wescott wrote:
>> > On Mon, 30 Nov 2009 16:15:00 -0800, naebad wrote:
>>
>> ...
>>
>>>>> Or did you inadvertently use 'k' for two different things?
>>>> yes!
>>> Which one?????????
>> Huh?
>>
>> Jerry
>
> Exactly!
>
> I asked him "A or B", and he said "yes!".
>
> It left me a bit confused.

He meant "Yes! I used k to represent two different things."

Greg Heath

unread,
Dec 1, 2009, 8:59:27 AM12/1/09
to

Note that

y(t) = a*tanh( arctanh(y0/a) + a*K*(t-t0) )

satisfies

y'(t) = K*(a^2-y^2).

Hope this helps.

Greg

Tim Wescott

unread,
Dec 1, 2009, 2:04:08 PM12/1/09
to
On Sun, 29 Nov 2009 19:56:45 -0800, naebad wrote:

Assuming that Jerry is right and you really meant

y(n+1)=y(n)+k*(a-y^2(n)),

What happens when k = -1, a = 1 and y(0) > 1? Or k = -1, a = 1, and
-sqrt(2) > y > 1?

How about k = 1, a = 1, and y(0) < -sqrt(2)?

See a pattern?

--
www.wescottdesign.com

Greg Heath

unread,
Dec 1, 2009, 4:19:55 PM12/1/09
to
On Dec 1, 2:04 pm, Tim Wescott <t...@seemywebsite.com> wrote:
> On Sun, 29 Nov 2009 19:56:45 -0800, naebad wrote:
> > I have a difference equation
>
> > y(k+1)=y(k)+k*(a-y^2(k))
>
> > k>0 ,a>0
>
> > The equilibrium points are easy to find
>
> > y* = +/- sqrt(a)
>
> > How can I find the limit on k for stability? I am beginning to think
> > there is not a closed-form solution.
>
> > N.
>
> Assuming that Jerry is right and you really meant
>
> y(n+1)=y(n)+k*(a-y^2(n)),
>
> What happens when k = -1, a = 1 and y(0) > 1?  Or k = -1, a = 1,

The Op specified k > 0. Do you want to consider k = -1 anyway?


> and -sqrt(2) > y > 1?

Impossible. A sign typo?

> How about k = 1, a = 1, and y(0) < -sqrt(2)?
>
> See a pattern?

Waiting for your reply.

Hope this helps.

Greg

Tim Wescott

unread,
Dec 1, 2009, 4:32:20 PM12/1/09
to
On Tue, 01 Dec 2009 13:19:55 -0800, Greg Heath wrote:

> On Dec 1, 2:04 pm, Tim Wescott <t...@seemywebsite.com> wrote:
>> On Sun, 29 Nov 2009 19:56:45 -0800, naebad wrote:
>> > I have a difference equation
>>
>> > y(k+1)=y(k)+k*(a-y^2(k))
>>
>> > k>0 ,a>0
>>
>> > The equilibrium points are easy to find
>>
>> > y* = +/- sqrt(a)
>>
>> > How can I find the limit on k for stability? I am beginning to think
>> > there is not a closed-form solution.
>>
>> > N.
>>
>> Assuming that Jerry is right and you really meant
>>
>> y(n+1)=y(n)+k*(a-y^2(n)),
>>
>> What happens when k = -1, a = 1 and y(0) > 1?  Or k = -1, a = 1,
>
> The Op specified k > 0. Do you want to consider k = -1 anyway?
>

I missed that, but it doesn't make much difference.


>
>> and -sqrt(2) > y > 1?
>
> Impossible. A sign typo?

Yes; I thought that looked weird. -sqrt(2) < y < 1.

>> How about k = 1, a = 1, and y(0) < -sqrt(2)?
>>
>> See a pattern?

There's still a pattern in there -- is there _any_ strictly positive k
for which you can find a y(0) that guarantees stability? For that
matter, is there any strictly positive k for which you _cannot_ find a y
(0) that guarantees instability?

--
www.wescottdesign.com

Jon Slaughter

unread,
Dec 1, 2009, 5:06:34 PM12/1/09
to


This is called the linearized riccati equation(analogous to the DE) and the
closed form solution to your equation is known. That is, your equation is of
the form y(k+1) = a_k + b_k*y(k) + c_k*y^2(k)

Look up on google for the solution.


naebad

unread,
Dec 2, 2009, 2:51:25 AM12/2/09
to

Yes but for a white-noise input? This is unforced - from initial
conditions.

Greg Heath

unread,
Dec 2, 2009, 5:19:54 PM12/2/09
to
On Dec 1, 8:59 am, Greg Heath <he...@alumni.brown.edu> wrote:
> On Nov 29, 10:56 pm, naebad <nae...@yahoo.com> wrote:
>
> > I have a difference equation
>
> > y(k+1)=y(k)+k*(a-y^2(k))
>
> > k>0 ,a>0
>
> > The equilibrium points are easy to find
>
> > y* = +/- sqrt(a)
>
> > How can I find the limit on k for stability? I am beginning to think
> > there is not a closed-form solution.
>
> Note that
>
> y(t) = a*tanh( arctanh(y0/a) + a*k*(t-t0) )
>
> satisfies
>
> y'(t) = k*(a^2-y^2).

Rescaling with t0 = 1 yields

z'(t) = K*( 1 - z^2), z(t=1) = z1.

satisfied by

z(t) = tanh( arctanh(z1) + K*(t-1) ).

Regardless of z1, the solution is
continuous and bounded with the limit

z(t) --> tanh(K*t) --> sgn(K)

as t --> inf.

Notice, however, that arctanh(z1) and
z(t) become complex when abs(z1) > 1.

For a numerical solution consider the FDE

z(n) = z(n-1) + Kdt*(1-z(n-1)^2), z(1) = z1

with Kdt == K*dt , dt > 0 and z1 real. It is
sufficient to consider K > 0 (K < 0 just
changes the sign of z).

A good approximation to the ODE should occur
if Kdt is sufficiently small. However, the
continuous time solution to the ODE is complex
when abs(z1) > 1 whereas, if z1 is real, the
solution to the FDE will always be real.

The stationary solutions are zs = +/- 1
with 1st order perturbations

z1 = zs + eps1

z2 ~ zs + eps1 - 2Kdt*zs*eps1

When zs = +1, the small perturbation
will decrease in magnitude regardless of
it's polarity and, similar to the ODE solution,

z(n) --> +1 as n --> inf

is a reasonable expectation.

However, when zs = -1, the small perturbation
will increase in magnitude.

When eps1 > 0, abs(z1) < 1 and, similar to the
ODE solution, it is expected that

z(n) --> 1 as n --> inf

i.e z will tend toward the other stationary point!

However, when eps1 < 0, abs(z1) > 1 and it
is expected that

z(n) --> -inf as n --> +inf.

In summary, it is predicted that

K > 0, zs = -1, eps1 < 0

and

K < 0, zs = +1, eps1 > 0

both yield instability.

Hope this helps.

Greg

Greg Heath

unread,
Dec 3, 2009, 5:09:24 AM12/3/09
to

In general, stability is expected for K > 0 when

z(2) = z1+K*(1-z1^2) > -1

K*z1^2 - z1- (K+1) < 0

(1-sqrt(1+4*K*(K+1)))/(2K) < z1 < (1+sqrt(1+4*K*(K+1)))/(2K)

Therefore,

-1 < z1 < 2 for K = 1

Hope this helps.

Greg

0 new messages