Generate a MATLAB code to confirm the trigonometry identitie

Generate a MATLAB code to confirm the trigonometry identities(you can use the graph as a way prove the identity) that are mentioned in class The alpha and Beta angles should be from 0 to 2*pi.

sin( + ) = sin()cos() + cos()sin()
sin( – ) = sin()cos() – cos()sin()
cos( + ) = cos()cos() – sin()sin()
cos( – ) = cos()cos() + sin()sin()

sin(2x) = 2sin(x)cos(x)

cos(2x) = cos2(x) – sin2(x) = 1 – 2sin2(x) = 2cos2(x) – 1

Solution

syms alpha beta

ezplot(sin(alpha + beta),[0, 2*pi]);
figure
ezplot(sin(alpha)*cos(beta) + cos(alpha)*sin(beta),[0, 2*pi]);

%---------------------------------------------------------------------------------------


syms alpha beta

ezplot(sin(alpha - beta),[0, 2*pi]);
figure
ezplot(sin(alpha)*cos(beta) - cos(alpha)*sin(beta),[0, 2*pi]);

%-------------------------------------------------------------------------------------

syms alpha beta

ezplot(sin(alpha + beta),[0, 2*pi]);
figure
ezplot(cos(alpha)*cos(beta) - sin(alpha)*sin(beta),[0, 2*pi]);

%-----------------------------------------------------------------------------------

syms alpha beta

ezplot(sin(alpha - beta),[0, 2*pi]);
figure
ezplot(cos(alpha)*cos(beta) + sin(alpha)*sin(beta),[0, 2*pi]);

%----------------------------------------------------------------------


syms x

ezplot(sin(2*x),[0, 2*pi]);
figure
ezplot(2*sin(x)*cos(x),[0, 2*pi]);

%-----------------------------------------------------------------------------


syms x

ezplot(cos(2*x),[0, 2*pi]);
figure
ezplot(cos(x)^2 - sin(x)^2,[0, 2*pi]);
figure
ezplot(1 - 2*sin(x)^2,[0, 2*pi]);
figure
ezplot(2*cos(x)^2 - 1,[0, 2*pi]);

Generate a MATLAB code to confirm the trigonometry identities(you can use the graph as a way prove the identity) that are mentioned in class The alpha and Beta
Generate a MATLAB code to confirm the trigonometry identities(you can use the graph as a way prove the identity) that are mentioned in class The alpha and Beta

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site