What is the best way to solve for the simple equation X^2+y^2=1[m]^2 symbolically for either x or y? I actually have a huge list of equations and want to solve the group but my problem boils down to the issue here where I get two possible solutions though using the assumption one is clearly negative and the assumption used should exclude negative results (see attempt below). Also solve doesn't seem to work with units either... any ideas? Can I give the variables units in a meaningful way?

--------------------------------------------------------------------------------------------------------------------------

restart;

with(RealDomain);

f := x^2+y^2 = 1;

x^2+y^2 = 1

assume(y > 0)

a := y > 0

y1 = solve(f, y, useassumptions = true)

y1 = (sqrt(-x^2+1), -sqrt(-x^2+1))

y2 = solve({a, f}, y)

y2 = ({y = sqrt(-x^2+1)}, {y = -sqrt(-x^2+1)})

-------------------------------------------------------------------------------------------

Why is y = -sqrt(-x^2+1) a solution?

Also, how do I use units when trying to solve

-------------------------------------------------------------------------------------------

restart;

f := x^2+y^2 = Unit('m')^2;

x^2+y^2 = Unit('m')^2

assume(x > 0);

assume(y > 0);

d = solve(f, y, useassumptions = true);

Error, (in Units:-Standard:-+) the units `m^2` and `1` have incompatible dimensions

---------------------------------------------------------------------------------------------

THANKS!