Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is the different between same calculations

1 view
Skip to first unread message

Fırat

unread,
Dec 22, 2009, 5:43:10 AM12/22/09
to
Hi,

I coded an iterative calculation in Maple 10. The digits of
calculations set to 15 in all calculations. After this iterations,
maple generates some values of $x$. When I restart iterative
calculations again after than restart command, the generated values $x
$ are different from the previous one in 6th or 7th digits. Is it
normal?

Thanks in advance

Firat

Fırat

unread,
Dec 22, 2009, 7:17:06 AM12/22/09
to
I have a one question again. I want to use RK4 method in the following
form

> restart:
> with(plots):
Warning, the name changecoords has been redefined

> mu:=500;

> dsys1 := {diff(x1(t),t)=-x2(t)*x3(t)*x4(t)*x5(t)-2*mu*x1(t)*(x1(t)^2+x2(t)^2+x3(t)^2+x4(t)^2+x5(t)^2-10)-3*mu*x1(t)^2*(x1(t)^3+x2(t)^3+1),
> diff(x2(t),t)=-x1(t)*x3(t)*x4(t)*x5(t)-2*mu*x2(t)*(x1(t)^2+x2(t)^2+x3(t)^2+x4(t)^2+x5(t)^2-10)-3*mu*x2(t)^2*(x1(t)^3+x2(t)^3+1)-mu*x3(t)*(x2(t)*x3(t)-5*x4(t)*x5(t)), diff(x3(t),t)=-x1(t)*x2(t)*x4(t)*x5(t)-2*mu*x3(t)*(x1(t)^2+x2(t)^2+x3(t)^2+x4(t)^2+x5(t)^2-10)-mu*x2(t)*(x2(t)*x3(t)-5*x4(t)*x5(t)), diff(x4(t),t)=-x1(t)*x2(t)*x3(t)*x5(t)-2*mu*x4(t)*(x1(t)^2+x2(t)^2+x3(t)^2+x4(t)^2+x5(t)^2-10)+5*mu*x5(t)*(x2(t)*x3(t)-5*x4(t)*x5(t)), diff(x5(t),t)=-x1(t)*x2(t)*x3(t)*x4(t)-2*mu*x5(t)*(x1(t)^2+x2(t)^2+x3(t)^2+x4(t)^2+x5(t)^2-10)+5*mu*x4(t)*(x2(t)*x3(t)-5*x4(t)*x5(t)), x1(0)=-2, x2(0)=1.5, x3(0)=2, x4(0)=-1, x5(0)=-1};


> dsol2 := dsolve(dsys1, numeric, method=classical[rk4], stepsize= 1e-5, output=array([0.2]));
Warning, Solution data is incomplete. The following error(s) occurred:

too many function evaluations in classical 50004

dsol2 :=

[[t, x1(t), x2(t), x3(t), x4(t), x5(t)]]

[[0.2 , ?[1, 2] , ?[1, 3] , ?[1, 4] , ?[1, 5] , ?[1, 6]]]


How can I evaluate the solutions for 0.2 , 0.4, 0.6, ...., 2?

Firat

Archimedes

unread,
Dec 22, 2009, 8:07:36 PM12/22/09
to

This works for your system. Is this what you are looking for? As for
your previous question, post the code in question. Without it, it
will be difficult to come up with a reasonable answer.

dsol2:=dsolve(dsys1, numeric);

seq(dsol2(.2*i), i=1..10 );

Regards,
Georgios


Ray Vickson

unread,
Dec 24, 2009, 3:54:19 PM12/24/09
to

So, what is the offending code? Without seeing the details, how can
anybody answer you?

R.G. Vickson

Robert Israel

unread,
Dec 25, 2009, 3:57:47 PM12/25/09
to
=?UTF-8?B?RsSxcmF0?= <agim...@gmail.com> writes:

Presumably roundoff error, though it might help to see the actual code.
There are many possible sources of indeterminacy in Maple, causing operations
to be done slightly differently. While the resulting expressions might be
equivalent in ordinary algebra, in floating-point computations they may not be.
For example, (a+b)+c may not be the same as a+(b+c) or (a+c)+b.
--
Robert Israel isr...@math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada

Fırat

unread,
Dec 28, 2009, 4:59:53 PM12/28/09
to
On 25 Aralık, 22:57, Robert Israel
<isr...@math.MyUniversitysInitials.ca> wrote:


Thanks for your kindly help

0 new messages