ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 20 Aug 2021 23:11:44 +0200How to add two vectors in polar coordinateshttps://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/ Hello,
I wish to be able to add two polar vectors and get the result as a function of r1, r2, phi1, and phi2
The result is shown in: math.stackexchange.com/questions/1365622/adding-two-polar-vectors
Is this possible using SageMath ?
I tried to do this using the 3D Euclidean space for cylindrical coordinates in SageMath but could not get the result.
Thanks, GrantThu, 19 Aug 2021 00:23:45 +0200https://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/Comment by Max Alekseyev for <p>Hello,</p>
<p>I wish to be able to add two polar vectors and get the result as a function of r1, r2, phi1, and phi2 </p>
<p>The result is shown in: math.stackexchange.com/questions/1365622/adding-two-polar-vectors</p>
<p>Is this possible using SageMath ? </p>
<p>I tried to do this using the 3D Euclidean space for cylindrical coordinates in SageMath but could not get the result. </p>
<p>Thanks, Grant</p>
https://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/?comment=58572#post-id-58572Wouldn't it be easier to convert coordinates to Cartesian, perform the addition, and then convert the result back to polar? Sage provides a bunch of conversion functions - see https://doc.sagemath.org/html/en/thematic_tutorials/vector_calculus/vector_calc_change.htmlFri, 20 Aug 2021 23:11:44 +0200https://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/?comment=58572#post-id-58572Comment by grante for <p>Hello,</p>
<p>I wish to be able to add two polar vectors and get the result as a function of r1, r2, phi1, and phi2 </p>
<p>The result is shown in: math.stackexchange.com/questions/1365622/adding-two-polar-vectors</p>
<p>Is this possible using SageMath ? </p>
<p>I tried to do this using the 3D Euclidean space for cylindrical coordinates in SageMath but could not get the result. </p>
<p>Thanks, Grant</p>
https://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/?comment=58567#post-id-58567I wish to actually calculate the r & phi symbolically as it is shown in the math.stackexchange page given the r1, phi1 and r2, phi2 in polar coordinates.
I do not know if SageMath can do this --- perhaps, it is possible using the vector calculus in the Euclidean Space.
Thanks!Fri, 20 Aug 2021 16:03:53 +0200https://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/?comment=58567#post-id-58567Comment by John Palmieri for <p>Hello,</p>
<p>I wish to be able to add two polar vectors and get the result as a function of r1, r2, phi1, and phi2 </p>
<p>The result is shown in: math.stackexchange.com/questions/1365622/adding-two-polar-vectors</p>
<p>Is this possible using SageMath ? </p>
<p>I tried to do this using the 3D Euclidean space for cylindrical coordinates in SageMath but could not get the result. </p>
<p>Thanks, Grant</p>
https://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/?comment=58555#post-id-58555What exactly are you looking for? The math.stackexchange page that you cited gives formulas, and those are easy to write in Sagemath. I wouldn't expect this to be built in, but just do `r = sqrt(r1^2 + r2^2 + 2*r1*r2*cos(phi2-phi1))` and similarly `phi = phi1 + atan2(...)`.Thu, 19 Aug 2021 22:52:47 +0200https://ask.sagemath.org/question/58542/how-to-add-two-vectors-in-polar-coordinates/?comment=58555#post-id-58555