Consider the differential equation
\[
\frac{\mathrm{d}y}{\mathrm{d}x} = x - y^2 + 2,
\]
where \(y(0) = 0\). Use Euler's Method with step length \(h = 0.2\) to find \(y(1)\).
Open "List and Spreadsheet" option.

In column \(A\), key in the initial value of \(x\) and the next value after \(1\) step
In column \(B\), key in the initial value of \(y\).
Here in this example,
so the next value of \(x\) is \(x_1 = 0 + 0.2 = 0.2\).

In Cell A1, hold down the Shift key, and select Cell A2 by pressing the Down key.

Move the cursor to the bottom right corner of the blue box generated (selection of both cells).
Press Ctrl + Menu and select "Fill".

Drag the cursor downward until the appropriate number of cells are filled.

Press Enter.

In Column C, compute the initial values of \(\frac{dy}{dx}\) (\(m_0\)) by referencing the formula for \(\frac{dy}{dx}\) and making use of cells A1 and B1 to compute with the appropriate formula.
Here the formula for
\[
\frac{dy}{dx} = x-y^2+2
\]
is given. So, \(m_0 = x_0-y_0^2-+2\).

Press Enter.

By using a similar method to generate the sequence of \(x\) values, generate the sequence of \(\frac{dy}{dx}\) values.

In cell B2, compute the value of \(y_1\) by making use of the cells B1 and C1 and using the formula
\[
y_1 = y_0 + m_0 h,
\]
noting that one must use the same sequence, otherwise there will be an error encountered.
Here, the value of \(h\) is \(0.2\).

Press Enter.

Simply, generate the sequence of \(y\) values.

The answer for \(y(1)\) is \(1.57\).
Create a free account to practise similar questions.
Need help? Join our JC Math tuition classes.
Learn more