Question about to_poly_solve
- Subject: Question about to_poly_solve
- From: Stavros Macrakis
- Date: Thu, 13 Jun 2013 10:25:11 -0400
It looks like to_poly_solve is calling algsys, which is using approximate
methods and thus giving bogus results.
You might try:
sols: solve( [ trigexpand( sin(x)+cos(x)=cos(2*x) ),
sin(x)^2+cos(x)^2=1 ], [sin(x),cos(x)] )
To get explicit results (rather than sin(x)=...), you can then use %solve:
map(lambda([eq],%solve(eq,x)), sols);
-s
On Thu, Jun 13, 2013 at 9:31 AM, Karl-Dieter Crisman <kcrisman at gmail.com>wrote:
> Just putting this one out there. Is there some obvious simplification I'm
> missing?
>
> (%i2) load(to_poly_solve);
>
> Loading maxima-grobner $Revision: 1.6 $ $Date: 2009-06-02 07:49:49 $
> (%o2)
> /Users/karl.crisman/Downloads/sage-5.9.rc1/local/share/maxima/5.29.1/sha\
> re/to_poly_solve/to_poly_solve.mac
> (%i3) to_poly_solve(sin(x)+cos(x)=cos(2*x),x);
> (%o3) %union([x =
> - 254453378946433024 %pi %z10 - 113 %i + 199847233464565760
> - -----------------------------------------------------------],
> 127226689473216512
> - 5428338750857237544 %pi %z12 - 452 %i + 2131703823622034655
> [x = - -------------------------------------------------------------],
> 2714169375428618772
> - 2035627031571464192 %pi %z14 - 113 %i - 2398166801574789120
> [x = - -------------------------------------------------------------],
> 1017813515785732096
> [x = 2 %pi %z8])
> (%i4) solve(sin(x)+cos(x)=cos(2*x),x);
> (%o4) [cos(2 x) = sin(x) + cos(x)]
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>