Numerical Method assignments
Numerical Method assignments
1. Trapezoidal Rule
a) Derivation of the rule
b) Also derive the Multiple segment Trapezoidal rule using single application
c) What happens by increasing the number of segments? Justify your answer with an example
graphically
4. Bisection Method:
a) Brief note on Bisection Method
b) Algorithm for Bisection Method
The equation that gives the depth ‘x’ to which the ball is submerged under water is:
x 3 − 0.165 x 2 + 3.993 10 −4 = 0
5. Secant Method
a) Explain the method with graphical illustrations
b) Algorithm for the Method
f ( x) = x 6 − x − 1 = 0
Using this method (Plot the function first to determine your initial guesses in EXCEL)
x 3 − 0.165 x 2 + 3.993 10 −4 = 0
7. Euler’s method
a) Write a brief note on the method
b) Consider the following IVP, which is an example of a Continuous Logistic Model
dy 4y
= 30𝑦 (1- ) , y(0) = 0.1
dt 3
This IVP has a solution
3e30t
y(t) =
26 + 4e30t
i) Run Euler’s method, with step size 0.1, from t = 0 to t = 5 . Then, plot the resulting approximate
solution (in excel) on the interval 0 ≤ t ≤ 5. Also, plot the true solution (given by the formula above)
in the same graph.
ii) Repeat part a. with step size 0.08.
iii) Repeat part a. with step size 0.05.
iv) Comment on the differences between the three graphs in parts i-iii.
9. Differentiation:
a) Write a brief note on first and second order forward, backward and central difference formulas
b) Derive all the formulas
c) Determine the first and second derivatives of the function y = 2x 3 -20x 2 + 11x + 30 over the
range x=-5 to x=10 using EXCEL
11. Differentiation
a) Explain the numerical differentiation schemes
b) The van der Waals equation is an equation of state that applies to real gases. For 1 mole of a
gas, the van der Waals equation is
a
(P + 2 ) (V-b) = 𝑅𝑇
v
where R is the gas constant and T is the Kelvin temperature. The constants a and b are constants
particular to a given gas, and correct for the attractive forces between gas molecules, and for the
volume occupied by the gas molecules, respectively. For methane the constants are a =
2.253L2 atm and b = 4.278*10-2 L. Using the rearranged form of the van der Waals equation
RT a
P= -
V-b V 2
calculate the pressure of 1 mole of methane as a function of container volume at 0°C (273 K) at
suitable volumes from 22.4 L to 0.05 L using EXCEL. Use one of the custom functions described in
differentiation to calculate the first and second derivatives of the P-V relationship. Compare with
the exact expressions.
a) Develop a user-friendly computer program for Romberg integration. Test it by duplicating the
results of Ex 22.2 and Ex 22.3 page 653 of text book.
b) Write a brief note on the method