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

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?

Just insert the initial condition $$0=0-\frac1{25}+C\implies C=\frac1{25}.$$
• I think I figured it out they made $C = \frac{1}{25}$ – Jon Feb 2 '18 at 2:04