-b.2.7.2 Euler's method y'=3+y-y y(0) =1

  • Context: MHB 
  • Thread starter Thread starter karush
  • Start date Start date
  • Tags Tags
    Euler's method Method
Click For Summary
SUMMARY

The discussion focuses on solving the initial value problem defined by the differential equation \(y' = 3 + t - y\) with the initial condition \(y(0) = 1\) using Euler's method. The participants calculated approximate values for \(t = 0.1, 0.2, 0.3,\) and \(0.4\) using step sizes \(h = 0.1\), \(h = 0.05\), and \(h = 0.025\). The results were compared, revealing that smaller step sizes yield more accurate approximations. The exact solution was also derived, providing a benchmark for the approximations.

PREREQUISITES
  • Understanding of Euler's method for numerical solutions of differential equations
  • Familiarity with basic calculus concepts, including derivatives and integrals
  • Knowledge of initial value problems in differential equations
  • Ability to perform numerical calculations and comparisons
NEXT STEPS
  • Learn about higher-order numerical methods such as Runge-Kutta methods
  • Explore the concept of stability in numerical methods for differential equations
  • Investigate the impact of step size on the accuracy of numerical solutions
  • Study the exact solutions of linear differential equations and their applications
USEFUL FOR

Students and professionals in mathematics, engineering, and physics who are working with differential equations and numerical methods for solving initial value problems.

karush
Gold Member
MHB
Messages
3,240
Reaction score
5
$\tiny{2.7.2}$
1000
(a) Find approximate values of the solution of the given initial value problem\\
at $t = 0.1, 0.2, 0.3$, and $0.4$ using the Euler method with $h = 0.1$.(b) Repeat part (a) with h = 0.05. Compare the results with those found in (a).(c) Repeat part (a) with h = 0.025. Compare the results with those found in (a) and (b).(d) Find the solution $y=\phi(t)$ of the given problem and evaluate
$\phi(t)$ at $t = 0.1,\quad 0.2, \quad 0.3,$ and $0.4$.#1. $\quad\displaystyle
y'=3+t-y \quad y(0)=1$ok assume first step is to get a general solution
rewrite
$y'+y=3+t $
then
$ey'+ey=(ey)'=3+t$
so
$\displaystyle ey=\int{(3+t)} \, dt= \frac{t^2}{2} + 3 t + c$
isolate
$\displaystyle y=\frac{t^2}{2e} + 3 te^{-1} + c^{-e}$
$\color{red}{(a) 1.2, 1.39, 1.571, 1.7439}$
$\color{red}{(b) 1.1975, 1.38549, 1.56491, 1.73658}$
$\color{red}{(c) 1.19631, 1.38335, 1.56200, 1.73308}$
$\color{red}{(d) 1.19516, 1.38127, 1.55918, 1.72968}$Red is book answer
If I can get #1 probably 2,3 and 4 will be a slide
which are
2. $\quad y'=2y-1 \quad y(0)=1$
3. $\quad\displaystyle
y'=y'=0.5-t+2y, \quad y(0)=1$
4. $\quad\displaystyle
3\cos{t} -2y \quad y(0)=0 $
 
Last edited:
Physics news on Phys.org
Euler's method is:
\begin{cases}
t_{k+1}&=t_k+h \\
y_{k+1}&=y_k+h\cdot y'(t_k; y_k)
\end{cases}
At $t_0=0$ we have $y_0=1$, so with $y'=3+t-y$ and $h=0.1$ we have at $t_1$:
\begin{cases}
t_1=t_0+h=0.1 \\
y_1=y_0 + 0.1\cdot y'(0;1)=1 + 0.1 (3+0-1)=1.2
\end{cases}
 
ok I am still processing understanding this saw this on another example
not sure what n is

$$\displaystyle y_{n+1}=y_n +\textit{$hf_n$}$$:confused:
 
karush said:
ok I am still processing understanding this saw this on another example
not sure what n is

$$\displaystyle y_{n+1}=y_n +\textit{$hf_n$}$$:confused:

Close enough.
The function $f$ describes $y'$. That is, we have:
$$y'(t) = f(t,y)$$
And $f_n$ is its value at $t_n, y_n$.
 
Klaas van Aarsen said:
Close enough.
The function $f$ describes $y'$. That is, we have:
$$y'(t) = f(t,y)$$
And $f_n$ is its value at $t_n, y_n$.

Ok I'll try the next one
See if i don't derail
 
.
 
Last edited:
karush, I know you are still learning new material. I can understand that will cause you some difficulties... it's learning.

But how can you pick out a question to put in your collection without knowing the idea of the problem? Euler's method is an approximation method to solve DEqs. You don't need to actually solve the thing until step d and you said you assumed you needed to start by doing it!

-Dan
 
topsquark said:
karush, I know you are still learning new material. I can understand that will cause you some difficulties... it's learning.

But how can you pick out a question to put in your collection without knowing the idea of the problem? Euler's method is an approximation method to solve DEqs. You don't need to actually solve the thing until step d and you said you assumed you needed to start by doing it!

-Dan
well this was posted several years ago
I was just testing a link
 
karush said:
well this was posted several years ago
I was just testing a link
Hah! I fell for a necro-post! :)

-Dan
 
  • #10
well MHB is my social life right now...
the gestapo is everywhere...
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K