Group Abstract Group Abstract

Message Boards Message Boards

Solve a system of recurrence relations?

Hi all!

I'm new to the Wolfram Forum community and it is a pleasure to be here.

I have a quick question for those who have expertise in the use of Mathematica....

Is Mathematica able to solve the following system of recurrence relations? I'm looking for a "closed-form" formula for w(2n+1).


For n greater than or equal to 3,

w(2n+1) = a(n+1), a(n) = 3*a(n-1) + a(n-2) - a(n-3),

a(0) = 1, a(1) = 2, a(2) = 7, w(1) = 2, w(3) = 7, and w(5) = 22.

Any help is greatly appreciated!

Sincerely, Richard M. Low

richard.low@sjsu.edu

POSTED BY: Richard Low
13 Replies

FullSimplify command does a good job for this.

Attachments:
POSTED BY: Mariusz Iwaniuk

Dear @Richard Low, please spend some time learning how to properly post math notation and code on Wolfram Community:

http://community.wolfram.com/groups/-/m/t/270507

POSTED BY: EDITORIAL BOARD
POSTED BY: Richard Low

Hello Mariusz,

I'm very glad to see your attached file MMASolution-Ver4.nb, which gives a "closed-form" solution to b[k] for ODD numbers! Thank you!!

  1. In this particular "closed-form" solution (for ODD numbers), is it possible to replace all of the complicated (exact) radical expressions with simpler decimal approximations? This would yield a very compact formula which could be typeset into the research paper.

  2. Do you have any ideas for a "compact" (with simpler decimal approximations, instead of exact radical expressions) formula for b[k], for EVEN numbers?

Again, thank you for all of your help given and time spent.

Sincerely, Richard M. Low

POSTED BY: Richard Low
POSTED BY: Daniel Lichtblau

From "closed-form" solution to b[k],but only works for Odd numbers.

Attachments:
POSTED BY: Mariusz Iwaniuk

Hello Mariusz,

I greatly appreciate your continual help on my question!

I looked at your two attached files (in your previous post). It is making great progress and the solution is nearly there! But, there is a small problem with the Maple/Mathematica program (probably, unexpected variable values somewhere in memory). It does not yield the correct values for b[k].

With regards to the question:

For integers k greater than or equal to 3, b[k] = b[k-1] + b[k-3] + 2*[.0794367(.460811)^((k-1)/2) + .255972(-.675131)^((k-1)/2) + .664591(3.21432)^((k-1)/2)], if k is odd; b[k] = b[k-1] + b[k-2], if k is even; b[0] = 1, b[1] = 4, b[2] = 5.

This piecewise defined recurrence relation is correct. I verified (using this piecewise defined recurrence relation, by hand calculations) the correct values: b[0]=1, b[1]=4, b[2]=5, b[3]=10, b[4]=15, b[5]=34, b[6]=49, b[7]=108, b[8]=157, b[9]=348, b[10]=505, etc.

If you have some time, can you look at your Maple/Mathematica program and see what is happening? We are so close to a "closed-form" solution to b[k] !!

I am greatly indebted to you for your valuable help.

Sincerely, Richard M. Low

POSTED BY: Richard Low
Attachments:
POSTED BY: Mariusz Iwaniuk
POSTED BY: Richard Low

You really should show what you tried. It's not the sort of thing I'd want to guess at.

POSTED BY: Daniel Lichtblau

Maybe so:

Solve for a[n]:

sol = First@ RSolve[{a[n] == 3*a[n - 1] + a[n - 2] - a[n - 3], a[0] == 1, a[1] == 2, a[2] == 7}, a[n], n];
Simplify[ToRadicals[(a[n] /. sol)], Assumptions -> n \[Element] Integers]

(*1/444 (2 (1 + (9 + I Sqrt[111])^(1/3)/3^(2/3) + 
  4/(27 + 3 I Sqrt[111])^(1/3))^
 n (74 + (20 74^(2/3))/(481 + 57 I Sqrt[111])^(
  1/3) + (74 (481 + 57 I Sqrt[111]))^(1/3)) + (1 + (
  I (I + Sqrt[3]) (9 + I Sqrt[111])^(1/3))/(
  2 3^(2/3)) + (-2 - 2 I Sqrt[3])/(27 + 3 I Sqrt[111])^(1/3))^
 n (148 + (20 I 74^(2/3) (I + Sqrt[3]))/(481 + 57 I Sqrt[111])^(
  1/3) + (-1 - I Sqrt[3]) (74 (481 + 57 I Sqrt[111]))^(
   1/3)) + (1 - ((1 + I Sqrt[3]) (9 + I Sqrt[111])^(1/3))/(
  2 3^(2/3)) + (-2 + 2 I Sqrt[3])/(27 + 3 I Sqrt[111])^(1/3))^
 n (148 - (20 74^(2/3) (1 + I Sqrt[3]))/(481 + 57 I Sqrt[111])^(
  1/3) + I (I + Sqrt[3]) (74 (481 + 57 I Sqrt[111]))^(1/3)))*)

Solve for w[n]:

sol2 = First@ RSolve[{w[2*n + 1] == (a[n] /. sol /. n -> n + 1), w[1] == 2, w[3] == 7, w[5] == 22}, w[n], n];
Simplify[ToRadicals[(w[n] /. sol2)], Assumptions -> n \[Element] Integers]

 (*1/222 (1 + (9 + I Sqrt[111])^(1/3)/3^(2/3) + 4/(27 + 3 I Sqrt[111])^(
     1/3))^((1 + n)/
   2) (74 + (20 74^(2/3))/(481 + 57 I Sqrt[111])^(
     1/3) + (74 (481 + 57 I Sqrt[111]))^(1/3)) + 
  1/444 (1 + (I (I + Sqrt[3]) (9 + I Sqrt[111])^(1/3))/(
     2 3^(2/3)) + (-2 - 2 I Sqrt[3])/(27 + 3 I Sqrt[111])^(1/3))^((
   1 + n)/2) (148 + (
     20 I 74^(2/3) (I + Sqrt[3]))/(481 + 57 I Sqrt[111])^(
     1/3) + (-1 - I Sqrt[3]) (74 (481 + 57 I Sqrt[111]))^(1/3)) + 
  1/444 (1 - ((1 + I Sqrt[3]) (9 + I Sqrt[111])^(1/3))/(
     2 3^(2/3)) + (-2 + 2 I Sqrt[3])/(27 + 3 I Sqrt[111])^(1/3))^((
   1 + n)/2) (148 - (
     20 74^(2/3) (1 + I Sqrt[3]))/(481 + 57 I Sqrt[111])^(1/3) + 
     I (I + Sqrt[3]) (74 (481 + 57 I Sqrt[111]))^(1/3))*)
POSTED BY: Mariusz Iwaniuk
POSTED BY: Richard Low
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard