Can only find one double angle formula of cos(2x).
12 次查看(过去 30 天)
显示 更早的评论
close all
clear
clc
syms x
expand (cos(2*x))
ans =
2*cos(x)^2 - 1
That is one of the three double angle formulas for cos(2x).
How do I get matlab to show the other two double angle formulas?
0 个评论
采纳的回答
Star Strider
2021-9-10
Experiment with various options to get at least one more identity —
syms x
f(x) = cos(2*x)
f1 = expand (f)
f2 = rewrite(f, 'exp')
f3 = rewrite(f2, 'sin')
.
5 个评论
Jan
2021-9-10
@John Ooi: He adds:
0 = 1 - 1 = 1 - (sin(x)^2 + cos(x)^2) = ...
= 1 - sin(x)^2 - cos(x)^2
@John D'Errico: Yes, Matlab does not care, because all these expressions are equivalent. But I was curious how to bring the symbolic engine to express the different forms. Thanks for showing this.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!