Solving trigonometric functions

asked 2012-09-25 13:19:08 +0200

happosade gravatar image

updated 2012-09-25 14:27:59 +0200

kcrisman gravatar image

Hi

I have quite complex trigonometric function to solve, but sage only solves sin(alpha) and leaves some cos(alpha) on the other side. It is hard to explain, but see the link below: http://sage.ehasa.org:8080/home/pub/2/

Update: the things in question:

var('x,p,k,y,g,v,alpha')
A=-(g/(2*(v*cos(alpha))^2))
k=((v*cos(alpha))/(v*sin(alpha)))
p=(g*x)/(v*sin(alpha)^2)
B=(k+p)
C=(y-k*x-p*x^2)
(A+B+C).solve(alpha)

(It would be also nice to generate dynamic function where I put v, x and y. Tried something but I wasn't able to do that, help please?)

edit retag flag offensive close merge delete

Comments

In the future, please simply post your code. It was not terribly long in this case.

kcrisman gravatar imagekcrisman ( 2012-09-25 14:28:27 +0200 )edit
1

In this case, Sage is giving an implicit solution. You can try to force an explicit solution with `(A+B+C).solve(alpha, explicit_solutions=True)`, but Sage can't find any for this particular equation.

John Palmieri gravatar imageJohn Palmieri ( 2012-09-25 15:35:45 +0200 )edit