Skip to content

Instantly share code, notes, and snippets.

@aont

aont/gist:1080334

Created Jul 13, 2011
Embed
What would you like to do?
sin cos of one degree
#!/usr/bin/env maxima
c2(x):=2*x^2-1;
c3(x):=4*x^3-3*x;
answers:solve(c2(x)=c3(x),x);
cos72:rhs(answers[2]); /* index may differ in system */
sin18:cos72;
cos18:expand(sqrt(1-sin18^2));
answers:solve(c3(x)=cos18,x);
cos6:rhs(answers[3]); /* index may differ in system */
answers:solve(c3(x)=cos6,x);
cos2:rhs(answers[3]); /* index may differ in system */
answers:solve(c2(x)=cos2,x);
cos1:rhs(answers[2]); /* index may differ in system */
answers:solve(-c2(x)=cos2,x);
sin1:rhs(answers[1]); /* index may differ in system */
stringout("/dev/stderr",cos1);
stringout("/dev/stderr",sin1);
/*
cos1:sqrt(2^(4/3)*(4^(1/3)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)*sqrt(-2*4^(11/3)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(2/3)+2^(13/2)*sqrt(3-sqrt(5))*%i*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)+2^(13/2)*sqrt(sqrt(5)+5)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)+4^(13/3))+32*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)+2^(7/2)*4^(1/3)*sqrt(3-sqrt(5))*%i+2^(7/2)*4^(1/3)*sqrt(sqrt(5)+5))^(1/3)+4^(22/9)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(4/9)/(4^(1/3)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)*sqrt(-2*4^(11/3)*(sqrt(2)*sqrt(3-sqr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sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)*sqrt(-2*4^(11/3)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(2/3)+2^(13/2)*sqrt(3-sqrt(5))*%i*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)+2^(13/2)*sqrt(sqrt(5)+5)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)+4^(13/3))+32*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/3)+2^(7/2)*4^(1/3)*sqrt(3-sqrt(5))*%i+2^(7/2)*4^(1/3)*sqrt(sqrt(5)+5))^(1/3)+2^(5/3)*4^(11/9)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(2/9))/(2^(13/9)*4^(5/9)*(sqrt(2)*sqrt(3-sqrt(5))*%i+sqrt(2)*sqrt(sqrt(5)+5))^(1/9));
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment