ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 14 Aug 2016 21:03:20 -0500Solve for r in (x-x1)^2 + (y-y1)^2 == (r+r1)^2 ?http://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?
Sun, 14 Aug 2016 17:32:19 -0500http://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>
http://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. Sun, 14 Aug 2016 21:03:20 -0500http://ask.sagemath.org/question/34476/solve-for-r-in-x-x12-y-y12-rr12/?answer=34479#post-id-34479