Turning powers of hyperbolic functions to multiple arguments
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (2)
Sam Chak
le 22 Oct 2024
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 commentaires
Walter Roberson
le 22 Oct 2024
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
le 22 Oct 2024
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
le 22 Oct 2024
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 commentaires
Voir également
Catégories
En savoir plus sur Measurements and Feature Extraction dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!