# Euler's method

#### Benny

Hello, I am having trouble understanding a question in relation to Euler's method.

Basically, the question goes something like Euler's method is solved to solve the differential equation $$\frac{{dy}}{{dx}} = \log _e \left( {4 - x^2 } \right)$$, with a step size of 0.05 and initial condition y = 0 when x = 0. Let A be magnitude of the area enclosed by the curve $$f\left( x \right) = \log _e \left( {4 - x^2 } \right)$$, the coordinate axes and the line x = 1. Why is $$y_{20}$$ an estimate of A?

Answer: $$y_{20} \approx \int\limits_0^{x_{20} } {\log _e \left( {4 - x^2 } \right)} dx = \int\limits_0^1 {\log _e \left( {4 - x^2 } \right)dx} = A$$

I do not understand the answer. As far as I understand, $$y_{20}$$ is just the value of the antiderivative at x = 1, given initial conditions but the answer does not make use of the initial conditions. I do not see how $$y_{20}$$ can be considered to be an approximation of A if the initial conditions are not used.

Related Differential Equations News on Phys.org

#### dextercioby

Homework Helper
Benny said:
Hello, I am having trouble understanding a question in relation to Euler's method.

Basically, the question goes something like Euler's method is solved to solve the differential equation $$\frac{{dy}}{{dx}} = \log _e \left( {4 - x^2 } \right)$$, with a step size of 0.05 and initial condition y = 0 when x = 0. Let A be magnitude of the area enclosed by the curve $$f\left( x \right) = \log _e \left( {4 - x^2 } \right)$$, the coordinate axes and the line x = 1. Why is $$y_{20}$$ an estimate of A?

Answer: $$y_{20} \approx \int\limits_0^{x_{20} } {\log _e \left( {4 - x^2 } \right)} dx = \int\limits_0^1 {\log _e \left( {4 - x^2 } \right)dx} = A$$

I do not understand the answer. As far as I understand, $$y_{20}$$ is just the value of the antiderivative at x = 1, given initial conditions but the answer does not make use of the initial conditions. I do not see how $$y_{20}$$ can be considered to be an approximation of A if the initial conditions are not used.
1.$$A=:\int_{0}^{1} \ln(4-x^{2}) dx$$
2.The initial condition imposed on the solution of the ODE is reflected in the limits of integration.Namely the inferior limit is chosen x=0 and the superior one corresponds to $x_{20}=20\cdot 0.05=1$,where i made use of the fact that the step size is 0.05.So the initial conditions are used and the fact that $y_{20}$ and not other 'y' gives u the approximatimation is due to the fact that the initial condition is y(x=0)=0 and the step is 0.05.Had the step been 0.01,you would have found x=1 for x_{100} and similar the corresponding 'y'.

Daniel.

#### Benny

I see what you mean. I was thinking about it along those lines but I probably thought about the comments included with the solution too much which obscured by understanding of the solution. Thanks for your help.

#### HallsofIvy

Homework Helper
In addition, Euler's method is a special case of the "Taylor's series" method.

Suppose the differential equation is dy/dx= f(x,y).

The general definition of Taylor's series for an infinitely differentiable function y, about x0 is y(x0)+ y'(x0)(x- x0+ (1/2)y"(x0)(x-x0)+ ...
If x- x0= h (so that x= x0+h) is small then the higher powers of (x-x0) will be "negligible" and we have y(x0+h)= y(x0)+ f(x0,y(x0))(x-x0) so that
&delta;y= y(x0+h)- y(x0)= f(x0,y(x0))h.

If you have a way of evaluating df(x,y)/dx (you will need to use the chain rule), you can get a better approximation by y(x0+h)= y(x0)+ f(x0,y(x0))h+ (1/2)(df(x0,y(x0))/dx)h2.

#### Benny

Thanks for posting the extra information.

#### heardie

Benny said:
Hello, I am having trouble understanding a question in relation to Euler's method.

Basically, the question goes something like Euler's method is solved to solve the differential equation $$\frac{{dy}}{{dx}} = \log _e \left( {4 - x^2 } \right)$$, with a step size of 0.05 and initial condition y = 0 when x = 0. Let A be magnitude of the area enclosed by the curve $$f\left( x \right) = \log _e \left( {4 - x^2 } \right)$$, the coordinate axes and the line x = 1. Why is $$y_{20}$$ an estimate of A?

Answer: $$y_{20} \approx \int\limits_0^{x_{20} } {\log _e \left( {4 - x^2 } \right)} dx = \int\limits_0^1 {\log _e \left( {4 - x^2 } \right)dx} = A$$

I do not understand the answer. As far as I understand, $$y_{20}$$ is just the value of the antiderivative at x = 1, given initial conditions but the answer does not make use of the initial conditions. I do not see how $$y_{20}$$ can be considered to be an approximation of A if the initial conditions are not used.
2002 VCE Specialist Maths exam Benny?