You are on page 1of 4

//Name Score

ASKALANI, NURHUSSAIN I.

Course/Section: CE/E01 Date:29/07/2021

CEM50P-2
Week 10 Laboratory Activity
Numerical Methods for Solving ODE

1. Consider the ODE


y ln y dx−xdy=0
With initial condition: y (2)=e

a. Determine the general solution using appropriate analytical process.


b. Find the particular solution using the given initial condition.
c. Approximate the solution at x=3.0 using a step size h=0.1
y ≈???
d. What is the relative absolute error at x=3.0 using a step size h=0.1?
% Err|¿|=? ? ? ¿
e. Repeat (c) and (d) using a step size h=0.05.
f. Repeat (c) and (d) using a step size h=0.025.
g. What can you conclude from the results in (d), (e) and (f)?
2. Consider the ODE
2 3
y ' + y = 3 +1
x x

With the initial condition that y=1 when x = 1.

1
a. Show that the particular solution is y= 2
( ln x 9 + x 3+ 2).
3x

b. Use the 2nd, 3rd and 4th Runge-Kutta methods to approximate the value of y at x = 2 using a step
size of h=0.1. Complete the table below.

Step Approx. value of Rel. Abs. Err.


RK Method Abs. Err.
size y (%)

RK-2 0.1 1.34949 -0.00370 -0.273

RK-3 0.1 1.35334 0.00015 0.011

RK-4 0.1 1.35319 0 0

Show details of computation below (or paste a screenshot of Excel computation).

You might also like