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

In summary, the conversation involves finding approximate values of a solution to an initial value problem using the Euler method with different values of $h$. The general solution is obtained and compared with the book answer. The next steps involve using Euler's method to solve other problems, but the conversation is derailed by a discussion about learning new material and the poster's social life.
  • #1
karush
Gold Member
MHB
3,269
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
  • #2
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}
 
  • #3
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:
 
  • #4
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$.
 
  • #5
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
 
  • #6
.
 
Last edited:
  • #7
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
 
  • #8
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
 
  • #9
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...
 

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

What is Euler's method?

Euler's method is a numerical method used to approximate solutions to differential equations. It involves using small steps to approximate the solution at each point.

What does y' mean in "-b.2.7.2 Euler's method y'=3+y-y y(0) =1"?

The notation y' represents the derivative of the function y with respect to the independent variable. In this case, it represents the rate of change of y.

What does y(0) = 1 mean in "-b.2.7.2 Euler's method y'=3+y-y y(0) =1"?

The notation y(0) = 1 represents the initial condition of the differential equation. It specifies the value of the function y at the starting point, which is when the independent variable is equal to 0.

How does Euler's method work?

Euler's method works by dividing the interval of interest into small steps and using the derivative at each step to approximate the solution. It is based on the idea that the change in the function y between two adjacent points can be approximated by multiplying the derivative by the step size.

What are the benefits of using Euler's method?

Euler's method is relatively easy to implement and can be used to approximate solutions to a wide range of differential equations. It also allows for a better understanding of the behavior of the solution over time. However, it may not always be the most accurate method and can lead to errors if the step size is not small enough.

Similar threads

Replies
5
Views
4K
Replies
11
Views
3K
Replies
4
Views
2K
Replies
6
Views
1K
Replies
5
Views
1K
Replies
2
Views
1K
Back
Top