Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Trouble with a system of equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77850] Re: Trouble with a system of equations
  • From: Yaroslav Bulatov <yaroslavvb at gmail.com>
  • Date: Mon, 18 Jun 2007 06:59:56 -0400 (EDT)
  • References: <f4lb44$fvv$1@smc.vnet.net><200706150844.EAA16248@smc.vnet.net>

After many helpful suggestions I got Mathematica to solve the
equations in question, here's a step by step summary
http://www.yaroslavvb.com/research/reports/logistic-equations/logistic.nb

Basically the default Solve method doesn't detect that the equations
can be solved by eliminating variables in the right order, but if we
specify elimination order manually, it has no problem.


On Jun 16, 12:40 am, Carl Woll <c... at wolfram.com> wrote:
> Yaroslav Bulatov wrote:
> >As Ray Koopman and some others pointed out, the system ofequations
> >becomes linear with a proper choice of variables. But now getting the
> >original variables is problematic.
>
> >In particular, if I replace all terms of the form Exp[a+b+c]/1+Exp[a+b
> >+c..] with single variables, I will have to solve the following to get
> >a,b,c..back
>
> >mapping[k_] := Module[{mm, params, tuples},
> >  mm = KroneckerProduct @@ Table[{{1, 1}, {1, 0}}, {i, 1, k}];
> >  params = (Subscript[t, #1] & ) /@ Range[1, 2^k];
> >  tuples = (Plus @@ (params*#1) & ) /@ mm /. a_Plus :> Times @@ a;
> >  terms = (#1/(#1 + 1) & ) /@ tuples;
> >  {MapIndexed[#1 == Subscript[m, #2[[1]]] & , terms], params}]
>
> >Inverting it for 2 variables works
> >Solve @@ mapping[2]
>
> >But for 3 variables it takes too long
> >Solve @@ mapping[3]
>
> >Makingequationspolynomial and solving them gives solution in terms
> >of "InverseFunction" for 3 variables and takes too long for 4
>
> The mapping[k]equationsare trivial to solve if one solves them for
> t_1, t_2, etc in order. For example:
>
> tsol =  MapThread[Solve[#1, #2] &, {Reverse[mapping[3][[1]]],
> mapping[3][[2]]}] //Flatten
>
> tsol solves for the t_i in terms of m_i and lower order t_i. Next, we
> replace the t_i in the right hand side with their known values:
>
> solution = Thread[Rule[tsol[[All, 1]], tsol[[All, 2]] //. tsol]];
>
> Finally, let's check that the solution works:
>
> In[41]:= mapping[3][[1]] /. solution // Simplify
>
> Out[41]= {True,True,True,True,True,True,True,True}
>
> I tried this procedure for mapping[7], and it took about 12 seconds.
>
> Carl Woll
> Wolfram Research




  • Prev by Date: Re: Trying to export two column table to text file
  • Next by Date: Re: 6.0 Get Graphics Coordinates...
  • Previous by thread: Re: Re: Trouble with a system of equations
  • Next by thread: Re: Re: Trouble with a system of equations