Euler Method - Using the Method with Mathematica - Part 2

Numerical Methods for Solving Differential Equations

Euler's Method

Using the Method with Mathematica

(continued from last page...)

Back in the Introduction to this laboratory we went through a preliminary example "by hand". We commented that the work involved was tedious, and would be better suited to a computer.

We will now use our newly defined euler program to recalculate the numerical solution to the preliminary example. As a reminder, the problem was:

y′ = x + 2y

y(0) = 0

and we solved it by using 4 steps, up to an x-value of x = 1.

To make euler solve this problem, the appropriate command would be:

prelimsol1=euler[x+2y,{x,0,1},{y,0},4]

Go back to Mathematica and issue this command.

Let's go look at what you should have gotten...

 


Compass If you're lost, impatient, want an overview of this laboratory assignment, or maybe even all three, you can click on the compass button on the left to go to the table of contents for this laboratory assignment.