Using STACK to write solutions of the trigonometric equation

Using STACK to write solutions of the trigonometric equation

by Alex Lebedev -
Number of replies: 5

Hi,

Take an example. Solve the equation \( \cos x = \dfrac{1}{2} \)

In STACK the solutions of this equation can be written as: {pi/3+2*pi*n, -pi/3+2*pi*n}

But another option is possible: 5pi/3 +2*pi*n 

One point can correspond to several different analytical records. Please tell me how this case can be implemented in STACK

Thank you

Average of ratings: -
In reply to Alex Lebedev

Re: Using STACK to write solutions of the trigonometric equation

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers

No easy answers to this one!  A very good question and something we need to support.

The short answer is we don't have (yet) an in-house way of establishing equivalence between two infinite sets parameterised by an integer.

If you can suggest some maxima code to establish such an equivalence, then I'd be happy to consider adding a test to the core.  

Sorry not to be more positive.  In the medium to longer term, this is just the kind of puzzle I enjoy but I won't be able to solve it in the short term because of other things.  Sorry...

Chris


In reply to Christopher Sangwin

Re: Using STACK to write solutions of the trigonometric equation

by Alex Lebedev -
Christopher,thank you for your reply.
Maybe there is an opportunity to do the following?:
There are two correct answers: pi/3+2*pi*n or 5*pi/3+2*pi*n.The student can answer either this or that.
As a result, we get two correct sets: {pi/3+2*pi*n, -pi/3+2*pi*n} and {pi/3+2*pi*n, 5*pi/3+2*pi*n}.
Is it possible to implement a similar design in STAСK?
In reply to Alex Lebedev

Re: Using STACK to write solutions of the trigonometric equation

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Certainly, you can check equivalence with {pi/3+2*pi*n, -pi/3+2*pi*n} and if that test fails you can then check for equivalence with {pi/3+2*pi*n, 5*pi/3+2*pi*n}.   That might work in this case.  

I think what you are really trying to test is equivalence with the union

\[ \{\pi/3+2n\pi| n \in \mathbb{Z}\} \cup \{-\pi/3+2n\pi| n \in \mathbb{Z}\}. \]

I'm not aware of any computer algebra systems which can robustly do this in general!


In reply to Christopher Sangwin

Re: Using STACK to write solutions of the trigonometric equation

by Teodoru Gugoiu -

Chris,

I may have (in my mind at this moment) a solution to check (in Maxima) the equivalence of two sets (as the general solution set of a trigonometric equation), each of them of this kind:

{a1+b1*n, a2+b2*n, ...,ak+bk*n}

where b2/b1, b3/b1, ..., bk/b1 are all rational numbers, n is an integral variable and k is a finite natural number. All numbers (a1,b1,a2,b2, etc. and k) may be different for these two sets. Only n is the common variable.

Please let me know if you are interested.

I may send you either the algorithm or the Maxima code.

Teo

In reply to Alex Lebedev

Re: Using STACK to write solutions of the trigonometric equation

by Teodoru Gugoiu -

A quick fix to this issue is here (import the STACK question attached in the xml format).

This implementation accepts answers like:

{%pi/3+2*n*%pi,5*%pi/3+2*n*%pi}

{%pi/3+2*n*%pi,-%pi/3+2*n*%pi}

{7*%pi/3-2*n*%pi,5*%pi/3+2*n*%pi}

etc.

This method may be extended to cover equations like: (sin(x)-1)*tan(x/3)=0.

Please let me know if you find any bugs.

Teo