cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

odesolve is not converging to a solution

Cornel
19-Tanzanite

odesolve is not converging to a solution

Hi,
Why is so?

Cornel_1-1715942642948.png

 

Cornel_2-1715942650155.png

 

3 REPLIES 3
Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

Hi,
Why is so?


I can think of three possible causes, although it could also be a combination of several of these (or something else entirely):

 

1) The numerical algorithm used by Prime might not be absolutely perfect (shocking, right?)


2) The obviously artificially constructed equation you provide may be the reason (or is there actually a concrete application where this equation occurs?)  Some small changes in the equation here and there make the  solve block work OK:

Werner_E_0-1715944465707.pngWerner_E_1-1715944557346.pngWerner_E_2-1715944641399.pngWerner_E_3-1715944819802.png


3) The initial condition you have chosen may be inappropriate for some reason. Small changes make your solve block work OK

Werner_E_4-1715945445391.png Werner_E_5-1715945540233.png

You may try y(0)=1/e (will fail) and values very slightly smaller or larger.

 

Make your choice... 🙂

 

Have you already tried to solve the ODE yourself - either symbolically (guess not possible) or numerically using some kind of Runge-Kutta (tedious)?

Have you tried to solve your ODE using some other software?
Did you already report the problem to PTC support?

Do you really need to solve that ODE?

 

BTW, just for your information in case you intend to report it: In Prime 10 the error message is "Unknown error: vanishing step size".

If I start P10 in German mode, I get  "Unbekannter Fehler: Ein Aufrufziel hat einen Ausnahmefehler verursacht" which is something like "Unknown error: A call target caused an exception". Not very helpful.

 

LucMeekes
23-Emerald III
(To:Werner_E)

Symbolic:

LucMeekes_0-1715965615838.png

numeric, odesolve:

LucMeekes_1-1715965654606.png

But:

LucMeekes_2-1715966607498.png

 

Success!
Luc

 

For the initial value y(0) = 1, this differential equation only has a solution in the interval [0,1). In x = 1 there is an asymptote (illustrated in the attached file MC14).

Announcements

Top Tags