ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 14 Jan 2021 14:46:18 +0100Simple trigonometric equation solvinghttps://ask.sagemath.org/question/55268/simple-trigonometric-equation-solving/I was a MapleV user in the past (~25 years ago) an I'm very pleased to find such an elegant solution the sage is.
I try to see how it works trying to solve an easy trigonometry calculation:
var('r,l,m')
ex = l/sin(m/2/r)-r
solve(ex,r)
[r == l/sin(1/2*m/r)]
Do not want, ok. To simplify I put some real values m and l and tried again:
exval = ex.subs(l=7.2,m=10)
solve(exval,r)
[r == 36/5/sin(5/r)]
still not solving, r=3.68357 is what I'm searching for. What would be a right way to proceed?
Thank you in advance, v42
vladimir42000Thu, 14 Jan 2021 14:46:18 +0100https://ask.sagemath.org/question/55268/Solving large trigonometric fucntionshttps://ask.sagemath.org/question/35705/solving-large-trigonometric-fucntions/Hi everyone,
I'm new to sage and would like to use it to give me an exact solution to the derivative of a large trig function. I have been tinkering around with the different trig simplification routines to no avail. Here is the current incarnation of my code:
var("theta phi r I sigma_a1 sigma_a2 M_1 M_2 F_tu")
import sympy as sy
M1(phi)=M_1*cos(phi+pi/2)
M1=M1.trig_reduce()
M2(phi)=M_2*cos(phi+theta+pi/2)
M2=M2.trig_reduce()
sigma_b1(r,phi)=M1(phi - pi/2)*r/I+sigma_a1
sigma_b1=sigma_b1.trig_reduce()
sigma_b2(r,phi)=M2(phi - pi/2)*r/I+sigma_a2
sigma_b2=sigma_b2.trig_reduce()
sigma_alt(r,phi)=sigma_b1-sigma_b2
sigma_alt=sigma_alt.trig_reduce()
sigma_mean(r,phi)=(sigma_b1-sigma_b2)/2
sigma_mean=sigma_mean.trig_reduce()
sigma_alteq(r,phi)=F_tu*sigma_alt/(F_tu-sigma_mean)
sigma_alteq=sigma_alteq.trig_reduce()
sol=diff(sigma_alteq,phi)
sol_reduc=SR(sy.fu(sy.sympify(sol))); sol_reduc
show(sol_reduc)
solve(sol_reduc,phi)
Sorry, I do not know how to make the code appear in a window. The final result it gives me is:
[sin(phi + theta) == M_1*sin(phi)/M_2]
Can someone please help me or at least point me in the right direction. Thanks.Kevin BryantWed, 23 Nov 2016 21:33:39 +0100https://ask.sagemath.org/question/35705/Solve trigonometric equationhttps://ask.sagemath.org/question/34624/solve-trigonometric-equation/ How do I solve simple trigonometric equation 2*cot(2x)=0?
I tried solve, but it gives me one solution, I need solution with n.
Thank you.proySun, 28 Aug 2016 23:23:50 +0200https://ask.sagemath.org/question/34624/Solve equation 1/3*x + sin(2*x)==1https://ask.sagemath.org/question/10833/solve-equation-13x-sin2x1/ Hi all.
I have the equations
y - 1 == 0,
y == 1/3*x + sin(2*x)
and I want solutions. I know by the intermediate value theorem that there are two solutions : about x=0.5 and x=1.25.
I'd like Sage to give me these solutions. I already tried to_poly_solve=True and/or explicit_solutions=True.
As an example of failure :
sage: solve( 1/3*x + sin(2*x)==1,x,explicit_solutions=True )
[]
What can I do ?
Thanks
Laurent ClaessensLaurent ClaessensSun, 15 Dec 2013 03:26:48 +0100https://ask.sagemath.org/question/10833/Solving trigonometric functionshttps://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?)
happosadeTue, 25 Sep 2012 13:19:08 +0200https://ask.sagemath.org/question/9350/