In the section, "A Guided Tour"->"Basic Algebra and Calculus"-
>"Euler’s Method for Systems of Differential Equations", I found that
the answer of the example is z(1)≈0.75, which seems to be wrong.
The calculation is
------------------------------------------------------------------------
sage: t,x,y = PolynomialRing(RealField(10),3,"txy").gens()
sage: f = y; g = -x - y * t
sage: eulers_method_2x2(f,g, 0, 1, 0, 1/4, 1)
t x h*f(t,x,y) y
h*g(t,x,y)
0 1 0.00
0 -0.25
1/4 1.0 -0.062
-0.25 -0.23
1/2 0.94 -0.12
-0.48 -0.17
3/4 0.82 -0.16
-0.66 -0.081
1 0.65 -0.18
-0.74 0.02
------------------------------------------------------------------------
So I think the right answer should be z(1)≈0.65
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org