Ask Your Question
1

Solve for r in (x-x1)^2 + (y-y1)^2 == (r+r1)^2 ?

asked 2016-08-14 17:32:19 -0500

stasiana gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-08-14 21:03:20 -0500

updated 2016-08-14 21:03:44 -0500

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 to a live example.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-08-14 17:32:19 -0500

Seen: 42 times

Last updated: Aug 14 '16