Solving Trigonometric Equations

313 views
Skip to first unread message

Hadi Lq

unread,
Apr 20, 2014, 3:14:11 PM4/20/14
to sage-s...@googlegroups.com
Hi everyone
How can I solve these trigonometric equations:
var('A d c1 c2')
solve([A*cos(d)==c1,A*sin(d)==c2],A,d)

It just gives me:
[A*cos(d) == c1, A*sin(d) == c2]

kcrisman

unread,
Apr 21, 2014, 10:07:20 AM4/21/14
to sage-s...@googlegroups.com
This doesn't even make sense unless (c1/A)^2+(c2/A)^2==1, which is far more restrictive than the solver will impose as a restriction. 

Hadi Lq

unread,
Apr 21, 2014, 3:47:49 PM4/21/14
to sage-s...@googlegroups.com
Actually the answers are:
A = sqrt( c1^2 + c2^2 )
d = arctan( c2 / c1 ) 

Hadi Lq

unread,
Apr 23, 2014, 1:28:25 PM4/23/14
to sage-s...@googlegroups.com

As I'm new in sage world, can you at least help me to develop sage's solver. Where can I start? Please give me some hints. Thanks.

Dominique Laurain

unread,
Apr 26, 2014, 3:24:59 AM4/26/14
to sage-s...@googlegroups.com

Where to start :
http://www.sagemath.org/doc/reference/calculus/sage/symbolic/relation.html
read solve()

Read:
http://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CDIQFjAB&url=http%3A%2F%2Fwww.csulb.edu%2F~woollett%2Fmbe4solve.pdf&ei=rlhbU6_-BMXgOvLlgcgP&usg=AFQjCNHgkg8ryusZlGzg19QM7ogKmufo4A&sig2=tYRBajv8jhJmWVbA9_6R0A

quote chapter 4.1.1: " Maxima's ability to solve equations is limited, but progress is being made in this area.
"

I guess (because I don't know so much about Maxima symbolic) ... that differential equations are handled better in symbolic computations (for various maths reasons : solving quadratics, using Laplace transform...)...and I have little hope that solve() can find discrete or generic solutions like those in your system of two equations.

One better try would be to get one single equation f(A,d) = ( A*cos(d) - c1 )^2 + ( A*sin(d)  - c2 )^2 ; solve(f(A,d) == 0,A,d)...but the point is: you must understand that every "problem" must be set as math in the simplest form.The best solver cannot try all the transformations and all maths identifites  ( with sometimes abstract concepts as extending the field of "numeric" solutions ).


leif

unread,
Apr 26, 2014, 7:24:00 AM4/26/14
to sage-s...@googlegroups.com
Read: http://www.csulb.edu/~woollett/mbe4solve.pdf ;-)


-leif

> quote chapter 4.1.1: " Maxima's ability to solve equations is limited,
> but progress is being made in this area.
> "
>
> I guess (because I don't know so much about Maxima symbolic) ... that
> differential equations are handled better in symbolic computations (for
> various maths reasons : solving quadratics, using Laplace
> transform...)...and I have little hope that solve() can find discrete or
> generic solutions like those in your system of two equations.
>
> One better try would be to get one single equation f(A,d) = ( A*cos(d) -
> c1 )^2 + ( A*sin(d) - c2 )^2 ; solve(f(A,d) == 0,A,d)...but the point
> is: you must understand that every "problem" must be set as math in the
> simplest form.The best solver cannot try all the transformations and all
> maths identifites ( with sometimes abstract concepts as extending the
> field of "numeric" solutions ).

--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail


Dominique Laurain

unread,
Apr 27, 2014, 2:19:14 PM4/27/14
to sage-s...@googlegroups.com
Thanks leif for the pdf file about Maxima...  :-)


Reply all
Reply to author
Forward
0 new messages