Math Help - numerical solution to differencial equation

1. numerical solution to differencial equation

dy/dx = y' = f(x,y(x)) = 2e^(-x^2)

Solve this differential equation using Heun's method and plot solution over -5 < x < 5. You'll need to derive the appropriate initial condition y(x0) = y0

dy/dx = y' = f(x,y(x)) = 2e^(-x^2)

Solve this differential equation using Heun's method and plot solution over -5 < x < 5. You'll need to derive the appropriate initial condition y(x0) = y0

Heun's method is the basic Predictor Corrector method. This uses the Euler
step to predict the value of y(x+h) using y(x) and y'(x). Then using the
prediction of y(x+h) calculate the derivative y'(x+h), then a new estimate
of the derivative over the interval is taken as the average of the two
derivatives found and y(x+h) is then found using an Euler step with this
new estimate of the derivative.

Here f(x,y(x)) is independent of y so that makes things a bit simpler, since
now we can calculate y'(x+h) without having to estimate y(x+h). So in
this case the Heun step is:

y(x+h) = y(x) + h [y'(x) + y'(x+h)]/2

RonL

dy/dx = y' = f(x,y(x)) = 2e^(-x^2)

Solve this differential equation using Heun's method and plot solution over -5 < x < 5. You'll need to derive the appropriate initial condition y(x0) = y0

Originally Posted by CaptainBlack
Heun's method is the basic Predictor Corrector method. This uses the Euler
step to predict the value of y(x+h) using y(x) and y'(x). Then using the
prediction of y(x+h) calculate the derivative y'(x+h), then a new estimate
of the derivative over the interval is taken as the average of the two
derivatives found and y(x+h) is then found using an Euler step with this
new estimate of the derivative.

Here f(x,y(x)) is independent of y so that makes things a bit simpler, since
now we can calculate y'(x+h) without having to estimate y(x+h). So in
this case the Heun step is:

y(x+h) = y(x) + h [y'(x) + y'(x+h)]/2

RonL
So now we can do the integration, lets assume the initial condition is y(-5)=0.

A table showing the calculation is shown in the attachment.

RonL