MATLAB: Matlab Trigonometry and built in functions

MATLABtrigonometry

Hello Dear Forum Members;
>> cos(pi/5)*cos(pi/5)=(tan(pi/5)+sin(pi/5))/(2*tan(pi/5))
cos(pi/5)*cos(pi/5)=(tan(pi/5)+sin(pi/5))/(2*tan(pi/5))
Error: The expression to the left of the equals sign is not a valid target for an assignment.
>> cos(pi/5)*cos(pi/5)
ans =
0.6545
I have written the codes above but they are not matched. I kindly request your help. Thank you…

Best Answer

You are missing the /2 inside the cosine on the lhs. E.g.,
>> cos((pi/5)/2)^2
ans =
0.904508497187474