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.Mon, 15 Aug 2016 04:03:20 +0200Solve for r in (x-x1)^2 + (y-y1)^2 == (r+r1)^2 ?https://ask.sagemath.org/question/34476/solve-for-r-in-x-x12-y-y12-rr12/
Getting start with Sage. I tried a simply problem:
solve([(x-x1)^2 + (y-y1)^2 == (r+r1)^2, r)
Presumably the solution is +/- sqrt((x-x1)^2 + (y-y1)^2) - r1, but Sage never returns. Did I issue the right command?
Mon, 15 Aug 2016 00:32:19 +0200https://ask.sagemath.org/question/34476/solve-for-r-in-x-x12-y-y12-rr12/Answer by paulmasson for <p>Getting start with Sage. I tried a simply problem:</p>
<pre><code>solve([(x-x1)^2 + (y-y1)^2 == (r+r1)^2, r)
</code></pre>
<p>Presumably the solution is +/- sqrt((x-x1)^2 + (y-y1)^2) - r1, but Sage never returns. Did I issue the right command?</p>
https://ask.sagemath.org/question/34476/solve-for-r-in-x-x12-y-y12-rr12/?answer=34479#post-id-34479 You have an extra square bracket you don't want. This code works as you expect:
var('x x1 y y1 r r1')
solve((x-x1)^2 + (y-y1)^2 == (r+r1)^2, r)
Here's a [link](http://sagecell.sagemath.org/?z=eJwrSyzSUK9QqDBUqFSoNFQoUigyVNfk5SrOzylL1dCo0K0w1IwzUtBW0KjUrQQzbW0VNIq0i0BsHYUiTQA9TBDX&lang=sage) to a live example. Mon, 15 Aug 2016 04:03:20 +0200https://ask.sagemath.org/question/34476/solve-for-r-in-x-x12-y-y12-rr12/?answer=34479#post-id-34479