Euler Approximation Project

Dennis O'Connell

06/05/2020

Problem 1

The non-linear initial value problem in question is the following: y=53y,y(0)=2 Our goal is to compute approximate values to the equation at the points t=0.5,1,1.5,2.0,2.5 and plot solutions using: a)h=0.1b)h=0.05c)h=0.025d)h=0.01

Part A) h=.1

The Euler's method states that yn+1=yn+hf(tn,yn), where tn+1=tn+h
When h=.1 and t=.5 we have that h=110,t0=0,y0=2,f(t,y)=53y We have a step size of .1 and we are trying to approximate y(.5) so we will use this method to calculate one point at each of the five steps

Step 1

t1=t0+h=0+110=110y(t1)=y(110)=y1=y0+hf(t0,y0)=2+hf(0,2)==2+110(0.757359312880715)=2.07573593128807

Step 2

t2=t1+h=110+110=15y(t2)=y(15)=y2=y1+hf(t1,y1)=2.07573593128807+hf(110,2.07573593128807)==2.07573593128807+110(0.677775644232169)=2.14351349571129

Step 3

t3=t2+h=15+110=310y(t3)=y(310)=y3=y2+hf(t2,y2)=2.14351349571129+hf(15,2.14351349571129)==2.14351349571129+110(0.607777161686625)=2.20429121187995

Step 4

t4=t3+h=310+110=25y(t4)=y(25)=y4=y3+hf(t3,y3)=2.20429121187995+hf(310,2.20429121187995)==2.20429121187995+110(0.545943320194549)=2.25888554389941

Step 5

t5=t4+h=25+110=12y(t5)=y(12)=y5=y4+hf(t4,y4)=2.25888554389941+hf(25,2.25888554389941)==2.25888554389941+110(0.491123211364648)=2.30799786503587

Answer

y(12)=2.30799786503587

Now repeat the process for t=1

This time we have 10 steps since there are ten steps of length .1 in t=1. After computations we get the approximation y(1)=2.49006201824323

Keep repeating the process for t=1.5,2.0,2.5

y(32)=2.60022620250401 y(2)=2.66772787250012 y(52)=2.70938800499274

Part B) h=.05

This time we will see twice as many steps as there were in part a because the step size has been reduced by a half
When h=.05 and t=.05, we have h=120,t0=0,y0=2,f(t,y)=53y Now use Euler's method to approximate y(.5) after 10 steps

Answer

y(12)=2.30166603354356

Just like in Part A, we repeat this process for T=1,1.5,2.0,2.5

Answers

y(1)=2.48262624738228 y(32)=2.59351710664336 y(2)=2.6622699286492 y(52)=2.70518844985266

Part C)

h=0.025

Answers

y(12)=2.29863798427263 y(1)=2.47902957749642 y(32)=2.59023973355631 y(2)=2.65957929689476 y(52)=2.70310002326473

Part D)

h=0.01

Answers

y(12)=2.29686258733234 y(1)=2.47690855658606 y(32)=2.58829723261312 y(2)=2.65797708416176 y(52)=2.70310002326473

Interactive Plot

  • h1=> h=.1
  • h2=> h=.05
  • h3=> h=.025
  • h4=> h=.01
  • Comments on the behavior

    With smaller values of h, it seems that our answers are becoming more refined and closer to a single solution. Though it is difficult to see on the interactive graph, the approximations at h=.01 are closer to a single solution than they are at h=.1

    Problem 2

    In this problem, we are concerned with the following initial value problem: y=ty+0.1y3,y(0)=α

    This differential equation can be represented by the vector field below:

    slope_field_no_lines_problem_2

    Part A

    When we plug in different values for alpha between 1 and 4 we get lines of different behaviors

    slope_field_with_lines
  • The red line represents alpha = 1
  • The green line represents alpha = 2
  • The blue line represents alpha = 3
  • It is clear that between alpha = 2 and alpha = 3, there is a value for alpha that is a "tipping point" that leads to either divergence or convergence.

    Part B

    In order to approximate the value of this tipping point, I plugged in values of alpha between 2 and 3 until they either drew a line that diverged or converged.

    slope_field_approximation

    Last black line is alpha = 2.3714, it seems that the tipping point is about 2.73

    Here, each time that I plugged in a value for alpha with a decimal place that was either slightly greater than 2.3 and if it stayed convergent then I would keep on increasing the value of the decimal place until it became divergent.

    Part C

    In order to approximate the tipping point, we can also use Euler's method

    With h=.01, we get

    y(12)=3.01399704820084 y(1)=3.58697080063328 y(32)=3.96777080880568 y(2)=3.50207152939925

    Technologies used for this project

  • Emathhelp.net was used for performing the computations of each Euler approximation. Link.
  • D3, a javascript datavisualization library, was used to plot the points created by each approximation in problem 1. Link.
  • Darryl Nester's Slope Field Generator was used to calculate the slope field of the differntial equation in problem two. Link.
  • Mathjax was used to render the LaTeX on this webpage. Link.
  • Lastly, Bootstrap was used for styling.
  • Check out the Github Repo here: Link.