Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11560

Re: Problem solving system of ODE

$
0
0

Alexander Alvarez wrote:

 

Hello again Werner, I have a doubt , wonder if you can help me. I know H is the limit of integration, if i put x(60)=0.922, but lets imagine this case that H=10^15, the value of x(60)=7.608x10^-6. Why does this happens? It should remain constant but it doesnt.

In a perfect world with a perfect solution, that is an exact, symbolic solution - yes, you would get what you expect.

But you have to understand that Odesolve uses a numerical iteration algorithm, an approximation. In fact you can chose among a couple of algorithms if you right click the word odesolve.

The farther you get away from the starting point (0), the more inaccurate the results will be. Also the number of intervals chosen is of importance. Default is 1000 and I added this as the last argument of Odesolve. You set the end value of the interval to 10^15? Politely spoken thats not a good idea. You get a solution consisting of just 1001 points and inbetween Mathcad would simply interpolate. So the first point will be at 0, the next at 10^13, then 2*10^13, etc. You really can't expect a meaningful value at x(60)!

You can go up to H:=10^7 - if you set the number of intervals to 10^6 you still will get the result you expected for x(60). Going even more up with the number of intervals may be possible, but it sure will take a very long time to calculate and eventually you will run into memory problems.

So, no! You can't extend the integration interval to "infinity" and honestly - why would you do so??


Viewing all articles
Browse latest Browse all 11560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>