Using Euler's integration to solve a problem that is not written as a derivative

68 Views Asked by At

I am brand new to solving differential equations. I am taking a modeling course that is asking me to use Euler's method to solve for the following:

$y = \displaystyle \int_{0}^{2} (x^3) dx$

However, everything I can find is telling me that in order to solve an equation using Euler's method, you must have a derivative in this format:

$\frac{dx}{dy} = f(x,y)$

As an example:

If you had a derivative $\frac{dx}{dy} = x + 2y$, with $ y(0) = 0$ as a starting point, a step size $h = 0.1$, you could solve using the formula for Euler's method:

$x_n = x_{n-1} + h$ and $y_n = y_{n-1} + h*f(x_{n-1}, y_{n-1}) $

Using this formula to approximate to a step of $y(0.4) $, you get the following:

$x_0 = 0, y_0 = 0$

$x_1 = 0.1, y_1 = 0 $

$x_2 = 0.2, y_2 = 0.01 $

$x_3 = 0.3, y_3 = 0.032 $

$x_4 = 0.4, y_4 = 0.0684 $

However, my equation in question isn't written as a derivative format, and Y has a solvable value of 4. Is there something I need to do to the equation to get in the derivative format of $\frac{dx}{dy} $?