- 注册时间
- 2015-10-15
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 2202
- 在线时间
- 小时
|
楼主 |
发表于 2017-5-15 11:04:29
|
显示全部楼层
本帖最后由 TSC999 于 2017-5-15 11:47 编辑
您这个程序前面如果加上 Simplify 还可以化简输出结果,结果中有虚数,如果设法去掉虚数,就应该跟 38# 楼那个复杂表达式是一样的吧?- (* 使用另一个无误差的通项公式计算 *)
- a[n_] := 1/(
- 44 3^(n +
- 1)) (2 (22 + Power[847 - 33 Sqrt[33], (3)^-1] + Power[
- 847 + 33 Sqrt[33], (3)^-1]) (1 + Power[19 - 3 Sqrt[33], (
- 3)^-1] + Power[19 + 3 Sqrt[33], (3)^-1])^
- n + (44 +
- I (Sqrt[3] + I) Power[847 - 33 Sqrt[33], (
- 3)^-1] + (-1 - I Sqrt[3]) Power[847 + 33 Sqrt[33], (
- 3)^-1]) (1/
- 2 (2 + (-1 - I Sqrt[3]) Power[19 - 3 Sqrt[33], (3)^-1] +
- I (Sqrt[3] + I) Power[19 + 3 Sqrt[33], (3)^-1]))^
- n + (44 + (-1 - I Sqrt[3]) Power[847 - 33 Sqrt[33], (3)^-1] +
- I (Sqrt[3] + I) Power[847 + 33 Sqrt[33], (3)^-1]) (1/
- 2 (2 + I (Sqrt[3] + I) Power[19 - 3 Sqrt[33], (
- 3)^-1] + (-1 - I Sqrt[3]) Power[19 + 3 Sqrt[33], (3)^-1]))^
- n);
- Round[a[100]]
- N[a[100], 100]
- 180396380815100901214157639
- 1.803963808151009012141576390000000000000000000000000000000000000000000000000000000000000000000000000*10^26+0.*10^-115 I
复制代码
我用下面的指令去掉了表达式中的虚数(虚数部分实际上是等于 0 的):
- In[109]:= Simplify[
- Together[ComplexExpand[
- Re[1/(44 3^(n + 1)) (
- 2 (22 + Power[847 - 33 Sqrt[33], (3)^-1] + Power[
- 847 + 33 Sqrt[33], (3)^-1]) (1 + Power[19 - 3 Sqrt[33], (
- 3)^-1] + Power[19 + 3 Sqrt[33], (3)^-1])^
- n + (44 +
- I (Sqrt[3] + I) Power[847 - 33 Sqrt[33], (
- 3)^-1] + (-1 - I Sqrt[3]) Power[847 + 33 Sqrt[33], (
- 3)^-1]) (1/
- 2 (2 + (-1 - I Sqrt[3]) Power[19 - 3 Sqrt[33], (3)^-1] +
- I (Sqrt[3] + I) Power[19 + 3 Sqrt[33], (3)^-1]))^
- n + (44 + (-1 - I Sqrt[3]) Power[847 - 33 Sqrt[33], (3)^-1] +
- I (Sqrt[3] + I) Power[847 + 33 Sqrt[33], (3)^-1]) (1/
- 2 (2 + I (Sqrt[3] + I) Power[19 - 3 Sqrt[33], (
- 3)^-1] + (-1 - I Sqrt[3]) Power[19 + 3 Sqrt[33], (
- 3)^-1]))^n)]]]](* 求表达式的实部和虚部。 *)
- Simplify[Together[
- ComplexExpand[
- Im[1/(44 3^(n + 1)) (
- 2 (22 + Power[847 - 33 Sqrt[33], (3)^-1] + Power[
- 847 + 33 Sqrt[33], (3)^-1]) (1 + Power[19 - 3 Sqrt[33], (
- 3)^-1] + Power[19 + 3 Sqrt[33], (3)^-1])^
- n + (44 +
- I (Sqrt[3] + I) Power[847 - 33 Sqrt[33], (
- 3)^-1] + (-1 - I Sqrt[3]) Power[847 + 33 Sqrt[33], (
- 3)^-1]) (1/
- 2 (2 + (-1 - I Sqrt[3]) Power[19 - 3 Sqrt[33], (3)^-1] +
- I (Sqrt[3] + I) Power[19 + 3 Sqrt[33], (3)^-1]))^
- n + (44 + (-1 - I Sqrt[3]) Power[847 - 33 Sqrt[33], (3)^-1] +
- I (Sqrt[3] + I) Power[847 + 33 Sqrt[33], (3)^-1]) (1/
- 2 (2 + I (Sqrt[3] + I) Power[19 - 3 Sqrt[33], (
- 3)^-1] + (-1 - I Sqrt[3]) Power[19 + 3 Sqrt[33], (
- 3)^-1]))^n)]]]]
- Out[109]= 1/22 3^(-n-3/2) (Sqrt[3] (22+Power[847-33 Sqrt[33], (3)^-1]+Power[847+33 Sqrt[33], (3)^-1]) (1+Power[19-3 Sqrt[33], (3)^-1]+Power[19+3 Sqrt[33], (3)^-1])^n-3 Power[11, (3)^-1] (Power[77-3 Sqrt[33], (3)^-1]-Power[77+3 Sqrt[33], (3)^-1]) (-3-Power[19-3 Sqrt[33], (3)^-1]+(19-3 Sqrt[33])^(2/3)-Power[19+3 Sqrt[33], (3)^-1]+(19+3 Sqrt[33])^(2/3))^(n/2) sin(n (\[Pi]-tan^-1((Sqrt[3] (Power[19+3 Sqrt[33], (3)^-1]-Power[19-3 Sqrt[33], (3)^-1]))/(-2+Power[19-3 Sqrt[33], (3)^-1]+Power[19+3 Sqrt[33], (3)^-1]))))-Sqrt[3] (-44+Power[847-33 Sqrt[33], (3)^-1]+Power[847+33 Sqrt[33], (3)^-1]) (-3-Power[19-3 Sqrt[33], (3)^-1]+(19-3 Sqrt[33])^(2/3)-Power[19+3 Sqrt[33], (3)^-1]+(19+3 Sqrt[33])^(2/3))^(n/2) cos(n (\[Pi]-tan^-1((Sqrt[3] (Power[19+3 Sqrt[33], (3)^-1]-Power[19-3 Sqrt[33], (3)^-1]))/(-2+Power[19-3 Sqrt[33], (3)^-1]+Power[19+3 Sqrt[33], (3)^-1])))))
- Out[110]= 0
复制代码 |
|