Google Группы больше не поддерживают новые публикации и подписки в сети Usenet. Опубликованный ранее контент останется доступен.

NDSolve is using Solve?

20 просмотров
Перейти к первому непрочитанному сообщению

J.Frazer

не прочитано,
9 мар. 2011 г., 07:02:0909.03.2011
Hello everyone,

This is my first time posting so my apologies if I'm going about this
the wrong way. I'm having the following problem:

I'm using NDSolve but its not managing to get to the solution even if I
leave it running over the weekend. If I greatly simplify one of the
equations I can get a result but in either case I get the error messages

Solve:: incnst
Solve:: ifun

This worries me as if its trying to simplify analytically, presumably as
the equations becomes more complicated this will become incredibly time
consuming.

Do people agree this may be the cause of the long running time? If so,
is there a way of stopping NDSolve from using Solve?

Cheers,

Jonny=

J.Frazer

не прочитано,
9 мар. 2011 г., 16:22:0609.03.2011
Ok so I have one idea. I read that restricting the function definition
to be something like f[x_?NumericQ,y_?NumericQ] can enable you to avoid
symbolic evaluation, speeding up the calculation by a factor of 10000 or
so! My issue now is that I have functions that are defined in terms of
derivatives of other previously defined functions, so I won't be able to
blindly go through changing the function definitions. I suppose this
means I will have to rewrite everything which will probably take me a
couple of days. Given that I'm not even sure if this will work, any
suggestions at this point would be very much welcome.

Cheers,

Jonny

Oliver Ruebenkoenig

не прочитано,
10 мар. 2011 г., 06:16:4510.03.2011


On Wed, 9 Mar 2011, J.Frazer wrote:

> Hello everyone,
>
> This is my first time posting so my apologies if I'm going about this
> the wrong way. I'm having the following problem:
>
> I'm using NDSolve but its not managing to get to the solution even if I
> leave it running over the weekend. If I greatly simplify one of the
> equations I can get a result but in either case I get the error messages
>
> Solve:: incnst
> Solve:: ifun
>
> This worries me as if its trying to simplify analytically, presumably as
> the equations becomes more complicated this will become incredibly time
> consuming.
>
> Do people agree this may be the cause of the long running time? If so,
> is there a way of stopping NDSolve from using Solve?
>
> Cheers,
>

> Jonny=
>
>
Hi Jonny,

yes NDSolve uses Solve internally but that is only for pre processing
purposes. If this is really the cause for the slow NDSolve (maybe it is a
hard problem...) It were best if you could send some working code, then
we could have a look at it and see if anything can be done.

Oliver

vadim.o...@gmail.com

не прочитано,
12 сент. 2013 г., 23:14:4012.09.2013
On Thursday, March 10, 2011 6:16:45 AM UTC-5, Oliver Ruebenkoenig wrote:
> On Wed, 9 Mar 2011, J.Frazer wrote:
>
> > Hello everyone,
> >
> > This is my first time posting so my apologies if I'm going about this
> > the wrong way. I'm having the following problem:
> >
> > I'm using NDSolve but its not managing to get to the solution even if I
> > leave it running over the weekend. If I greatly simplify one of the
> > equations I can get a result but in either case I get the error messages
> >
> > Solve:: incnst
> > Solve:: ifun
> >
> > This worries me as if its trying to simplify analytically, presumably as
> > the equations becomes more complicated this will become incredibly time
> > consuming.
> >
> > Do people agree this may be the cause of the long running time? If so,
> > is there a way of stopping NDSolve from using Solve?
> >
> > Cheers,
> >
> > Jonny
> >
> >
> Hi Jonny,
>
> yes NDSolve uses Solve internally but that is only for pre processing
> purposes. If this is really the cause for the slow NDSolve (maybe it is a
> hard problem...) It were best if you could send some working code, then
> we could have a look at it and see if anything can be done.
>
> Oliver

Hi,

I have encountered a similar problem, I think:

I have re-parametrized a relatively simple system of linear ODEs

u'=L.u

into something more complicated looking

M[v].v'=N[v],

but it really is the same problem with new coordinates, so the solution must exist (except near a few possible singularity points of the coordinate change)

feeding this or v'=Inverse[M[v]].N[v] into NDSolve has ONLY worked for small enough problems where the inverse can be done analytically. Otherwise, it spends forever in the prep stage for the calculation.

I have played around with defining a delayed Inverse etc but nothing worked, so I gave up and coded up a simple RK4 routine and forgot about it, but now I am returning to this problem and would like to get Mathematica to work, which I think it should be able to.

Thoughts?
Thanks,Vadim

0 новых сообщений