9.1.14 Use Euler's method to calculate

In summary, the conversation discusses the use of Euler's method to calculate the first 3 approximations to a given initial value problem. The exact solution is also calculated. The given answers are provided, but the speaker expresses difficulty in deriving them. They also note that Euler's method is not doing a good job in this particular problem, as the approximations increase while the exact value decreases. The speaker hopes to do more examples to better understand Euler's method.
  • #1
karush
Gold Member
MHB
3,269
5
$\tiny{9.1.14}$
$\textsf{Use Euler's method to calculate
the first 3 approximations to the given initial value problem for the specified increment size.}\\$
$\textsf{ Calculate the exact solution.}$
$y'=y^2(5+5x), y(1)=-1, dx=0.2$
$y_1=$
$y_1=0.4$
$y_2=0.6268$
$y_3=1.2694$
$y(exact)=-\frac{1}{x^2+5x-5}$

$\textsf{the given answers are book answers but i couldn't derive them}$
 
Physics news on Phys.org
  • #2
Given:

\(\displaystyle \d{y}{x}=f(x,y)\)

Euler's method is the recursion:

\(\displaystyle y_{n+1}\approx y_{n}+\Delta x\cdot f\left(x_n,y_n\right)\)

Now, in the given problem, we are given:

\(\displaystyle \d{y}{x}=y^2(5x+5)\) where \(\displaystyle y(1)=-1\)

Let's first compute the exact solution...separate variables, use bounds as limits and switch dummy variables:

\(\displaystyle \int_{-1}^{y(x)}u^{-2}\,du=5\int_{1}^{x}v+1\,dv\)

Apply the FTOC:

\(\displaystyle -\left[\frac{1}{u}\right]_{-1}^{y(x)}=5\left[\frac{v^2}{2}+v\right]_{1}^{x}\)

\(\displaystyle -\left(\frac{1}{y(x)}+1\right)=5\left(\frac{x^2}{2}+x-\frac{3}{2}\right)\)

\(\displaystyle -\frac{1}{y(x)}=\frac{1}{2}\left(5x^2+10x-13\right)\)

\(\displaystyle y(x)=-\frac{2}{5x^2+10x-13}\)

Okay, now back to Euler's method...we begin with:

\(\displaystyle y_1=-1\) and \(\displaystyle x_1=1\) and we are told to use \(\displaystyle \Delta x=\frac{1}{5}\)

\(\displaystyle y_2\approx-1+\frac{1}{5}\left((-1)^2(5(1)+5)\right)=1\)

Compare to the exact value:

\(\displaystyle y\left(\frac{6}{5}\right)=-\frac{10}{31}\)

Next approximation:

\(\displaystyle y_3\approx1+\frac{1}{5}\left((1)^2\left(5\left(\frac{6}{5}\right)+5)\right)\right)=\frac{16}{5}\)

Compare to the exact value:

\(\displaystyle y\left(\frac{7}{5}\right)=-\frac{5}{27}\)

Can you continue, and explain why Euler's method isn't doing a very good job here?
 
  • #3
well just from observation the approx value increases while the exact value decreases

I've got to do more of these Euler's method so hope to understand it better

The examples to follow were ?
 

What is Euler's method?

Euler's method is a numerical method used to approximate solutions to ordinary differential equations. It uses small time steps to calculate the next value of a function based on its current value and slope.

When is Euler's method used?

Euler's method is used when an analytical solution to a differential equation is not available. It is a simple and efficient way to approximate solutions and is commonly used in scientific and engineering fields.

How accurate is Euler's method?

Euler's method is a first-order method, meaning that the error in its approximation is proportional to the size of the time step used. Therefore, it may not be very accurate for large time steps, but it can be very accurate with small enough time steps.

What are the limitations of Euler's method?

Euler's method can only be used for first-order differential equations, and it may not accurately approximate solutions for nonlinear or stiff differential equations. Additionally, the accuracy of the method is dependent on the size of the time step used.

How do you use Euler's method to calculate a solution?

To use Euler's method, you need to have the initial value of the function, the differential equation, and a small time step. Then, you can use the formula xn+1 = xn + hf(xn,tn) to calculate the next value of the function, where h is the time step, xn is the current value of the function, and f(xn,tn) is the slope of the function at that point. This process is repeated until you reach the desired end time.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
108
Replies
3
Views
1K
  • Calculus
Replies
1
Views
1K
Replies
7
Views
2K
Replies
6
Views
2K
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
483
  • Calculus
Replies
4
Views
2K
Replies
4
Views
2K
Back
Top