Question
USING MATLAB
please show all commands
(sin x + cos x)2 = 1 + 2sin xcos r (a) For each part, verify that the identity is correct by calculating the values of the left and right sides of the equation, substituting x=20。 1 1-2cos x-3cos x1-3cos x 1-cos x (b) sin x sin-x
0 0
Add a comment Improve this question Transcribed image text
Answer #1

fprintf('\nChecking first identity: \n');
x = 20;
LHS = (sind(x) + cosd(x)).^2;
RHS = 1+(2*(sind(x)*cosd(x)));
if (abs(LHS-RHS) <= 0.001)
   fprintf('Identity is correct.\n');
else
   fprintf('Identity is incorrect.\n');
end

fprintf('\nChecking second identity: \n');
LHS = (1-(2*cosd(x)-3*(cosd(x).^2)))/(sind(x).^2);
RHS = (1-(3*cosd(x)))/(1-cosd(x));
if (abs(LHS-RHS) <= 0.001)
   fprintf('Identity is correct.\n');
else
   fprintf('Identity is incorrect.\n');
end

Add a comment
Know the answer?
Add Answer to:
USING MATLAB please show all commands (sin x + cos x)^2 = 1 + 2sin xcos...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT