0% found this document useful (0 votes)
17 views10 pages

NT For Inquiries

The document outlines a series of mathematical problems involving numerical methods such as the bisection method, Newton-Raphson method, least squares fitting, trapezoidal rule, Romberg integration, Gauss-Seidel method, and Runge-Kutta method. Each question requires the application of these methods to solve equations, approximate integrals, and analyze the performance of numerical techniques. Additionally, it includes specific tasks such as sketching relations, estimating values, and comparing numerical results with analytical solutions.

Uploaded by

qfzg7f99qd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views10 pages

NT For Inquiries

The document outlines a series of mathematical problems involving numerical methods such as the bisection method, Newton-Raphson method, least squares fitting, trapezoidal rule, Romberg integration, Gauss-Seidel method, and Runge-Kutta method. Each question requires the application of these methods to solve equations, approximate integrals, and analyze the performance of numerical techniques. Additionally, it includes specific tasks such as sketching relations, estimating values, and comparing numerical results with analytical solutions.

Uploaded by

qfzg7f99qd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Answer 4 questions only

a) Use bisection method and Newton-Raphson method to solve the equation: 𝑥 =50 𝑙𝑛𝑥.
Q1

Hint: the solution lies in the interval(1 , 1.25) .


b) {4 iterations are sufficient} Comment on the performance of the two methods.
{10 marks for each method and 5 marks on the comment}. [Q1 total: 25
marks]
Q2
Given the velocity vs. time of an object as follows:

t(s) 0 3 6 9 12 20
v(m/s) 0 0.16 0.55 6.08 20.17 81.25

a) Sketch the relation. [5


marks]
b) Use an exponential least square fit to estimate he velocity at t=8 s and t=15 s. [15
marks]
c) Comment on your results. [5 marks]
[Q2 total: 25 marks]
Q3
x=0.8 x
e cosx
Consider the integral I= ∫ 3
dx
x=0 1+ x
a) Approximate the integral by employing the trapezoidal rule and dividing the interval [0, 0.8]
into N = 4 equally sized intervals. [10 mark]
6
b) Use Romberg technique to reach an accuracyO(h ). [10 mark]
c) Calculate the error knowing that the “exact result” is: 0.9535106. [5 marks]
[Q3 total: 25 marks]
Q4
a) Consider the following system of linear equations:
x+30 y + 4z = 1
25x + 10y -5z = -10
−3x+ 6y + 12z = 3
Is the system diagonally dominant? Use four iterations of Gauss-Seidel method with
initial guess [0 , 0 ,0 ]to get an approximate solution. Calculate the relative error of your
results.
[13 marks]
b) Solve the following differential equation by using Runge- Kutta method over the interval
[ 0 , 0.5 ] with a step size h=0.1 :
dy
=−x y , and y ( 0 )=¿ 1.
dx
2
−x
Compare the solution with the analytical solution: y (x )=e 2 [12 marks]
[
Q4 total: 25 marks]
Q5

[Turn Over (only when instructed to do so)]


Use two numerical techniques to solve the equation:
dy
=1+ xsiny , 0 ≤ x ≤ 0.3 , y ( 0 )=0.
dx
Sketch the solution. {Choose step sizeh=0.1
{10 marks for each method and 5 marks for the sketch}. [Q5 total: 25 marks]
The Formula Sheet
Newton- Raphson ( f ( x )=0 ¿
f (x n )
x n+1=x n −
f ' (x n )
Lagrange Interpolation

Newton Interpolation

( n+1 )
f (ξ)
Interpolation Error=f ( x ) −P n ( x )=( x−x 0 ) …(x−x n)
( n+1 ) !
Linear Least Square
y=a0 +a 1 x

xi [∑
n ∑ xi
∑ x 2i ][ ] [
a0
a1
= ∑ yi
∑ xi yi ]
Composite Trapezium & Simpson’s Rules for Integration

2 4
Composite Trapezium Error=C h , Simpson ’ s Rules Error=C h .
Simplest Formulae for Romberg Integration (h of LA is double of h of MA)
LA=Less Accurate, M A=More Accurate
4 (MA)−LA
From order of error h2 to order of error h 4 I=
3

16( MA )−LA
From order of error h 4 to order of error h6 I=
15
'
Initial Value Problem y =f x , y , y ( x 0 )= y 0
( )

[Turn Over (only when instructed to do so)]


2
Euler Method y n +1= y n +h f ( x n , y n ) +O(h )
Runge-Kutta Method of order 2
k 1+ k 2
k 1=f ( x n , y n) ,k 2=f ( x n +h , y n +h k 1 ), y n +1= y n +h +O(h 3)
2

a) Use bisection method and Newton-Raphson method to solve the equation: 𝑥 =50 𝑙𝑛𝑥.
Q1

Hint: the solution lies in the interval(1 , 1.25) .


b) {4 iterations are sufficient} Comment on the performance of the two methods.
{10 marks for each method and 5 marks on the comment}.

f ( x )=x −lnx ¿

Bisection

Newton-Raphson f ( x )=x −lnx


1 x−1
f ' ( x )=1− =
x x
f
x new =x old − ' ( x old )
f

Newton-Raphson is faster but we need to derive a function and be sure that


it is not “numerically
Zero”

[Turn Over (only when instructed to do so)]


Q2
Given the velocity vs. time of an object as follows:

t(s) 0 3 6 9 12 20
v(m/s) 0 0.16 0.55 6.08 20.17 81.25

a) Sketch the relation


b) Use an exponential least square fit to estimate he velocity at t=8 s and t=15 s.
c) Comment on your results.

5
0.37293t
v=0.093104 e
At t=8 , v =1.839332089
At t=15 , v=25.02594548

[Turn Over (only when instructed to do so)]


t v(Given) v(Calculated) Error Comment
3 0.16 0.285005182 0.125005182 SHAPE
4 4 SEEMS
6 0.55 0.872443259 0.322443259 ACCEPTABLE
4 4 BUT RESULTS
ARE FAR FROM
9 6.08 2.670678596
DATA
ESPECIALY AS
12 20.17 8.175344453 t increases

20 81.25 161.5094301 80.2594301 Very Large

Q3

[Turn Over (only when instructed to do so)]


x=0.8 x
e cosx
Consider the integral I= ∫ 3
dx
x=0 1+ x
a) Approximate the integral by employing the trapezoidal rule and dividing the interval [0, 0.8]
into N = 4 equally sized intervals.
b) Use Romberg technique to reach an accuracyO(h 6).
c) Calculate the error knowing that the “exact result” is: 0.9535106.

x=0.8 x
e cosx
I= ∫ 3
dx =0.9533550
x=0 1+ x

APPROXIMATION METHOD: Romberg Integration Method


-----------------------ROMBERG INTEGRATION TABLE -----------------
O (h2 ¿ O (h 4 ¿ O (h6 ¿
0.8101982
0.9216636 0.9588187
0.9456882 0.9536964 0.9533550

Error= 0.9535106-0.9533550=.00001556

Q4
a) Consider the following system of linear equations:

[Turn Over (only when instructed to do so)]


x+30 y + 4z = 1
25x + 10y -5z = -10
−3x+ 6y + 12z = 3
Is the system diagonally dominant? Use four iterations of Gauss-Seidel method with
initial guess [0 , 0 ,0 ]to get an approximate solution. Calculate the error of your results.
[13 marks]
Gauss Seidel

Direct - Method

[ ] [ ]
−0.383 −0.00001875
0.0275 −0.00005625
- 0.140 = .0000265

b) Solve the following differential equation by using Runge- Kutta method over the interval
[ 0 , 0.5 ] with a step size h=0.1 :
dy
=−x y , and y ( 0 )=¿ 1.
dx
2
−x
Compare the solution with the analytical solution: y (x )=e 2 [12 marks]

Exact Solution Runge-Kutta


0.0 1 1
0.1 0.9950124792 0.9950

[Turn Over (only when instructed to do so)]


0.2 0.9801986733 0.9802
0.3 0.9559974818 0.9560
0.4 0.9231163464 0.9231
0.5 0.8824969026 0.8825

Q5
Use two numerical techniques to solve the equation:
dy
=1+ xsiny , 0 ≤ x ≤ 0.3 , y ( 0 )=0.
dx
Sketch the solution. {Choose step sizeh=0.1 ¿

x Runge-Kutta Euler Solution


0.0 0 0
0.1 0.1003 0.1
0.2 0. 2027 0. 2010
0.3 0.3091 0.3050

Euler is less accurate than R=K method


Error increases as x increases

x More Exact R-K-4 3rd Error Euler !st Error


Method order orderTaylor
Taylor
0 0 0 0 0 0
0.1 0.1003 0.1003 0.0 0.1 0.0
0,2 0.2027 0.2027 0.0 0.201 0.0017
0.3 0.3091 0.0391 0.0 0.0.305 0.0041
0.4 0.4216 0.4216 0.0 0.414 0.0076
0.5 0.5426 0.5425 0.0001 0.5301 0.0125

[Turn Over (only when instructed to do so)]


[Turn Over (only when instructed to do so)]
[Turn Over (only when instructed to do so)]

You might also like