Output formatting for symsum script

1 回表示 (過去 30 日間)
John
John 2018 年 12 月 21 日
回答済み: madhan ravi 2018 年 12 月 21 日
I'm running the following symsum script:
clear all;
clc;
syms n j
S3 = symsum((2-sqrt(3))^(j-2)+(2-sqrt(3))^(n+2-j)+(2-sqrt(3))^j+(2-sqrt(3))^(n-j), j, 2, n)
The output I get is:
S3 =
(5434655273855712934344302876729*(603367941593515/2251799813685248)^n*(2251799813685248/603367941593515)^n)/3711938582448988931733044854784 - (10869310547711425868688605753458*(603367941593515/2251799813685248)^n)/994610945521133345896277911495 + 5434655273855712934344302876729/3711938582448988931733044854784
>>
I suppose that some of the terms in the solution involve (2-sqrt(3))^n. Is there a way to have the output represented in this fashion?

回答 (1 件)

madhan ravi
madhan ravi 2018 年 12 月 21 日
rewrite(S3,'sqrt') % usually this should work but it's not here

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by