I am trying to solve a transcendental equation which contains a parameter theta. When I solve the equation with theta free, I get 8 solutions which all have the expression (theta-1) in the denominator. So they blow up. I do not see a cause for that in the equation.If instead I first replace theta with 1, then I get good finite solutions. There must be something I am doing wrong here, and I would appreciate help in identifying it. In the code below I deleted output because all the typesetting will look awful on the forum.
expr = Sqrt[θ Cos[ϕ]^2 + (-a + θ Sin[ϕ])^2] (* all solutions have a factor (θ-1) in the denominator so they \ blow up there *) sol1 = ϕ /. Solve[y == expr, ϕ] // Simplify (* But if I substitute θ\[Rule]1 first, all is well *) Solve[y == expr /. θ -> 1, ϕ] (* Solve cannot handle this at all*) sol2 = ϕ /. Solve[y == expr && 0 < θ < Pi && 0 < a < θ, ϕ] // Simplify