TransWikia.com

How to make sure the answer is limited to Positive Reals?

Mathematica Asked on February 8, 2021

As the title described, there is code:

Solve[{Subscript[L, y2]/Subscript[L, y1] == 1/Sqrt[1 - v^2/c^2]},v] /. {Subscript[L, y1] -> 1/2, Subscript[L, y2] -> Sqrt[3]/2}

I have searched in the help doc, but the options I can find are RealsIntegers and Complexes. I don’t know how to limit the positive domain or others by myself. = =

One Answer

You can use the domain PositiveReals just like below.

In[1]:= Solve[{Subscript[L, y2]/Subscript[L, y1] == 1/Sqrt[1 - v^2/c^2]}, v, PositiveReals] /. {Subscript[L, y1] -> 1/2, Subscript[L, y2] -> Sqrt[3]/2}

Out[1]= {{v -> ConditionalExpression[Sqrt[2/3] Sqrt[c^2], c > 0]}}

Answered by LJFan on February 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP