0
$\begingroup$

I want to solve a three-equation system, but I need to constrain two of the variables so that they can only take one of several discrete values that I would specify (this is a circuit design problem where I need to find a resistor that can have a continuous range of values and two standard capacitors). I attempted to use Solve[] using the logical OR operator || to constrain the two variables, but Mathematica tells me that the system is not a quantified system of equations and inequalities. Does anybody know of a solution to this?

Here's the code:

Solve[{
  (10*^3 == 1/(2*Pi*Sqrt[10000*r2*c1*c2])),
  (20 == 3*Sqrt [r2*c2]/Sqrt[10000*c1]),
  (3 == Sqrt[r2/10000]*Sqrt [c1*c2]/(c1 + c2)),
  (r2 > 5000),
  (c1 == (10*^-12) || (100*^-12) || (22*^-12) || (0.001*^-6) || \
    (0.01*^-6) || (0.1*^-6)),
  (c2 == (10*^-12) || (100*^-12) || (22*^-12) || (0.001*^-6) || \
    (0.01*^-6) || (0.1*^-6))},
 {r2, c1, c2}]
$\endgroup$
3
  • $\begingroup$ x == (1 || 2) doesn't make sense (within Mathematica) but (x == 1) || (x == 2) does. You can omit the parentheses from the latter. If you use only exact numbers (i.e. there's no decimal point in them), then Reduce should theoretically work, but it's taking a very long time on my machine. $\endgroup$
    – Szabolcs
    Commented Apr 14, 2014 at 17:38
  • $\begingroup$ The problem is that you have three equations, but for any particular choice of c1 and c2, you only have one variable to solve for: r2. Do you have any reason to believe that all three equations will be satisfied for some value of r2? The system looks overdetermined. $\endgroup$
    – Szabolcs
    Commented Apr 14, 2014 at 17:45
  • $\begingroup$ If you specify that Reduce should solve for Reals (as I suspect it is what you expect), the result is False. I guess it means that the system is unsolvable. (With the constraints provided, that is) $\endgroup$
    – Aisamu
    Commented Apr 14, 2014 at 17:59

1 Answer 1

3
$\begingroup$

This system of equations is overdetermined:

In[27]:= Solve[(10*^3 == 1/(2*Pi*Sqrt[10000*r2*c1*c2])) && (20 == 
    3*Sqrt[r2*c2]/Sqrt[10000*c1]) && (3 == 
    Sqrt[r2/10000]*Sqrt[c1*c2]/(c1 + c2)), {c1, c2, r2}, Reals]

Out[27]= {{c1 -> 3/(4000000000 π), c2 -> 11/(12000000000 π), r2 -> 4000000/11}}

Just using the first three equations you get a single solution. This solution doesn't match any of your additional constraints for the values of c1 and c2. Thus there's no solution that satisfies this complete set of equations.


That said, generally the correct syntax to specify a discrete set of values would be

x == 1 || x == 2

and not

x == (1 || 2)  (* wrong *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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