Turning powers of hyperbolic functions to multiple arguments

2 次查看(过去 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.

回答(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 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by