You are on page 1of 6

TECHNOLOGICAL INSTITUTE OF THE PHILIPINES

938 Aurora Blvd., Cubao, Quezon City

CE 007 (Numerical Solutions to CE Problems)


CE31S2

Machine Exercise 5.1

Numerical Solutions of Ordinary Differential Equations

Submitted by:
Santos, Michelle Anne F.
1820027

ACADEMIC INTEGRITY PLEDGE

I swear on my honor that I did not use any inappropriate aid, nor give such to others, in accomplishing
this coursework. I understand that cheating and/or plagiarism is a major offense, as stated in TIP
Memorandum No. P-04, s. 2017-2018, and that I will be sanctioned appropriately once I have committed
such acts.

Santos, Michelle Anne F.


1820027
SITUATION 1

Consider the following first-order ODE:

ⅆ𝑦
= (1 + 2𝑥)√𝑦, 𝑥 = [0,1], 𝑦(𝑥 = 0) = 1
ⅆ𝑥

Using step size of h = 0.25, determine y(x) at the given domain x using:

a. Analytical solution

i xi yi
0 0 1
1 0.25 1.336914
2 0.5 1.890625
p3 0.75 2.743164
4 1 4
b. Euler's method

i xi yi (Euler’s) yi (Analytical) % Error


0 0 1 1 0
1 0.25 1.25 1.336914 6.95312
2 0.5 1.669263 1.890625 13.261062
3 0.75 2.315263 2.743164 18.481745
4 1 3.266262 4 22.464150
c. Heun's method

i xi yi (Euler’s) yi (Heun’s) yi (Analytical) % Error


[predictor]
0 0 1 1 1 0
1 0.25 1.25 1.334631 1.336914 0.171059
2 0.5 1.669263 1.883644 1.890625 0.370611
3 0.75 2.315263 2.727722 2.743164 0.566113
4 1 3.266262 3.970990 4 0.730561
d. Classical RK4 procedure

i xi yi (Euler’s) yi (Heun’s) yi (RK4) yi (Analytical) % Error


0 0 1 1 1 1 0
1 0.25 1.25 1.334631 1.336899 1.336914 0.001122
2 0.5 1.669263 1.883644 1.890582 1.890625 0.002274
3 0.75 2.315263 2.727722 2.743074 2.743164 0.003281
4 1 3.266262 3.970990 3.999840 4 0.004
CONCLUSION:

Numerical methods used in solving initial value problems involving Ordinary Differential equations are
Euler's Method, Heun's Method, and Runge-Kutta Method. First, Euler's Method, which is also known as
Method of Tangent Lines, is commonly used due to its simple process that leads to its inaccurate values
that is why it is not advisable to use on exponential functions. Second, Heun's Method, an improved
version of Euler's method, that is usually more accurate, since the computed values are near to the
analytical values compared to Euler’s Method. Lastly, Runge-Kutta Method that uses intermediate points
in each interval to arrive at a very close value compared to Heun's and Euler's Methods.

Based on the attached solution, Euler’s Method is much more easier than the other methods. It requires
small amount of time to do compared to Heun’s and Runge-Kutta methods. On the other hand, Euler’s
Method has a large value of percent error than the other methods. Based on the constructed table,
Runge-Kutta Method is much more accurate than Euler’s and Heun’s method.

You might also like