Turning powers of hyperbolic functions to multiple arguments

조회 수: 5 (최근 30일)
Andrew
Andrew 2024년 10월 22일
댓글: Sam Chak 2024년 10월 22일
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.

답변 (2개)

Sam Chak
Sam Chak 2024년 10월 22일
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)
ans = logical
1
Result:
  댓글 수: 2
Walter Roberson
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
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
Walter Roberson 2024년 10월 22일
syms x
y1 = cosh(x)^7
y2 = cosh(7*x)
isAlways(y1 == y2)
Warning: Unable to prove 'cosh(x)^7 == cosh(7*x)'.
ans = logical
0
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)

카테고리

Help CenterFile Exchange에서 Measurements and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by