MathGroup Archive 2008

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

Search the Archive

Re: Solve vs Reduce

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94657] Re: [mg94627] Solve vs Reduce
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Fri, 19 Dec 2008 07:23:33 -0500 (EST)
  • References: <200812181220.HAA00318@smc.vnet.net>

On 18 Dec 2008, at 21:20, Jaccard Florian wrote:

> Hello!
>
> I have the following system :
>
> In[1]:= equations = {5/(x + y) == 2/y, Dt[5/(x + y) == 2/y, =
> t], Dt[x, t]
> == 1, x == 5}
>
> As you can see, Solve manages very well to find Dt[y,t] :
>
> In[2]:= Solve[equations, Dt[y, t]]
>
> Out[2]= {{Dt[y, t] -> 2/3}}
>
> Why isn't Reduce able to find the solution?
>
> In[3]:= Reduce[equations, Dt[y, t]]
>
> Out[3]= False
>
> Regards, and thanks to all who will answer!
>
> Florian Jaccard
>
>


The reason is (I am speculating here a bit) that Reduce attempts to  
solve all kind of equations, not essentially algebraic ones, so it  
does treat the derivatives in your equations as such rather than as  
mere names of variables occurring in the equations. Taking this into  
account your two equations

In[42]:= Reduce[{Dt[x, t] == 1, x == 5}]
Out[42]= False

appear to be inconsistent, since the derivative of a constant can't be  
one.

If you remove the equation Dt[x, t] == 1,the system will be solved:

  Reduce[{5/(x + y) == 2/y,
      -((5*(Dt[x, t] + Dt[y, t]))/(x + y)^2) ==
        -((2*Dt[y, t])/y^2), x == 5}, {y, x, Dt[y, t]}]
  y == 10/3 && x == 5 && Dt[y, t] == 0

Note that this is a consistent solution (y is a constant and hence  
Dt[y,t]==0). If you include both Dt[x,t] and Dt[y,t] in the list of  
variables you will get a different looking solution:

  Reduce[{5/(x + y) == 2/y, -((5*(Dt[x, t] + Dt[y, t]))/(x + y)^2) ==
        -((2*Dt[y, t])/y^2), x == 5}, {y, x, Dt[y, t], Dt[x, t]}]
  y == 10/3 && x == 5 && Dt[x, t] == (3*Dt[y, t])/2

Note that this is also consistent (even though both Dt[x, t] and Dt[y,  
t] must actually be zero).

Also, note that if you removed from the system the equation x==5  
instead of Dt[x,t]==1 you will not get a solution:

  Reduce[{5/(x + y) == 2/y, -((5*(Dt[x, t] + Dt[y, t]))/(x + y)^2) ==
     -((2*Dt[y, t])/y^2), Dt[x, t] == 1}, Dt[y, t]]
During evaluation of In[39]:= Reduce::nsmet:This system cannot be  
solved with the methods available to Reduce. >>
  Reduce[{5/(x + y) == 2/y,
    -((5*(Dt[x, t] + Dt[y, t]))/(x + y)^2) ==
     -((2*Dt[y, t])/y^2), Dt[x, t] == 1}, Dt[y, t]]

This is not surprising since in order to compute Dt[y,t], you would  
need to solve a differential equation, which it does not do. However,  
if you include both Dt[y,t] and Dt[x,t] among the variables to be  
solved for the system will be solved, since Reduce will now express  
one of the derivatives in terms of the other and y in terms of x (so  
it does not have to express them in terms of t)

Reduce[{5/(x + y) == 2/y,
      -((5*(Dt[x, t] + Dt[y, t]))/(x + y)^2) ==
        -((2*Dt[y, t])/y^2), Dt[x, t] == 1},
    {Dt[y, t], Dt[x, t], x, y}]
  Dt[y, t] == 2/3 && Dt[x, t] == 1 && y == (2*x)/3 &&
    x != 0

Finally, instead of the differential equation Dt[x, t] == 1 you use  
one of its solutions, for example, x==t, you will get:

Reduce[{5/(x + y) == 2/y, -((5*(Dt[x, t] + Dt[y, t]))/(x + y)^2) ==
        -((2*Dt[y, t])/y^2), x == t}, {Dt[y, t], x, y}, Reals]

(t < 0 || t > 0) && Dt[y, t] == 2/3 && x == t &&
    y == (2*x)/3

or

Reduce[{5/(x + y) == 2/y, -((5*(Dt[x, t] + Dt[y, t]))/(x + y)^2) ==
        -((2*Dt[y, t])/y^2), x == t}, {Dt[y, t], Dt[x, t], x, y}, Reals]

(t < 0 || t > 0) && Dt[x, t] == (3*Dt[y, t])/2 &&
    x == t && y == (2*x)/3

All of these look to me like valid and useful answers, demonstrating  
that Reduce can be used even in contexts in which I would not have  
tried to use it before I saw your post ;-)

Andrzej Kozlowski





  • References:
  • Prev by Date: Re: Solve vs Reduce
  • Next by Date: Re: NIntegrate Problem
  • Previous by thread: Re: Solve vs Reduce
  • Next by thread: Re: Solve vs Reduce