Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have nonlinear equations to solve parametrically;

PG = 100;

p1 = 0.8;

p2 = 0.2;

Solve[C1 - 10 + PG/2 + GC1 + GL1 == 0 && 
  C2 - 15 + PG/2 + GC2 + GL2 == 0 && GL1 - fd (a1) t 10 == 0 && 
  GL2 - fd (a2) t 15 == 0 && 
  GC1 - (t (1 - fd) 25 - PG) ((p1)/((p1) + (p2))) == 0 && 
  GC2 - (t (1 - fd) 25 - PG) ((p2)/((p1) + (p2))) == 
   0 && (0.3/GL1) - (0.5/C1) - (0.3/GC1) - (0.4/PG) == 
   0 && (0.3/GL2) - (0.5/C2) - (0.3/GC2) - (0.4/PG) == 0 && 
  GC1 - 4 GC2 == 0, {C1, C2, GC1, GC2, GL1, GL2, fd, a1, a2, t}]

I do get 8 roots for this problem. However, for more complex solvings of this model (change numeric values - 15,10 to alpha, beta, gamma) I do get no more memory error. To avoid that I want to put some conditions on the variables since all roots are not meaningful and it takes time+memory to calculate it. Ex: a1 > 0, a2 > 0, 0 $\leq$ fd $\leq$ 1, C1 C2 takes positive values. I want to solve under these or more conditions. How to put these nonnegativity and bounding conditions for variables in the mathematica solve command?

At least if I could put nonnegativity conditions I would get rid of the negative roots.

Does it matter if I use Reduce instead ?

I would appreciate your comments and your help.

share|improve this question
    
Do you need the symbolic solution or a numerical one will suffice your need? –  PlatoManiac Apr 24 '13 at 13:54
    
You can add constraints in the same way that you joined up your equations: equation1 && equation2 && constraint1 && constraint2... –  J. M. Apr 24 '13 at 13:57
    
@PlatoManiac I do get a symbolic solution. So in the symbolic solution some variables a1, a2 etc. stated above should be nonnegative. Because in the solution I get one root for ex say: a1= -0.1t. since I know that t is positive a1 becomes negative. If I restrict a1 to nonnegative constraint maybe I can avoid the unnecessary calculation. –  HarveyMudd Apr 24 '13 at 13:59
    
@J.M. I tried that but I get this error : Solve::eqf: a1>0 is not a well-formed equation. –  HarveyMudd Apr 24 '13 at 14:01
1  
I'm not necessarily proposing hand simplification: Mathematica can help at every step using Reduce, Eliminate, Simplify, Replace, etc. You complain about being out of RAM; some clear courses of action in that case are to reduce the size of the problem and to break it into subproblems, as I suggested. The syntax is simple: include inequalities with the equalities. –  whuber Apr 24 '13 at 15:45
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.