# Use the Euler method?

Success

## Homework Statement

Use the Euler method with h=0.05 to find approximate values of y'=3+t-y, y(0)=1 at t=0.1, 0.2, 0.3, and 0.4.

## Homework Equations

I don't even know what formula and how to use it.

## The Attempt at a Solution

The answers are 1.1975, 1.38549, 1.56491, 1.73658.

## Answers and Replies

Arkuski
Euler's method is a recursive method. In general, it is best to understand what you're actually doing than to memorize the equations. In Euler's method, you essentially get an estimate of y' and use that to estimate y at future values.

At t=0, y=1 (given), and thus, y'(0)=3+0-1=2. In the next h seconds, you would expect y to increase by y' * h. Thus, we say y(x+h)=h*y'(x)+y(x). We get that y(0.05)=0.05*y'(0)+y(0)=1.1. our new value of y'(0.05)=3+0.05-y(0.05)=1.95. Keep iterating this method to get future values of y and y'.

Homework Helper
Dearly Missed

## Homework Statement

Use the Euler method with h=0.05 to find approximate values of y'=3+t-y, y(0)=1 at t=0.1, 0.2, 0.3, and 0.4.

## Homework Equations

I don't even know what formula and how to use it.

## The Attempt at a Solution

The answers are 1.1975, 1.38549, 1.56491, 1.73658.

Are you saying that your textbook and/or course notes have nothing at all on Euler's method?

Mentor
You are solving a differential equation of the form:
$$\frac{dy}{dt}=f(y,t)$$
To solve this equation numerically, you are approximating the derivative on the left hand side by:
$$\frac{dy}{dt}≈\frac{y(t+Δt)-y(t)}{Δt}$$
But, what values of y and t do you use to substitute into the function f, the values at time t, y(t) and t, or the values at time t+Δt, y(t+Δt), t+Δt? In Euler's method you use the former, so your algebraic approximation to the differential equation becomes:
$$\frac{y(t+Δt)-y(t)}{Δt}=f(y(t),t)$$
or, equivalently,
$$y_{n+1}-y_n=Δtf(y_n,nΔt)$$
where n signifies the n'th time step of your calculation. In the terminology that your problem statement uses, h = Δt