The idea of Euler method is to use an approximation y_{n }stands for the real y(x_{n}) and then use the inverse multiply a step to calculate the y_{n+1}. When we use a small step ‘h’, we will gain a curve similar to the real line. For more accurate, we improve the Euler method and it let us calculate with less works.

We first use the Euler method to get a y_{n+1 }in the Improved Euler method. Then we use another method to amend the y_{n+1} to let it more similar to the real y_{n+1}.

We express this new Improved Euler method by these two formulas:

y_{n+1} = y_{n} + hf (x_{n} , y_{n} )

y_{n+1} = y_{n} + h*[f (x_{n} , y_{n} )+f (x_{n+1} , y_{n+1} )]/2

When use computer for calculation in some engineering field, you should show the relationship between ‘y’ and ‘x’. You need also give a ‘h’.

## A example to use Improved Euler method for solving heat transfer problem:(Use Matlab)

**Question**: As the figure shows. T_{∞}=1500℃，T_{w}=500 ℃, T_{0}=20℃, a thermocouple which diameter is 1mm exposed in the air. The surface coefficient of heat transfer h=200W(m^{2}/K)，ε=0.2. Thermocouple oxidation will create energy at a rate of q=1000W/m^{3}. Determine the relation ship between temperature of thermocouple and time. [additional properties of thermocouple:ρ=8000kg/m^{3}，c=0.38kJ/(kg*K)，λ=50W/(m*K)]

**Answer**: We use Improved Euler Question to solve this problem. www.zhangpeng.info

The source code in Matlab here:

`function [x,y]=eulerg(x,y,h,N)`

x=zeros(1,N+1);

y=zeros(1,N+1);

x(1)=0;

y(1)=293;

for n=1:N

x(n+1)=x(n)+h;

ybar=y(n)+h*dyfun(x(n),y(n));

y(n+1)=y(n)+(h/2)*(dyfun(x(n),y(n))+dyfun(x(n),ybar));

end

plot(x,y,'red');

function m=dyfun(x,y)

m=1/304+75/19*(1773-y)+(6.804e-8)/304*(1773^4-y^4);

To create a new file in Matlab writing these codes and save it. Input some properties, for example eulerg(0,293,0.001,1000), and you will gain the relationship line between ‘y’ and ‘x’.

You can transfer this example in any other similar work process by just change some part of this example function. I’m glad to discuss with you if you have any questions.