关于Mathematica使用的简单问题我要求RSolve[{a[n + 3] == 2/3* a[n] + a[n + 1]/3,a[1] == 2/3,a[2] = 0,a[3] = 2/9},a[n],n]结果RSolve::deqn:Equation or list of equations expected instead of 0 in the first argument {a[1+n]==(2 a[n])/3+1/3 a[1
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/18 04:41:27
关于Mathematica使用的简单问题我要求RSolve[{a[n + 3] == 2/3* a[n] + a[n + 1]/3,a[1] == 2/3,a[2] = 0,a[3] = 2/9},a[n],n]结果RSolve::deqn:Equation or list of equations expected instead of 0 in the first argument {a[1+n]==(2 a[n])/3+1/3 a[1
关于Mathematica使用的简单问题
我要求
RSolve[{a[n + 3] == 2/3* a[n] + a[n + 1]/3,a[1] == 2/3,a[2] = 0,
a[3] = 2/9},a[n],n]
结果RSolve::deqn:Equation or list of equations expected instead of 0 in the first argument {a[1+n]==(2 a[n])/3+1/3 a[1+n],a[1]==2/3,0,2/9}.
于是改成RSolve[{a[n] == 2/3 a[-3 + n] + 1/3 a[-2 + n],a[1] == 2/3},a[n],n]
结果
{{a[n] ->
1/6 (4 + 3 C[1] + I Sqrt[15] C[1] +
6 (-(1/2) - 1/2 I Sqrt[5/3])^n C[1] + 3 C[2] -
I Sqrt[15] C[2] + 6 (-(1/2) + 1/2 I Sqrt[5/3])^n C[2])}}
首先,上面这个通项中的C[1],
还有,为什么我之前的写法不行,没有a2,a3这个对吗
分不是问题,最好答详细些
关于Mathematica使用的简单问题我要求RSolve[{a[n + 3] == 2/3* a[n] + a[n + 1]/3,a[1] == 2/3,a[2] = 0,a[3] = 2/9},a[n],n]结果RSolve::deqn:Equation or list of equations expected instead of 0 in the first argument {a[1+n]==(2 a[n])/3+1/3 a[1
=是赋值,a[2] = 0 结果为0
相当于求:
RSolve[{a[n + 3] == 2/3*a[n] + a[n + 1]/3, a[1]==2/3,0,2/9}, a[n], n]
C[1],C[2]是任意常数.
其实,应该:
RSolve[{a[n + 3] == 2/3*a[n] + a[n + 1]/3, a[1] == 2/3, a[2] == 0,
a[3] == 2/9}, a[n], n]
a[n] -> (15 (I + Sqrt[15]) + (45 I -
11 Sqrt[15]) (-(1/6) I (-3 I + Sqrt[15]))^n -
4 (-(1/2) + 1/2 I Sqrt[5/3])^n (15 I + Sqrt[15]))/(
60 (I + Sqrt[15]))
a[n] ->1/4+ ( (45 I -
11 Sqrt[15]) (-(1/6) I (-3 I + Sqrt[15]))^n -
4 (-(1/2) + 1/2 I Sqrt[5/3])^n (15 I + Sqrt[15]))/(
60 (I + Sqrt[15]))