       Re: Equation solving question

• To: mathgroup at smc.vnet.net
• Subject: [mg111717] Re: Equation solving question
• From: Yaroslav Bulatov <yaroslavvb at gmail.com>
• Date: Wed, 11 Aug 2010 04:47:21 -0400 (EDT)

```First, thanks for the tip
Second, you are right, lambda is always 0 at the solution, so we use
this fact to simplify our set of equations, getting 4 equations
instead of 5, but it still seems to take forever
Third: it seems difficult in general, I was just wondering if there
are tricks to make it feasible for this particular form. For instance,
I earlier had a similar problem with system of equations and the trick
was to solve for one variable at a time, then back-substitute in the

On Tue, Aug 10, 2010 at 8:47 AM, Andrzej Kozlowski <akoz at mimuw.edu.pl> wrot=
e:
> First: Assuming does nothing at all with Solve. You would need to use Ful=
lSimplify or Simplify for assuming to be of any use.
>
> Second: how can you expect to obtain your solution if:
>
> In:== Simplify[(D[lagr, #1] ==== 0 & ) /@ vars /. {q1 -> p1,
>   q2 -> p2, q3 -> p3,
>       q4 -> p4}]
>
> Out== {\[Lambda] ==== 0, \[Lambda] ==== 0, \[Lambda] ==== 0, \[Lambda=
] ====
>  0,
>   p1 + p2 + p3 + p4 ==== 1}
>
> Note that for your solution to be valid lambda would have to be zero.
>
> Third, even if this involves a simple mistake or a misunderstanding, you =
have a non-linear system of equations and unknowns with at least 8 variable=
s, and since all relevant algorithms have very high complexity with respect=
to the number of variables is it ery unlikely that Mathematica can solve t=
his system in a reasonable time.
>
> Andrzej Kozlowski
>
>
> Andrzej Kozlowski
>
> On 10 Aug 2010, at 09:55, Yaroslav Bulatov wrote:
>
>> I'd like to solve the system of equations below and Mathematica gets
>> stuck, are the tricks I can do to help it solve this kind of system?
>> It should produce solution q1==p1, q2==p2, q3==p3, q4==p4
>>
>> lagr == p1 (Log[q1/(q1 + q3)] + Log[q1/(q1 + q2)]) +
>>   p2 (Log[q2/(q1 + q2)] + Log[q2/(q2 + q4)]) +
>>   p3 (Log[q3/(q1 + q3)] + Log[q3/(q3 + q4)]) +
>>   p4 (Log[q4/(q2 + q4)] + Log[q4/(q3 + q4)]) - \[Lambda] (q1 + q2 +
>>      q3 + q4 - 1);
>> vars == {q1, q2, q3, q4, \[Lambda]};
>>
>> Assuming[{p1 > 0 && p2 > 0 && p3 > 0 && p4 > 0 &&
>>   p1 + p2 + p3 + p4 ==== 1 && q1 > 0 && q2 > 0 && q3 > 0 && q4 > 0},
>> Solve[D[lagr, #] ==== 0 & /@ vars, vars]]
>>
>> Motivation: I'm trying to show consistency of some pseudo-likelihood
>> estimators, this example is the simplest case where PL applies
>>
>
>

```

• Prev by Date: Re: A new graphic user interface
• Next by Date: Re: Suggestions
• Previous by thread: Re: Equation solving question
• Next by thread: FindMinimum inside another FindMinimum