rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

Unable to solve simple system #2830

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-06 23:07:55 Created by danielvolinski on 2015-01-18 12:27:35 Original: https://sourceforge.net/p/maxima/bugs/2891


Hi all,

Using Maxima Windows 5.35.1.2 on Windows 8.1 x64

I'm unable to solve this system with wxMaxima.

sol:solve([x=p*cos(q),y=p*sin(q)],[p,q]);

I get an empty solution where it should be p=sqrt(x^2+y^2) and q=atan2(y,x)

Thanks,

Daniel

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-06 23:07:56 Created by pankajsejwal on 2015-01-21 07:10:42 Original: https://sourceforge.net/p/maxima/bugs/2891/#89ad


May be not very helpful, but one more way to accomplish the same result is, carg(x+y%i); => atan2(y,x) cabs(x+y%i); => sqrt(y^2+x^2)

I hope you know why its correct.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-06 23:08:00 Created by villate on 2015-01-21 09:59:27 Original: https://sourceforge.net/p/maxima/bugs/2891/#ddb4


Diff:


--- old
+++ new
@@ -4,7 +4,7 @@

 I'm unable to solve this system with wxMaxima.

-sol:solve([x=p*cos(q),y=p*sin(q)],[p,q]);
+sol:solve([x=p\*cos(q),y=p\*sin(q)],[p,q]);

 I get an empty solution where it should be p=sqrt(x^2+y^2) and q=atan2(y,x)