Use Euler's method to approximate the solution for the following initial value problem.

2.7k Views Asked by At

Use Euler's method to approximate the solution for the following initial value problem. $y'=te^{3t}-2y, 0\le t \le 1, y(0)=0 \text{ with } h=0.5$


$h$ is the step size The initial condition is $$ y(0)=0 \Rightarrow w_0=0 \\ t_0=0\\ \text{thus}\\ w_1=w_0+h(t_{0}e^{3t_0}-2w_0) \\ 0+0.5[(0)e^{3(0)}-2(0) =0 \\ t=a+ih \text{ common distance} \\ t_1=.5 $$

From this we can create this Table:

\begin{array}{|c|c|c|c|} \hline i& t_i & w_i & y(t_i) \\ \hline 0 & 0&0 &0\\ \hline 1 & .5&0 &\\ \hline 2& 1& 1.2&\\ \hline \end{array}

To find the the actual solutions requires one to solve the ordinary differential equation IVP problem.

A 1st order linear ODE has the form $$y'(x)+p(x)y=q(x) \\ y(x) =\frac{ \int e^{\int p(x)dx}q(x)dx+C}{e^{\int p(x) dt}} \\ \frac{ \int e^{\int p(x)dx}q(x)dx+C}{e^{\int p(x) dx}} $$ $$\frac{ \int e^{\int 2dt}e^{3t}tdt+C}{e^{\int 2 dt}} \\ \frac {\int e^{5t}tdt}{e^{2t}} = \frac{te^{3t}}{5}-\frac{e^{3t}}{25}+\frac{e^{-2t}C}{1}$$

I was unable to reach the correct answer to the ODE which was

$$\frac{1}{5}te^{3t}-\frac{1}{25}e^{3t}+\frac{1}{25}e^{-2t}$$

How do I correct my work and arrive to the correct conclussion?

1

There are 1 best solutions below

2
On BEST ANSWER

Just insert the initial condition $$ 0=0-\frac1{25}+C\implies C=\frac1{25}. $$

The table is then \begin{array}{|l|l|l|l|l|} i&t_i&w_i&y(t_i)\\\hline 0 & 0.0 & 0.000000 & 0.000000 \\ 1 & 0.5 & 0.000000 & 0.283617 \\ 2 & 1.0 & 1.120422 & 3.219099 \\ 3 & 1.5 & 10.042768 & 23.406446 \\ 4 & 2.0 & 67.512848 & 145.235098 \\ \end{array}