MathGroup Archive 1996

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

Search the Archive

Re: differential equations

N Kinoshita <nk204 at> writes:

>Hi, I am a research student of economics. I want to solve
>a system of differential equations with Mathematica.

>I wrote the follwoing command based on the example given
>in p.698 of 'Mathematica: A system for doing mathematics
>by computer'

> If[k==ks,cprimess,
>    (-0.012+0.952757k/w[k]^.7+0.11938/w[k]^.6
>    +2.6603c[k]/w[k]^.1-0.635171w[k])
>    /(0.875c[k]+0.952757k^2/w[k]^.7+1.04457k/w[k]^.6
>    +2.6603c[k]k/w[k]^.1-0.635171k*w[k]^.3-0.447674w[k]^.4)
>    ],
> w'[k]==
> If[k==ks,wprimess,
>    (1.1938w[k]^.4+6.65074c[k]w[k]^.9-1.58793w[k]^1.3)
>    /(0.875c[k]+0.952757k^2/w[k]^.7+1.04457k/w[k]^.6
>    +2.6603c[k]k/w[k]^.1-0.635171k*w[k]^.3-0.447674w[k]^.4)
>    ],
> c[ks]==cs, w[ks]==ws},

>Then I got the error message saying:
>   NDSolve::deql:
>     True is not a valid equation or list of valid equations.

>I was able to solve a single differential equation before,
>but do not know how to cope with my problem now.

>I would like to get some comments.

Your error message indicates that one of the entries was "True" instead of
an equation. I think that you by accident had defined for instance c[ks] = cs
and if you type c[ks]==cs in the set of equations, you will get "True".

However, this is not the root of your problem. I tried your equations as
you have given them and got

NDSolve::ndcf: Repeated convergence test failure at k == 0.380884; unable to

Out[5]= {{c -> InterpolatingFunction[{{0.380884, 0.380884}}, <>], 
>     w -> InterpolatingFunction[{{0.380884, 0.380884}}, <>]}}

This seems to indicate some type of problem in the beginning of your integration
interval that the multistep method is not able to handle. Maybe this is
worth looking into first.

saarinen at


  • Prev by Date: Piecewise Functions
  • Next by Date: suppressing initialization
  • Previous by thread: differential equations
  • Next by thread: Re: Pairings