Ask Your Question
0

Need positive sqrts only

asked 12 years ago

Mr Cool gravatar image

Hi,

I have solved some equations using solve() which does some manipution then takes a few positive and negative sqrts and then some more manipulation. There are several sets of solutions, but it's not obvious which ones correspond to which sign of sqrts. Is there an easy way I can make solve() only take positive square roots?

Thanks! And let me know if more info is needed.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 12 years ago

Shashank gravatar image

You can make sure solve returns only positive square roots by making sure that the argument of square root is positive. For eg.

solve(x*x==1,x)

gives x=1,x=-1

however,

assume(x>0)
solve(x*x==1,x)

returns x=1

I might be able to give a better answer if you could give me a simplified example of the problem.

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

Seen: 455 times

Last updated: Jun 11 '12