0
$\begingroup$

I have this problem : I have some function g[a,b;x], where a,b are parameters and x is a variable. I know (graphically) that an equation g[a,b;x]=0 has zero, one or two solutions. I want to keep 'a' fixed and find a such 'b' (as a function of 'a') that the number of solutions will be equal to one.

How can I do this? In other words I want to do something like

Solve[{Number of solutions{Solve[g[a,b,x]==0,x]}==1,b]

(a physical example : for a rotating black hole we have a (00) metric tensor component g_00[M,J;r]. Usually there are two horizons (r_+,r_-) where g_00=0. I want to keep M fixed and search for such J that r_+=r_-, so there is only one horizon (I know this happens for J=0, but I want to compute it using Mathematica).

Thanks in advance!

$\endgroup$
  • $\begingroup$ Sometimes the following idea works eq[x_] := a x^2 + b x + c; Solve[Equal @@ (x /. Solve[eq[x] == 1, x])] $\endgroup$ – Dr. belisarius Dec 15 '14 at 15:32
1
$\begingroup$

Similar to @belisarius comment except I understood your question to ask for b in terms of a. If the equaton can be solved symbolically, equate the two solutions and solve the resulting equation for b. For example

eqn = a*x^2 + b*x + c == 0;

sol = Solve[Equal @@ (x /. Solve[eqn, x]), b]

{{b -> -2 Sqrt[a] Sqrt[c]}, {b -> 2 Sqrt[a] Sqrt[c]}}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.