Le jeudi 11 janvier 2018 03:39:04 UTC+1, Bernat Bassols a écrit :
>
> Hello,
> I have come across an error while solving a (relatively) easy 
> trigonometric equation.
> Basically, CoCalc is giving me a solution to an equation that is not 
> right. 
> Take a look here:
>
> Also the CoCalc Worksheet URL: 
> https://cocalc.com/projects/906013bd-a0e4-4ba2-92b9-1d51e7ccb16d/files/2018-01-10-171011.sagews?session=default
>  
>

Hmmm... Let's see :

sage: eq=-cos(m)^4*e^(3*m)-2*cos(m)^2*sin(m)^2*e^(3*m)-e^(3*m)*sin(m)^4
sage: eq.solve(m)
[m == 1/2*pi]

Let's check :

sage: eq=-cos(m)^4*e^(3*m)-2*cos(m)^2*sin(m)^2*e^(3*m)-e^(3*m)*sin(m)^4
sage: S1=eq.solve(m);S1
[m == 1/2*pi]

Let's check :

sage: eq.subs(S1)
-e^(3/2*pi)

Nice failure... But :

sage: S2=eq.solve(m,to_poly_solve='force');S2
[]

Looks better. By the way :

sage: eq.factor().trig_reduce()
-e^(3*m)

which has no solution.

How well fares "the competition" ?
sage: import sympy
sage: sympy.solve(eq,m)
[]
sage: from giacpy_sage import *
sage: libgiac.solve(eq,m)
Warning, argument is not an equation, solving 
-cos(m)^4*exp(m*3)-cos(m)^2*exp(m*3)*sin(m)^2*2-exp(m*3)*sin(m)^4=0
[]
sage: fricas.solve(eq,m)
[]
sage: maple.solve(eq==0,m)

sage: mathematica.Solve(eq==0,m)
{}

Maple's answer is dubious (I might have a wrong syntax). The rest of the 
bunch correctly solves the problem ; so the problem is with Maxima's 
default algorithm.

Is there anything that can be done to solve this issue?
>


   - Check your results (always useful with CASes (any of them)).
   - Use alternate systems (see above).
   - File a ticket against Maxima... Unless you do this, I'll do it 
   (probably this week-end).

 

> Thank you in advance.
>

You're welcome.

--
Emmanuel Charpentier 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to