symbolic of cos with power
16 views (last 30 days)
Show older comments
I have a long equation with cosine with powers (e.g., (cos(a))^3, (cos(a))^5, ..). Then I need to reduce each power of cosine to unity (but angle is higher): e.g., (cos(a))^2 -> (1+cos(2a))/2.
Here are more examples which reduce various powers:
Anyone who knows how to reduce my cosines to unity of power of cosine, using symbolic of matlab?
Answers (1)
Karan Gill
on 9 Dec 2016
Here, you want to change the input of "cos" from "x" to "2*x". Essentially, you want make the argument of "cos" more complicated. The "combine" command does that.
syms x
f = cos(x)^2;
combine(f,'sincos')
ans =
cos(2*x)/2 + 1/2
0 Comments
See Also
Categories
Find more on Stability Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!