Euler-maple_help

Euler-maple_help - 1 O O O O O O O O O O O O O O O O...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 O O O O O O O O O O O O O O O O Euler's Method - The Maple Way restart:with(plots):with(DEtools): We begin again by entering the initial value problem. deq:=diff(y(x),x) = 5/sqrt(x+25); IC:=y(0)=0; deq := d d x y x = 5 x C 25 IC := y = 0 We solve the equation, change the right-hand side to a function using unapply , and create the plot structure for our domain. Here we choose not to initialize the array structures. Y:=dsolve({deq,IC},y(x)); Y:=unapply(rhs(Y),x); p[1]:=plot(Y(x),x=0..700): Y := y x = 10 x C 25 K 50 Y := x / 10 x C 25 K 50 We use dsolve to implement Euler's method by setting the type to numeric, the method to classical [foreuler] (classical would be sufficient since foreuler, standing for forward Euler method, is the default), and providing a starting point for the independent variable and a stepsize. Y100:=dsolve({deq, IC}, y(x), type=numeric, method=classical[foreuler], start=0.0,stepsize=100); Y100 := proc x_classical ... end proc The output in this case is a procedure from which the data we want can be extracted. Suppose we simply wanted to find the data for when x = 200 . Y100(200); x = 200., y x = 144.721359549995782 We can do the following to create an ordered pair representing a single data point....
View Full Document

This note was uploaded on 11/10/2010 for the course DEFFERENTI 2080 taught by Professor Kidnan during the Spring '10 term at UOIT.

Page1 / 7

Euler-maple_help - 1 O O O O O O O O O O O O O O O O...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online