Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Solving simple equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83206] Re: Solving simple equations
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 15 Nov 2007 05:32:48 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fheh0u$mm7$1@smc.vnet.net>

Holger wrote:

> I'm trying to solve these two simple equations but it doesn't work.
> 
> meqn = {
> x'[t]==beta(x[t]+(Subscript[P,f]-p[t])),
> p'[t]==(Tanh[Subscript[a,1](x[t]+(Subscript[P,f]-p[t]))+
>         Subscript[a,2]x[t]]-x[t])
>    };
> 
> eqp = NSolve[
> meqn/.{
> p'[t]->0,x'[t]->0},{p[t], x[t]
> }
> ]
> 
> I guess I'm doing a mistake somewhere. Does anyone have idea where the mistake is?

So you want to solve *numerically* the system meqn (note that I have 
modified the subscripted stuff).

In[1]:= meqn = {x'[t] == beta (x[t] + (Pf - p[t])),
    p'[t] == (Tanh[a1 (x[t] + (Pf - p[t])) + a2 x[t]] - x[t])};
meqn /. {p'[t] -> 0, x'[t] -> 0}

Out[2]= {0 == beta (Pf - p[t] + x[t]),
  0 == Tanh[a2 x[t] + a1 (Pf - p[t] + x[t])] - x[t]}

To do so, you must provide some numeric values for *all* the parameters, 
that is beta, Pf, a1, and a2, (though in the above example the value of 
beta does not matter and beta can be discarded before solving).

Of course some (many?) other things might be wrong, but since you did 
tell us neither what you mean by "not working" nor reported any error 
messages returned by by Mathematica, it is hard to tell more (perhaps 
DSolve or NDSolve might be more appropriate).

Regards,
-- 
Jean-Marc


  • Prev by Date: Re: DelaunayTriangulation[] output
  • Next by Date: Re: Dividers formatting in Grid
  • Previous by thread: Re: Solving simple equations
  • Next by thread: Re: Solving simple equations