4

This is the original question.

Use Euler's method with h=0.2 to estimate y when x =1 if
$y' = (y^2-1) /2 $ and y(0) = 0

A. 7.690
B. 12.730
C. 13.504
D. 90.676

My answer follows.
n= 5, h= 0.2 a= x_0= 0, b=1, y0= 0
I'm using the formula
$y_{(n+1)} = y_n + h * y'$
and generated the following table.
Note this table shows the answer as $-0.47141$ because $y_{n+1}$ is on the previous line of the table below. However, this doesn't match any of the given answer choices. This is an employment test covering Advanced Placement Calculus BC, so this is all the context I have.

Where is the mistake?
Are there other variations called "Euler's method" which generate different answers?

x h y y^2 y' next y
0 0.2 0.00000 0.00000 -0.50000 -0.10000
0.2 0.2 -0.10000 0.01000 -0.49500 -0.19900
0.4 0.2 -0.19900 0.03960 -0.48020 -0.29504
0.6 0.2 -0.29504 0.08705 -0.45648 -0.38634
0.8 0.2 -0.38634 0.14925 -0.42537 * -0.47141 *
1 0.2 -0.47141 0.22223 -0.38889 -0.54919
nickalh
  • 1,391
  • There are at least three methods: forward Euler, backward Euler, and symplectic Euler. Given no context I would assume forward Euler though. – user7530 Aug 02 '21 at 21:46
  • $y'$ should start from -0.5 at $y=0$ – user619894 Aug 02 '21 at 22:04
  • hmmmm, some errors copying and pasting the table. Hold on, I'll fix them. The table was missing 0 in the top left which shifted the whole row left. – nickalh Aug 02 '21 at 22:06
  • I observe that if $-1 < y < 1$, then $y' < 0$, so $y$ is decreasing... So large positive results are ... unlikely. – Eric Towers Aug 02 '21 at 22:10
  • @user7530 and to clarify- y_{n+1} = y_n + h y_n is considered "Forward Euler's Method" ? – nickalh Aug 02 '21 at 22:34
  • @boojun Expand that into an answer, and I'll give you the credit for solution. – nickalh Aug 02 '21 at 22:50
  • @boojun May I edit your answer? Include some of the comments? – nickalh Aug 03 '21 at 00:44
  • @boojun I was pretty sure the problem given to me was incorrect before I posted it. But receiving confirmation was very encouraging and helpful. I'll retake the employment test tomorrow, then depending ask the employer about their incorrect question. – nickalh Aug 04 '21 at 04:41

2 Answers2

3

There is something wrong with the problem as posed. The equilibria for $ \ y' = (y^2 - 1)/2 \ $ are $ \ y = \pm 1 \ \ , $ with $ \ y = -1 \ $ being the stable equilibrium (as the "flow" of your values for $ \ y \ $ suggests) and $ \ y = +1 \ $ is unstable. So it is only possible to reach large positive values of $ \ y \ $ for $ \ y(0) > 1 \ \ . $ My suspicion is that either the wrong initial value was given or the differential equation is not what was intended (the choices go with some other problem, or there is a significant typo, or the like).

  • @boojun May I expand and elaborate on your answer, primarily incorporating some of the comments above. – nickalh Aug 03 '21 at 19:12
  • @nickalh You are allowed to post an answer to your own question on this site. Might I propose you do that instead? You could then receive credit/votes for your work on that. Incidentally, had you found out how the problem was supposed to read? –  Aug 03 '21 at 23:54
  • No, I have not found how the problem was supposed to read. I'm satisfied the original problem has a mistake. Playing with the initial values I was able to generate solutions near the multiple choices. – nickalh Aug 04 '21 at 04:21
  • I would prefer to integrate what I consider all the essential information into one answer. Receiving credit for it myself is not particularly important. – nickalh Aug 04 '21 at 04:29
0

You should get, for one row,

$$y(0.4) \approx y(0.2) + 0.2 \frac{y(0.2)^2-1}{2} \approx -0.1 + 0.2 \frac{(-0.1)^2 - 1}{2} \approx -0.199.$$

That said, the exact answer is $y(1) = \frac{1-e}{1+e} \approx -0.462$ so all of the large, positive multiple-choice answers are highly suspect, to say the least.

nickalh
  • 1,391
user7530
  • 50,625