# Selecting the negative expression

Let Theta,t be real variables and Phi an expression of Theta,t. I want to solve Phi==0 w.r.t. t assuming Theta is in a neighbourhood of $$\pi^-$$.

In[0]:= Phi=-Sin[Theta] + t*Cos[Theta]*(-t + (2 + t)*Sin[Theta])


I use the AsymptoticSolve function (so any prior assumptions on Theta,t are not used) :

In[1]:= sols = AsymptoticSolve[Phi==0,t->0,Theta->Pi,Reals,Direction->"FromBelow",Assumptions->t<0]
Out[1]:= {{t -> Pi - Sqrt[Pi - Theta] - Theta}, {t -> Pi + Sqrt[Pi - Theta] - Theta}}


What we can see is that it returns two solutions, however only the first component {t -> Pi - Sqrt[Pi - Theta] - Theta} is a negative solution and Mathematica didn't remove the other one.

How can I select only the negative solutions? I used the following :

Select[sols,#<0&]


but Select do not use the variable \$Assumptions.

• Select[sols // Flatten, (t /. # /. Theta -> Pi - 0.01) < 0 &] Commented Oct 22, 2022 at 11:27

• Select negative solutions.
Select[sols,
Resolve[Exists[ϵ, ϵ > 0,
ForAll[s,
Pi - ϵ < s < Pi, (t /. # /. Theta -> s) < 0]]] &]


{{t -> π - Sqrt[π - Theta] - Theta}}

• Select positive solutions.
Select[sols,
Resolve[Exists[ϵ, ϵ > 0,
ForAll[s,
Pi - ϵ < s < Pi, (t /. # /. Theta -> s) > 0]]] &]


{{t -> π + Sqrt[π - Theta] - Theta}}