Trigonometric Power Reduction Formulas using Symbolic Matlab

조회 수: 7 (최근 30일)
MSleiman
MSleiman 2016년 12월 4일
댓글: Star Strider 2016년 12월 9일
Hi,
How can i get 1/2(1-cos(2*a)) by rewriting sin(a)^2 using Symbolic Matlab toolbox?
On the other hand if I use rewrite(.5*(1- cos(2*a)),'sin'), i will get sin(a)^2, can't I do the reverse of this process?
Thanks

채택된 답변

Karan Gill
Karan Gill 2016년 12월 9일
Here, you want to change the input from "sin" from "a" to cos with "2*a". Essentially, you want make the argument of the function more complicated. The "combine" command does that.
>> syms a
>> f = sin(a)^2;
>> combine(f,'sincos')
ans =
1/2 - cos(2*a)/2
  댓글 수: 1
Star Strider
Star Strider 2016년 12월 9일
Wow! The combine function has been around since R2014a. I need to read the Release Notes more carefully.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2016년 12월 4일
syms a
simplify(rewrite(rewrite(sin(a)^2,'tan'),'sin'))

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by