Ask Your Question
1

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

asked 2016-08-15 00:32:19 +0200

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-15 04:03:20 +0200

updated 2016-08-15 04:03:44 +0200

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-15 00:32:19 +0200

Seen: 317 times

Last updated: Aug 15 '16