ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 25 Sep 2012 08:35:45 -0500Solving trigonometric functionshttp://ask.sagemath.org/question/9350/solving-trigonometric-functions/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?)
Tue, 25 Sep 2012 06:19:08 -0500http://ask.sagemath.org/question/9350/solving-trigonometric-functions/Comment by John Palmieri for <p>Hi</p>
<p>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:
<a href="http://sage.ehasa.org:8080/home/pub/2/">http://sage.ehasa.org:8080/home/pub/2/</a></p>
<p>Update: the things in question:</p>
<pre><code>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)
</code></pre>
<p>(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?)</p>
http://ask.sagemath.org/question/9350/solving-trigonometric-functions/?comment=19006#post-id-19006In 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.Tue, 25 Sep 2012 08:35:45 -0500http://ask.sagemath.org/question/9350/solving-trigonometric-functions/?comment=19006#post-id-19006Comment by kcrisman for <p>Hi</p>
<p>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:
<a href="http://sage.ehasa.org:8080/home/pub/2/">http://sage.ehasa.org:8080/home/pub/2/</a></p>
<p>Update: the things in question:</p>
<pre><code>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)
</code></pre>
<p>(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?)</p>
http://ask.sagemath.org/question/9350/solving-trigonometric-functions/?comment=19007#post-id-19007In the future, please simply post your code. It was not terribly long in this case.Tue, 25 Sep 2012 07:28:27 -0500http://ask.sagemath.org/question/9350/solving-trigonometric-functions/?comment=19007#post-id-19007