(possible) Alternative solution to a difference equation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 2K views
Nerd-ho
Messages
7
Reaction score
0
Member advised that the homework template is required.
Hi, I'm a high school graduate who's been going through some UNISA (University of South Africa) mathematical modelling material and I've come across the following difference equation -

a(n+1) = 1 - a(n).

The answer given in the material was that the solution alternates between a(0) for n even and 1 - a(0) for n odd.

I think I've come up with a solution that holds true for all n, namely:

a(n) = a(0)*-1^n + (-1^n - 1)*(-1/2)

Am I correct?

Regards, Travis
 
Last edited by a moderator:
Physics news on Phys.org
Nerd-ho said:
Hi, I'm a high school graduate who's been going through some UNISA (University of South Africa) mathematical modelling material and I've come across the following difference equation -

a(n+1) = 1 - a(n).

The answer given in the material was that the solution alternates between a(0) for n even and 1 - a(0) for n odd.

I think I've come up with a solution that holds true for all n, namely:

a(n) = a(0)*-1^n + (-1^n - 1)*(-1/2)

Am I correct?

Regards, Travis

Sure, that's correct. It's exactly the same solution written in a different way.
 
Last edited by a moderator:
  • Like
Likes   Reactions: Chestermiller
Nerd-ho said:
Hi, I'm a high school graduate who's been going through some UNISA (University of South Africa) mathematical modelling material and I've come across the following difference equation -

a(n+1) = 1 - a(n).

The answer given in the material was that the solution alternates between a(0) for n even and 1 - a(0) for n odd.

I think I've come up with a solution that holds true for all n, namely
:

a(n) = a(0)*-1^n + (-1^n - 1)*(-1/2)

Am I correct?

Regards, Travis

It is vital for you to learn to use parentheses. What you wrote is
$$a(n) = a(0) \times -1^n + (-1^n -1 ) \times (-1/2),$$
which evaluates to ##a(n) = -a(0) + (-2) \times (-1/2) = -a(0) + 1## always. You probably want
$$ a(n) = a(0) \times (-1)^n + ((-1)^n -1) \times (-1/2),$$
which produces ##a(0)## for even ##n## and ##1-a(0)## for odd ##n##.

So, written properly, your formula is a(n) = a(0) * (-1)^n + ((-1)^n - 1) * (-1/2), which, of course, is the same as a(0)*(-1)^n + (1/2)*(1 - (-1)^n)).
 
  • Like
Likes   Reactions: jim mcnamara and scottdave
Have we been given the full actual question?

Doesn’t a0, a1, a2, ... = 6.8, -5.8, 6.8, -5.8,... also satisfy your equation?

In other words, for the solution of a difference equation you need initial values, as many as the order of the equation, just like differential equations
 
epenguin said:
Have we been given the full actual question?

Doesn’t a0, a1, a2, ... = 6.8, -5.8, 6.8, -5.8,... also satisfy your equation?

In other words, for the solution of a difference equation you need initial values, as many as the order of the equation, just like differential equations

##a(0)## IS the initial value. For your solution ##a(0)=6.8##.