Euler Method with h=0.05 for y'=3+t-y, y(0)=1 at t=0.1, 0.2, 0.3, and 0.4

Success
Messages
75
Reaction score
0

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.
 
Physics news on Phys.org
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'.
 
Success said:

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?
 
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
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top