MathGroup Archive 2010

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

Search the Archive

Re: solving equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108555] Re: solving equations
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Tue, 23 Mar 2010 04:23:04 -0500 (EST)

On 3/22/10 at 2:41 AM, arbiadr at gmail.com (Maria Davis) wrote:

>The equations presented in the file are the result of another software,
>I know that they contain much redunduncy, but I must resolve them. For
>example, the given equations are:

>a=Min(c, d)
>c=infinity

It is hard for me to determine whether you realize the above are
not equations in Mathematica or not. As equations, the above
would be:

a == Min[c,d]
c == Infinity

>I want mathematica to solve the system above and returns a=d I don't
>understand why "Min" can not be reduced, so, please, is there any
>solution?

Not without more information. The problem is d can be anything
including Infinity. Until d has a value that can be compared in
a useful manner with Infinity, Mathematica will correctly return
Min[d,Infinity] unevaluated as Min[d, Infinity] which is
obviously not what you want.

I can get Mathematica to do as you want doing the following:

In[1]:= eq1 = a == Min[c, d];
c = Infinity;

In[3]:= eq1 /. Min[a_, Infinity] :> a

Out[3]= a == d

Here, I've used Set (=) to set the value of c to Infinity. That
way, Mathematica's evaluator will replace all occurrences of c
with Infinity. Then I've used a replacement rule to transform
Min[d,Infinity] to d.

Note, when doing this last, I am no longer necessarily doing
valid mathematics. For example,

In[4]:= a + 1 /. b_ + _ :> b + 2

Out[4]= a+2

Demonstrating Mathematica will happily replace 1 with 2 using
replacement rules even though

In[5]:= 1 == 2

Out[5]= False



  • Prev by Date: Re: popup/action menu and sub menu
  • Next by Date: Re: solving equations
  • Previous by thread: Re: solving equations
  • Next by thread: Re: solving equations