Wolfram Book 之根据递推关系求通项公式

例 1

Mathematica 代码:

RSolve[{a[n + 1] == 2 a[n] + 3, a[1] == 1}, a[n], n]

% /. n -> 4

例 2

Mathematica 代码:

RSolve[{a[n + 1] == a[n] + 1/(4 n^2 – 1), a[1] == 1/2}, a[n], n] // Simplify

例 3

Mathematica 代码:

RSolve[{a[n + 2] == a[n + 1] – a[n], a[1] == 1, a[2] == 6}, a[n], n] // FullSimplify

% /. n -> 2016

例 4

通过以上计算可知,数列 {b(n)} 的最大项为第 6 项.

Mathematica 代码:

RSolve[{(n – 1) a[n + 1] == (n + 1) a[n] – n + 1, a[1] == 0, a[2] == 3}, a, n] // First

Sqrt[a[n] + 1] Sqrt[a[n + 1] + 1] (8/11)^(n – 1) /. %

NMaximize[{%, n > 0, Element[n, Integers]}, n, MaxIterations -> 200]

 

发布者:Cara,转载请注明出处:http://www.makercollider.com/course/1735

发表评论

登录后才能评论
QR code