Turning powers of hyperbolic functions to multiple arguments
조회 수: 5 (최근 30일)
이전 댓글 표시
Silly question I'm sure.
After a long calculation I get a result involving several terms involving hyperbolic s powers like (cosh x)^7 etc.
Really would like the result expressed in terms of mutiiple angles, i.e. a linear combination of cosh(7x), cosh(5x) etc.
Whats the easiest way to get the output expressed in this way?
Thank you.
댓글 수: 0
답변 (2개)
Sam Chak
2024년 10월 22일
Hi @Andrew
At first, I thought you were describing the sum of arguments. This is certainly not a silly question. However, it requires some math skills (and patience) to express it for higher-order . Many years ago, I derived such an identity (using pen and paper), only to later discover that it is somewhat related to Chebyshev polynomials.
syms x
%% 7th-degree
% y1 = (2^6)*cosh(x)^7
% y2 = cosh(7*x) + 7*(16*cosh(x)^5 - 8*cosh(x)^3 + cosh(x))
%% 5th-degree
% y3 = (2^4)*cosh(x)^5
% y4 = cosh(5*x) + 5*(cosh(3*x) + 2*cosh(x))
%% 3rd-degree
% y5 = (2^2)*cosh(x)^3
% y6 = cosh(3*x) + 3*cosh(x)
% isAlways(y1 == y2)
% isAlways(y3 == y4)
% isAlways(y5 == y6)
y7 = cosh(x)^7
y8 = (cosh(7*x) + 7*(16*(cosh(5*x) + 5*(cosh(3*x) + 2*cosh(x)))/(2^4) - 8*(cosh(3*x) + 3*cosh(x))/(2^2) + cosh(x)))/(2^6)
isAlways(y7 == y8)
Result:
댓글 수: 2
Walter Roberson
2024년 10월 22일
In this particular case, simplify() is able to convert the sum back into the power.
syms x
y7 = cosh(x)^7
y8 = (cosh(7*x) + 7*(16*(cosh(5*x) + 5*(cosh(3*x) + 2*cosh(x)))/(2^4) - 8*(cosh(3*x) + 3*cosh(x))/(2^2) + cosh(x)))/(2^6)
simplify(y8)
To go the other way, power to sum,
rewrite(expand(rewrite(y7, 'exp')), 'cosh')
Sam Chak
2024년 10월 22일
Thanks @Walter Roberson for the ideas of using rewrite–expand–rewrite. The OP can use this trick to express higher order in terms of linear combinations
for odd power
for even power
Walter Roberson
2024년 10월 22일
syms x
y1 = cosh(x)^7
y2 = cosh(7*x)
isAlways(y1 == y2)
d = y1 - y2
fplot(d, [-0.5 0.5])
so the two forms are not equivalent.
You can try
simplify(EXPRESSION)
and hope that it identifies the simplifications... but to be honest, simplifying mixed trig expressions is not one of MATLAB's strong points.
abc = expand(rewrite(y1, 'exp') - rewrite(y2, 'exp'))
simplify(abc)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Measurements and Feature Extraction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!