Message Boards Message Boards

0
|
6583 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Solve nonlinear recurrence using RSolve?

Also posted in Mathematica Stack Exchange.

I tried to solve the following nonlinear recurrence relation using RSolve.

y[n+1] = y[n] - a - b Sqrt[y[n]]

But the solution given by RSolve does not satisfy the relation.

Have I missed anything regarding RSolve or is this a bug in Mathematica?

The code is given below.

RSolve[y[n + 1] ==  y[n] - a - b Sqrt[y[n]], y, n]

FullSimplify[y[n + 1] == y[n] - a - b Sqrt[y[n]] /. %]
Attachments:
POSTED BY: Buddhima Gamlath
2 Replies

Please submit to http://www.wolfram.com/support/contact/email/ using "product feedback", thanks!

POSTED BY: Sander Huisman

Assume a=b=1 and y[0]=1.

eq = y[n] - 1 - 1*Sqrt[y[n]] - y[n + 1];
sol = First@RSolve[{eq == 0, y[0] == 1}, y[n], n];
Table[(y[n] /. sol), {n, 10}] 
(*{0. + 2. I, -3. + 4. I, -8. + 6. I, -15. + 8. I, -24. + 10. I, -35. + 
  12. I, -48. + 14. I, -63. + 16. I, -80. + 18. I, -99. + 20. I}*)

Check numericaly:

RecurrenceTable[{eq == 0, y[0] == 1}, y, {n, 10}] // N
(*{1., -1., -2. - 1. I, -3.34356 + 0.455347 I, -4.46779 - 1.37741 I, -5.78989 + 0.760707 I, -6.94763 - 1.65068 I, -8.25859 + 
1.00344 I, -9.43286 - 1.87562 I, -10.7367 + 1.21067 I, -11.9212 - 2.07121 I} *)

Yes possible, a BUG.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract