Re: can you solve these difference equations faster?

From: Travis Willse (twillse_at_gladstone.uoregon.edu)
Date: 02/07/05


Date: Mon, 07 Feb 2005 00:46:49 -0800

lucy,

You likely don't need to invoke matrix algebra for most difference
equation problems.

Note that your array {U_0,...,U_7} is invariant under the transformation
i -> 7-i:

Under the transformation, we have

U_7, U_0,
U_(7-i) = 0.5*U_(6-i)+0.5*U_(8-i)+1

Evidently, the array is symmetric under the transformation
(specifically, the array is the same forward and backward). Thus:

U_1 = U_6
U_2 = U_5
U_3 = U_4

Also, solving for U_(i+1) in the recursive definition, we have for i =
1,...,6 that

U_{i+1} = 2*U_i-U_{i-1}-2

In the case i = 1,

U_2 = 2*U_1-U_0-2 = 2*U_1-2

In the case i = 2,

U_3 = 2*U_2-U_1-2 = 2*(2*U_1-2)-U_1-2 = 3*U_1-6

In the case i = 3,

U_4 = 2*U_3-U_2-2

But U_4 = U_3, so

U_3 = U_2+2

Substituting with the expressions in U_1 derived above,

3*U_1-6 = (2*U_1 - 2) + 2 = 2*U_1

Solving,

U_1 = 6

You now have the first two terms of the array, so you can apply the
recursive definition directly. The solution is:

{0,6,10,12,12,10,6,0}

Cheers,
Travis

lucy wrote:
> Hi all,
>
> I have the following difference equations:
>
> U_0=0, U_7=0,
> U_i=0.5*U_(i-1)+0.5*U_(i+1)+1 for i=1, 2, 3, 4, 5, 6.
>
> Now want to find U_i for i=1.
>
> I tried to solve the matrix equations, it was really painful(this is not a
> problem that is supposed to use Matlab.)
>
> I have also tried to use Z-transform to do it. But that was still painful:
>
> I got U_i=A+B*i+C*i^2
>
> And finding the third initial condition to determine the three coefficients
> is very tedious...
>
> Anybody has some good tricks?
>
> Thanks a lot!
>
> -L
>
>



Relevant Pages

  • Re: spherical maximum projection
    ... I have a stack of images of a spherical object. ... gives me an array of the 3D intensity distribution. ... the transformation using 'cart2sph' is perfectly ...
    (comp.soft-sys.matlab)
  • Re: Python newbie
    ... Why is the array "a" unchanged after undergoing a transformation with ... The loop binds elements to ... to decide when a variable is used by value and when by reference? ... actually changes the elements of the array "a"? ...
    (comp.lang.python)
  • Re: K&R 5.7
    ... An array never "is" a pointer. ... applied to "mnths", which is the name of the array. ... The transformation of array name to pointer value occurs *only* ...
    (comp.lang.c)
  • Re: Levi-Civita Symbol
    ... A tensor T of type like this ... necessarily maps to c^n T under the transformation cI. ... but the array will change if you change the basis. ...
    (sci.math)