First time here? Check out the FAQ!

Ask Your Question
1

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

asked 8 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 8 years ago

updated 8 years ago

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.

Preview: (hide)
link

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: 8 years ago

Seen: 674 times

Last updated: Aug 15 '16