How does Euler's method work when step size and wanted values are different?

47 Views Asked by At

I have a question that goes as such:

Use Euler’s method with $dt= 0.1$, to estimate $p$ for these values of $t$, using initial condition $(0,5)$.

$t= 2,4,6,8,10,12,14,16$

$\frac{Dp}{dt}= 0.05(p-4)(12-p)$

I am unsure how to solve because $dt=0.01$ but my $t$ values are not following that step size. Am I missing something or misinterpreting $dt=0.1$?

2

There are 2 best solutions below

0
On

You apply Euler's method as many times as it takes - since $dt = 0.1$ that means that you'll find approximations for $y$ at $t = 0.1, 0.2, 0.3, \ldots$, and take the results from $t = 2, 4, \ldots$ as required.

0
On

I talked to my teacher

Apparently they were using excel spreadsheets in the class I missed.

Basically in excel you label three columns as x, y, and change in y.

I’m column x you enter your first value in box 1, in box two you put a1 (the box you put your first value in) and then add whatever your step size is. =a1 +.1 in my case, if you click enter and then drag your mouse over their should be a small dot in the bottom corner, drag that down as many boxes as you need.

In column y put your initial value in box b1

In column change in y put = (step size)(differential equation with a1 and b1 which correspond to x and y.) Again click enter and drag down it will show error messages until you enter the y column.

In the box b2 type =b1+c1 and then drag down.

Then just look for the x value you want and find the corresponding y value.