Group Abstract Group Abstract

Message Boards Message Boards

Solve[ ] gives an empty output?

Posted 4 years ago

Hello, I need c1,c2....c9 values. Why is Solve returning an empty list? How I can fix it? Thanks for any advice.

Solve[{uj == aj*c1 + bj*c2 + cj*c3 + ui, 
vj == aj*c4 + bj*c5 + cj*c6 + vi, tj == aj*c7 + bj*c8 + cj*c9 + ti, 
uk == ak*c1 + bk*c2 + ck*c3 + ui, vk == ak*c4 + bk*c5 + ck*c6 + vi, 
tk == ak*c7 + bk*c8 + ck*c9 + ti, ul == al*c1 + bl*c2 + cl*c3 + ui, 
vl == al*c4 + bl*c5 + cl*c6 + vi, tl == al*c7 + bl*c8 + cl*c9 + ti, 
um == am*c1 + bm*c2 + cm*c3 + ui, vm == am*c4 + bm*c5 + cm*c6 + vi, 
tm == am*c7 + bm*c8 + cm*c9 + ti, un == an*c1 + bn*c2 + cn*c3 + ui, 
vn == an*c4 + bn*c5 + cn*c6 + vi, tn == an*c7 + bn*c8 + cn*c9 + ti, 
uo == ao*c1 + bo*c2 + co*c3 + ui, vo == ao*c4 + bo*c5 + co*c6 + vi, 
to == ao*c7 + bo*c8 + co*c9 + ti, up == ap*c1 + bp*c2 + cp*c3 + ui, 
vp == ap*c4 + bp*c5 + cp*c6 + vi, 
tp == ap*c7 + bp*c8 + cp*c9 + ti}, {c1, c2, c3, c4, c5, c6, c7, c8, 
c9}]
POSTED BY: Umut Cemre Can
6 Replies
Posted 4 years ago

Thank you sir. It was my mistake. You are right, I need to reduce equations. It was enough 9 equations for my problem. I fixed it and got the solution. I appreciate for your help.

POSTED BY: Umut Cemre Can
POSTED BY: Hans Dolhaine

I just noticed that your equations contain cj's and so on.

uj == aj*c1 + bj*c2 + cj*c3 

Are these coefficients member of the set v = { c1, c2, ... , c9 } (which would render your system of equations to be non-linear), or are these cj's independent known coefficients like aj and so on?

POSTED BY: Hans Dolhaine
POSTED BY: Hans Dolhaine
Posted 4 years ago

Thank you professor

POSTED BY: Umut Cemre Can

Your system has more equations than unknowns. Solve only gives generic solutions. You may try Reduce, but it is probably too complicated. Here I replace the coefficients with random numbers and check if there are solutions:

eqs = {uj == aj*c1 + bj*c2 + cj*c3 + ui, 
   vj == aj*c4 + bj*c5 + cj*c6 + vi, tj == aj*c7 + bj*c8 + cj*c9 + ti,
    uk == ak*c1 + bk*c2 + ck*c3 + ui, 
   vk == ak*c4 + bk*c5 + ck*c6 + vi, tk == ak*c7 + bk*c8 + ck*c9 + ti,
    ul == al*c1 + bl*c2 + cl*c3 + ui, 
   vl == al*c4 + bl*c5 + cl*c6 + vi, tl == al*c7 + bl*c8 + cl*c9 + ti,
    um == am*c1 + bm*c2 + cm*c3 + ui, 
   vm == am*c4 + bm*c5 + cm*c6 + vi, tm == am*c7 + bm*c8 + cm*c9 + ti,
    un == an*c1 + bn*c2 + cn*c3 + ui, 
   vn == an*c4 + bn*c5 + cn*c6 + vi, tn == an*c7 + bn*c8 + cn*c9 + ti,
    uo == ao*c1 + bo*c2 + co*c3 + ui, 
   vo == ao*c4 + bo*c5 + co*c6 + vi, to == ao*c7 + bo*c8 + co*c9 + ti,
    up == ap*c1 + bp*c2 + cp*c3 + ui, 
   vp == ap*c4 + bp*c5 + cp*c6 + vi, tp == ap*c7 + bp*c8 + cp*c9 + ti};
vars = {c1, c2, c3, c4, c5, c6, c7, c8, c9};
coeffs = Complement[Cases[eqs, _Symbol, All], vars];
values = RandomInteger[{1, 2}, Length[coeffs]]
eqs /. Thread[coeffs -> values]
Reduce[%]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard