Numerical Methods Tutorial
Numerical Methods Tutorial
KEY POINTS
• Bisection Method: � = 2 where �(�) < 0 ��� � (�) > 0
�+�
0 ��� � (� ) > 0
�� (�)
−��(�)
𝑥𝑖−𝑥𝑖
• Secant Method: ���+1 = −1 �(��� )
−
�𝑖
−𝑓
�� (𝑥 )𝑥 ( ��−1 )
𝑖
�� )
−
�� (𝑥
′
• Fixed Point Iteration Method: �(�) = 0 ⇒ ���+1 = ��(��� ) where |�� ′ (�)| < 1
2. Find where the graph of � = 1.2 sin �and � = � ln(�) intersect using bisection method. Get
correct up to four decimal places.
the
3. Find the root of the equation �(�) = � 3 − 4� − 9 correct to three decimal places using False Position
intersection value correct to four decimal places.
4. Find the positive real root of the equation � 𝑥 sin � − 1 = 0 using False position method, correct
Method.
5. Find the root of the equation �� 𝑥 = cos � using the secant method correct up to four decimal places.
NON-BRACKETING METHOD (OPEN END)
6. Solve � 3 + � 2 − 3� − 3 = 0 by secant method up to 8th iteration. Assume that the error should
be less than 10−4.
7. The current 𝑖 in an electric circuit is given by 𝑖 = 10� −𝑥 sin 2𝜋� where � is in seconds. Using N-R
method, find the value of x correct up to three decimal places for 𝑖 = 2 ����.
8. Find the root of the equation � − 1.5 sin � − 2.5 = 0 using Newton Raphson’s Method so that relative
error is less than 0.01%.
9. Find the square root of 11 using Newton Raphson method and fixed point iteration method correct up
10. Find a root of the equation: 2� − log � = 7, correct to 4 decimal places by using fixed point
to four decimal digit.
iteration method.
1. Explain the types of errors. An approximate value of 𝜋 is given by ��1 = 3.1428571 and its
true value is 𝑋 = 3.1415926. Find the absolute and relative errors. (***)
2. If � = 1.350253 is rounded off to four significant digits find the absolute and relative errors.
3. Use the Bisection Method to compute a root of the equation: �� 𝑥 = cos � correct to four decimal places.
4. Find where the graph of � = � − 3 and � = ln(�) intersect using bisection method. Get the
5. Using the bisection method, find an approximate root of the equation sin � = 1/�, that lies
intersection value correct to four decimal places.
6. Find the root of the equation �(�) = � 2 − 4� − 10 correct to three decimal places using False Position
between x=1 and x=1.5 (in radians). Carry out computations up to 7th stage.
7. Find the positive real root of the equation cos � + � 𝑥 + � 2 = 3 using False position method,
Method.
of � cos 𝑥 − sin � − 1 = 0 correct to four decimal places using False position method.
8. Discuss the application of Numerical methods in the field of science and engineering. Find a real root
9. Find a positive root of the equation � sin � − 1 = 0 using any closed end method up to four
10. What is the fixed point of a non-linear equation? Find a real root of the equation: �� 𝑥 = 3 by using any
decimal places.
i. How many roots does it have in the interval (-6,6)? What is the assumption being made?
ii. Find one of the positive real roots by using any closed-end method, correct to at least three
13. The flux equation of an iron core electric circuit is given by: �(��) = 10 − 2.1𝜙 − 0.01�� 3 . The
decimal places.
state value of flux is obtained by solving the equation, �(��) = 0. By using any close-end
steady
method, estimate the steady state value of "��" correct to three decimal places.
2. Using Secant method, find the zero of the function � (��) = 2𝑥 − log10 𝑥 − 7 correct up to
4. Using Secant method find a root of the equation � 𝑥 sin 𝑥 − �� 2 = 0 correct to three decimal places.
5. Solve �(��) = 3𝑥 + sin 𝑥 − � 𝑥 by secant method.
7. Obtain a real root of the equation: sin 𝑥 + 1 = 2𝑥 by using secant method such that the real root
6. Write an algorithm to find a real root of a non-linear equation using secant method.
8. Define root with example. Determine the root of � 𝑥 = �� 3 + cos(25��) using secant method correct
must have relative error less than 0.0001.
to
9. Estimate the root of the equation �(��) = ��� 𝑥 − cos 𝑥 using Newton Raphson Method
four decimal places.
11. Find the root of the equation log 𝑥 − cos 𝑥 = 0 correct to three decimal places by using N-R method.
12. Evaluate one of the real roots of the given equation: ��� 𝑥 − cos(��) = 0 by using NR-
13. Discuss the drawbacks of Newton-Raphson method. Find the real root of the equation𝑥 sin 𝑥 − cos 𝑥 =
method correct to at least four decimal places.
17. Find the root of the equation3𝑥 = cos(��) + 1 using NR method with the tolerance of 10E-5.
by using this formula correct to four significant digits.
19. Find the root of the equation 𝑥 sin 𝑥 + cos 𝑥 = 0 using Newton Raphson’s Method so that relative error
is less than 0.1.
20. Find the square root of 7 using Newton Raphson method and fixed point iteration method correct up to
21. Find a real root of the equation cos 𝑥 = 3𝑥 − 1, correct to three decimal places, using fixed
four decimal digit.
𝑝(𝑝 𝑝 ( 𝑝 − 1) (
• Newton forward interpolation:
�(�0 + 𝑝ℎ) = �0 + − 1) 2 �0 𝑝 − 2) �0 + ⋯
��∆�0 + ∆ + ∆3
2! 3!
𝑝(𝑝 + 𝑝 ( 𝑝 + 1) ( 𝑝 �𝑛 + ⋯
• Newton backward interpolation:
�(�𝑛 + 𝑝ℎ) = �𝑛 +
1) �𝑛 + 2)
��∇�𝑛 + ∇ +
2
∇3
2! 3!
( � − �1 ) ( � − �2 ( � − �0 ) ( � − �2 ) … ( � − �𝑛 )
• Lagrange interpolation:
) … ( � − �𝑛 )
� (� ) = � + � +⋯
− ) − )… − ) 0 − ) − )… − ) 1
�1 (�0 �2 (�0 �𝑛 (�1 �0 (�1 �2 (�1 �𝑛
0
(�
6
• Spline interpolation:
����−1 + 4��𝑖 + ����+1 = 2 (���−1 − 2�𝑖 + ���+1 ), ��0 =
ℎ
0, ��𝑛 = 0
( �𝑖 + 1 (� − ( �𝑖 + 1 ℎ (� − ℎ
��(�) = − � ) 3 ��𝑖 � ) 3 ��� − � ) (�𝑖 2 ��� � ) (��� 2 ����+1 )
𝑖 𝑖
+ + − 6 )+ +1 − 6
6ℎ 6ℎ �+1 ℎ � ℎ
Solve ∑ � = 𝑛� + � ∑ � ���𝑑 ∑ �� = � ∑ � + � ∑ � 2
(�� ) � = ��𝟐 + �/� ⇒ �� = �� 3 +
for unknowns and b.
� ⇒ � = �� + �
(𝑖�� ) � = ��� ⇒ log � = log � + � log
� ⇒ � = 𝐴 + ��
INTERPOLATION
1. The population of a town in the last six censuses are as given below. Estimate the population in the year
1946. (**)
Year 1911 1921 1931 1941 1951 19
Populations (000) 12 15 20 27 39 52
2. From the following table, estimate the number of students who obtained marks between 40 and 45.
Marks 30—40 40—50 50—60 60—70 70—
No. of students 31 42 51 35 31
3. The following table gives the population of a town during the last six censuses. Estimate the increase
in the population during the period from 1976 to 1978.
Year 1941 1951 1961 1971 1981 19
Populations (000) 12 15 20 27 39 52
9. The pressure and volume of a gas are related by the equation ���� = ��, 𝛾 and C being
y: 14 27 40 55 68
𝛾
constants. Fit
this equation to the following set of observations. (***)
P (kg/cm2) 0.5 1.0 1.5 2.0 2.5 3.0
V (litres) 1.62 1.00 0.75 0.62 0.52 0.4
1. From the data given below, find the number of students whose weight is between 60 to 70.
Weight in lbs 0—40 40—60 60—80 80—100 100—
No. of students 250 120 100 70 50
2. From the following table, estimate the number of student who obtained marks between 40 and 45.
Marks 30—40 40—50 50—60 60—70
No. of students 31 42 51 35
3. Define interpolation. From the following table, estimate the number of students who passed marks
between 40 and 45:
Marks 30—40 40—50 50—60 60—70 70—
No. of students 30 40 50 38 31
4. Find the number of students securing marks between 50—55 using following table.
Marks Obtained 20—30 30—40 40—50 50—60
No. of students 10 20 30 40
5. The following table gives the viscosity of oil as the function of temperature. Use Lagrange’s
interpolation formula to find the viscosity of oil at a temperature of 140 degree Celsius.
T (degCelsius) 110 130 160 190
Viscosity 10.8 8.1 5.5 4.8
6. The function � = ��(�) is given at the points (7, 3), (8, 1), (9, 1) 𝑎��𝑑 (10, 9). Find the value
of y for x
= 9.5 using Lagrange interpolation formula.
7. The following table gives the percentage of criminals for different age groups. Using interpolation
formula, find the percentage of criminals under the age of 35.
Under age (x) 25 30 40 50
% of criminals 52 67.3 84.1 94.4
8. Find the missing term in the following table using suitable interpolation.
x 0 1 2 3 4
y 1 3 9 ? 81
9. Obtain divided difference table for the given data set:
x -1 2 5 7
y -8 3 1 12
10. Use Newton’s interpolation Method to evaluate the missing data from the following table.
x 4 5 7 8 10 11 13
f(x) 48 100 294 ? 900 1210 2028
11. Estimate the functional values at x=1.5 and x=2.5 by using cubic Spline technique
x 0 1 2 3
y 1.5 4.5 9 25
1. By the method of least square, find the straight line that best fits the following data:
x 1 2 3 4 5
y 14 27 401 55 68
2. The following table gives the heights, x(cm) and weights, y(kg) of five persons.
x 175 165 160 155 145
y 68 58 55 52 48
Assuming the “linear relationship” between x and y, obtain the regression line (x on y). Also obtain ‘x’
value for y = 40.
3. For the following set of data, fit a parabolic curve using Least Square Method and find f(2).
xi 0.5 1 1.5 4.5 6.5 7.5
f(xi) 2.5 2.7 3.5 6.5 8.4 9.5
6. Fit a power curve of the form � = ��� 𝑏�� to the following data:
x 0 1 2 3
y 10.5 2.15 3.85 8.30
7. From the following experimental data, it is known that the relation connects v and t as 𝑣 =
��� 𝑏 . Find the possible values of a and b.
v 350 400 500 600
t 61 26 7 2.6
8. The voltage v across a capacitor at time t seconds is given in following table. (**)
Time t(sec) 0 2 4 6 8 1
If the relationship between voltage v and time t is of the form 𝑣 = ��� . Using least-
Voltage v 150 63 28 12 5.6 1
𝑘��
square
approximation estimate the temperature at t = 2.6 minutes.
9. The following table shows the pressure and specific volume of dry saturated steam.
V 38.4 20 8.51 4.44 3.03
10. The growth of bacteria (N) in a culture after t hours is given by the following table.
Time t(hr) 0 1 2 3 4 5
1 2� − 2 3�2 − 6� 3 4� − 18�2 + 3
�� �� = ℎ [∆�0 1 ∆ �0 + 2 ∆ �0 22� − 6 ∆4 �0 + ⋯ ]
��
= +
��
�� �� 2 + 6 + 24
�2� 3 12�2 − 36� + 224
1
= 2 ( ) �0 + (� − �0 ∆ �0 + ⋯ ]
� �� ��
�� 2 1) ∆ + 24
= 2 [∆
�� ��
�� ℎ
Similarly, for Backward Interpolation.
• Trapezoidal Rule:
𝑥𝑛
ℎ [(
∫ � �0 + ��� ) + 2(�1 + �2 + ⋯ + ���−1 )]
2
�� =
• Simpson’s 1/3 Rule: 𝑥0
𝑥𝑛
ℎ
∫ � �� = [(�0 + ��� ) + 2(�2 + �4 + ⋯ + ���−2 ) + 4(�1 + �3 + ⋯ +
3
𝑥0 ���−1 )]
• Simpson’s 3/8 Rule:
𝑥𝑛
3ℎ
∫ � [(�0 + ��� ) + 2(�3 + �6 + ⋯ + ���−3 ) + 3(�1 + �2 + �4 + �5 + ⋯ +
8
�� = ���−2 + ���−1 )]
𝑥0
ℎ 4��2
• Romberg Integration:
�𝑖���, ��1 (ℎ), ��2 (ℎ/2)
−
�ℎ�� ��3 (ℎ, ) =
2 ��1
3
• Gaussian Integration: ∫ �(�) �� = )+𝑊 )+⋯
1
−1 𝑊 �(� 1 (� 1 2 2
1 1
�
��� � = 2, 𝑊1 = 𝑊2 = 1, �1 = − , �2 =
√3 √3
8
5
��� � = 3, 𝑊1 = , 𝑊2 = 𝑊3 = , �1 = 0, �2 = −√0.6, �3 =
9 9
√0.6
(� − (� +
��� 𝐼 = ∫ �(�)�� , �)
�
�)
��������� ����ℎ � = �+
2 2
�
NUMERICAL DIFFERENTIATION
NUMERICAL INTEGRATION
4. Evaluate ∫
2 𝑥
−2 ��+2���� 𝑥 by using Trapezoidal, Simpson’s 1/3 and 3/8 rule with n = 6.
5. The velocity ‘v’ of a particle at a distance ‘s’ from a point on its path is given by the following table.
s (metre) 0 10 20 30 40 50 60
v (metre/sec) 47 58 64 65 61 52 38
Estimate the time taken to travel 60 metres by using Simpson’s 1/3 rule and Simpson’s 3/8 rule.
2
�� �� +
∫ 0
s in 𝑥
6. Use Romberg’s method, to compute �� correct up to two decimal places.
1+�� 2
7. Use Romberg integration to find the solution correct up to three decimal places. (**)
1
1
𝐼=∫
1 + �2
��
0
3. Evaluate the integral 𝐼 = 0∫ exp ( ) �� using Gauss quadrature formula with n = 2 and n =
10
1+�� 2
8.
9. Evaluate ∫51
𝑥
�� by using Gaussian integration formula for n = 3 and compare the value with exact
solution.
1. Using forward interpolation formula, derive differentiation formula for the first and second derivative
of a function f(x).
𝑎���
�� 2 � �
2. From the following table of values of x and y, obtain for x = 1.2.
�� 2
��
∫
2
Take n = 6. 0
10. Evaluate the integral 𝐼 = ∫ 2 (1 + 3 cos 2��) ���. Compare the result in both conditions for Simpson
𝜋
0
1/3
and 3/8 rule.
11. Estimate the following integral by
i. Simpson’s 3/8 method
ii. Simpson’s 1/3 method and compare the result
�� ) �𝑥 by i.
0
Trapezoidal rule.
ii. Simpson’s 3/8 rule, taking number of intervals (n) = 6.
𝜋
2
cos
𝑥
∫
�𝑥
√1 + sin
𝑥
0
3𝜋
3. Use Romberg’s integration to evaluate ∫ 2
� 𝑥 sin 𝑥 �𝑥 correct to two decimal places.
0
4. Use Romberg’s integration to evaluate ∫5.2
4
log 𝑥 �𝑥 correct to two decimal places.
5. Using three-point Gaussian Quadrature formula, evaluate
1
𝑥
�
∫
1+
𝑥
0
∫20 𝑥 + �𝑥 by using Gaussian Integration formula for n = 2, n = 3 and compute their
2
1+(��+1)4
6. Evaluate
values with exact solution.
𝜋
�𝑥 using Gauss quadrature formula for n = 2 and n = 3.
cos 𝑥
7. Integrate the given integral 0∫2
√1+sin 𝑥
8. Compute the integral using Gaussian 3-point formula.
5
� 𝑥 + sin 𝑥
∫ �𝑥
1 + �� 2
2
9. Use Gauss-Legendre 2-point and 3-point formula to evaluate
1.5
∫
2
�𝑥
� ��
0.5
10. Evaluate the following integral using Gaussian 2 and 3 points formula.
10
1
∫
(− )
1+��2
�𝑥
�
KEY POINTS
• Gauss Elimination Method: Convert coefficient matrix into Upper-Triangular matrix and use back
1 ��12 0
Dolittle Algorithm Crout Algorithm Cholesky Algorithm
1 0 ��11
0 0 0 0
��11 � � � �
��12 ��13
𝐴 = [𝑙21 𝑙22 0 ] [0 1 𝑢23 ] 𝐴 = [�
��13
0 𝑢23 ]
� = [0𝑙]21[0
𝐴 1
� 0�] ][
��22
• Power Method: �𝑿 = 𝝀𝑿
Gauss-Jacobi uses same value for the whole iteration while Gauss-Seidel uses most recent value.
Put initial approximation 𝑋 = [1 1 1]𝑇 in 𝐴�� and factor out the largest value.
1. Solve the following system of equations by applying Gauss Elimination Method (GEM) with partial
2� + 2� + � = 6, 4� + 2� + 3� = 4,
pivoting technique. And, also determine the determinant value.
�−�+�=0
2. Solve the following system of equations using Gauss elimination method. (Use Partial pivoting if
3� + 2� + 7� = 32, 2� + 3� + � = 40,
3. Solve the following set of equations by using LU decomposition method.
3� + 4� + � = 56
3� + 2� + � = 10, 2� + 3� + 2� = 14,
4. Using Dolittle LU decomposition method, solve the following system of equations: (***)
� + 2� + 3� = 14
3� + 2� + � = 10, 2� + 3� + 2� = 14,
5. Solve the following set of equations by using LU Crout method.
� + 2� + 3� = 14
6. Solve the system 3�1 + 2�2 + �3 = 14, 2�1 + 3�2 + 2�3 = 14, �1 + 2�2 + 3�3 =
14 by using
Cholesky method.
− 3� + 20� = 25
8. Use Gauss-Seidel iteration method to solve
2� + � + � = 5, 3� + 5� + 2� = 15,
4
2� + � + 4� = 8
2 −1 0
9. Find the largest eigenvalue and the corresponding eigen vector correct up to three decimal places using
4�1 + 5�2 − 6�3 = 28, 2�1 − 7�3 = 29, −5�1 − 8�2 = −64
1. Use Gauss Elimination method to solve the equations. Use partial pivoting method where necessary.
2. Solve the following system of equations by the process of Gauss elimination (Use partial pivoting if
3� + 2� = � = 10, 2� + 3� + 2� = 14,
necessary)
� + 2� + 3� = 14
3. What is a pivotal element? Solve the following system of linear equations by using Gauss-elimination
� + � + � + � = 2, �+�+
method with partial pivoting technique.
3� − 2� = −6,
2� + 3� − � + 2� = 7, � + 2� +
� − � = −2
4. Write a program in any high level language (C or C++) to solve a system of linear equations, using
3� +
4� + � = 7
� + � + � = 4, � + 4� + 3� = 0,
7. Solve the following system of equations using Crout method.
� + 6� + 2� = 6
2� + 3� + � = 9, � + 2� + 3� = 6,
8. Solve the following system of equations using Factorization method.
3� + � + 2� = 8
5� − 2� + � = 4, 7� + � − 5� = 8,
9. Solve the following set of equations using LU factorization method:
3� + 7� + 4� = 10
2� − 3� + 10� = 3, −� + 4� + 2� = 20,
10. Solve the following system of equations by using Crout’s algorithm.
5� + 2� + � = −12
3� + 2� + � = 10, 2� + 3� + 2� = 14,
11. Solve the following set of equations using Cholesky method.
� + 2� + 3� = 14
+ 10�2 + 3�3 = 27
� + 3� + 2� = 19, 3� + 2�
14. Solve the following using Gauss Seidel method.
+ 2� = 20,
Nepal Engineering Numerical
ASSIGNMENT
� + 4� + 2� = 17, −2� + 2�
4A
+�+� =9
− 10� + 3� = −3
+ 15� + 2� = 72
6�1 − 2�2 + �3
17. Find the solution of the given simultaneous linear equation using Gauss Seidel method.
= 11
−2�1 + 7�2 +
2�3 = 5
�1 + 2�2 − 5�3
= −1
18. Write a program to solve a system of linear equations by using Gauss Seidel method.
Determine the largest Eigen value and corresponding Eigen vector for the matrix using power method correct
up to 3-decimal places.
3 1 1 2 −1 0 25 1
[1 4 2] 2. [−1 2 −1] 3. [ 1 3
1 2 5 0 −1 2 2 0
1.
1 4 4 5 0 1 1
(****)
[4 1 8] 5. [0 −2 0] 6. [4
4 8 1 1 0 5 6
4.
1 3 −1 15 −4 −3 4
[ 3 2 4 ] 8. [−10 12 −6] 9. [
− 1 4 10 −20 4 −2 2
7.
3 1 4 1 2 0
(**) (**)
10. [1 2 3] 11. [2 1 0 ]
4 3 5 0 0 −1
= ��(�, = + × , )+ , �� )]
𝒅� 𝒉 �
�) ⇒ � �� [��(� � ��(�
• Modified Euler Method:
�
𝒅� �
� �
��1 = ℎ� (�0 , �0 )
• RK-2 Method • RK-4 Method
��1 = ℎ� (�0 , �0 )
𝑘2 = ℎ� (�0 + ℎ, �0 𝑘2 = ℎ� (�0 + ℎ/2, �0 + ��1 /2)
+ ��1 ) 𝑘3 = ℎ� (�0 + ℎ/2, �0 + 𝑘2 /2)
1 𝑘4 = ℎ� (�0 + ℎ, �0 + 𝑘3 )
∴ �1 = �0 + [��1 1
2 ∴ �1 = �0 + [��1 + 2𝑘2 + 2𝑘3 + 𝑘4 ]
+ 𝑘2 ] 6
• For higher order differential equations, convert into a system of simultaneous first order differential
equations and use any suitable method.
• For boundary value problem, convert into an initial value problem using shooting method and solve
=
��2 − ��0 ��1 − ��0
� (1)−�(�� 0 ; 1) �(��1 ; 1)−�(��0 ; 1)
by any suitable method.
approximations).
= � + sin �, with �(0) = 1 in the interval 0 ≤ � ≤ 1. Take ℎ =
��
0.2.
2. Using Euler’s method, solve
�
�
3. Using the Euler’s (RK 1st order method) find an approximate value of y corresponding to x=1, given
that ��/�� = � + � and y = 1. When x =0, h =0.1.
4. Use Runge-Kutta of order second to find the solution of the given differential equation at x=1.5 taking
a step size of h=0.25.
+ 2� = � 2 ,
��
� ( 1) = 5
�
�
=
2�� +�
= 1, = 0.
�� 𝑥
5. Using the RK method of fourth order, solve for y at x = 1.2, 1.4 from
given � � 2 +�� 𝑥
� 0 0
6. Using Runge-Kutta method of second order (RK-2), obtain a solution of the equation � = � + ��′ with
′′
��
initial condition �(0) = 1, �’(0) = 0 to find �(0.2) and �’(0.2), taking h = 0.1
7. Apply RK-4 method to solve �(0.2) for the given equation.
�2�
+� − � = 0 �𝑖��𝑛 ��ℎ𝑎�� � = 1 𝑎��� =0
�� ��
2
�ℎ��� � = 0.
�� �� ��
8. Solve the Boundary Value Problem (BVP) using Shooting method by dividing into four sub-interval
Nepal Engineering Numerical
CHAPTER
5
� ′′ + 2� ′ −
employing Euler’s method.
�=�
Subject to boundary condition �(1) = 2 and �(2) = 4
4. Using the RK 1 order method, find an approximate value of y corresponding to x = 1, given that�� =
�
st ��
�−�
�+�
and y = 1 when x = 0 and h = 0.02.
5. Write a program in any higher level language for solution of ordinary differential equation using Euler’s
6. Solve the differential equation � ′ = � + sin � using RK-2 method within 0 ≤ � ≤ 0.2
method.
7. Solve the differential equation � ′ = � + � using RK-2 method within 0 ≤ � ≤ 0.2 with initial
with initial condition y(0) = 2 and step size h = 0.1
condition
y(0) = 1 and step size h = 0.1
8. Use the Runge-Kutta 4th order method to solve 10 = � 2 + � 2 , �(0) = 1 for the interval 0 ≤ �
��
≤ 0.4 �
�
10. Apply Runge-Kutta fourth order method to find an approximate value of y when x = 0.3 given that: � ′ =
2.5� + � 0.3� ; with an initial y(0) = 1, taking h = 0.3
11. Solve the differential equation � ′ = � − using appropriate method within 0 ≤ � ≤ 0.2 with
2�
initial
condition �(0) = 1 and step size h=0.1
�
1. Using Runge-Kutta second order method, solve the differential equation � ′′ = �� ′ − �; �(0) =
3,
� ′ (0) = 0 𝑓�𝑟 � = 0, 0.2, 0.4
2. Using RK-4 method, solve the equation for �(0.2). Given + 2� − 3� = 6� with
2 𝑑 𝑑�
� ( 0) =
�
𝑑�
0, � (0) = 1, ℎ =
′ �2
��
0.1
3. Solve the given differential equation by RK-4th order method � ′′ − � 2 � ′ − 2�� = 0
with initial condition �(0) = 1, � ′ (0) = 0, for y(0.1) taking h = 0.1
=𝑑 � − � given that 𝑑� = 0 when x=0.
𝑑2 � 𝑑� 𝑑�
��� 2
4. Use RK-4 method to find y(0.2) for y=1 and
2
𝑑 𝑑� 𝑑�
+� − � = 0 given that y=1 and
�
=
�
5. Apply RK-4 method to solve y(0.2) for the given equation
𝑑 𝑑�
0 when x=0. (Assume h=0.2) �2
��
�
6. Solve the given differential equation by RK-4th order method � ′′ − �� ′ + � = 0 with initial condition
�(0) = 3, � ′ (0) = 0 𝑓�𝑟 �(0.2) taking h = 0.2
7. Solve the following differential equation within 0 ≤ � ≤ 0.5 using RK 4th order method. 10 +
2 𝑑 �
��� 2
2 𝑑� − 4� = 5, �(0) = 0, � ′ (0) = 0. Take h=0.25
𝑑�
8. Solve the following differential equation within 0 ≤ � ≤ 0.5 using RK 4th order method. 20 +
2 𝑑 �
��� 2
2 𝑑� − 4� = 5, �(0) = 0, � ′ (0) = 0. Take h=0.25
𝑑�
9. Solve the boundary value problem � ′′ (�) = �(�), �(0) = 0 𝑎�𝑑 �(1) = 1.1752 by shooting
10. Give the boundary value problem: � ′′ = 6� with y(1)=2 and y(2)=9. Solve it in the interval (1,2) by
using RK method of second order (take h=0.5 and guess value=3.25)
11. How can the shooting method be used to solve boundary value problems. Explain each step of the
algorithm with a suitable example.
��−1,� �
�� = = , �� =
𝜕� = 2𝑘
�
2ℎ
𝟏 𝟏
• Standard 5-point formula • Diagonal 5-point formula
���,� = [���+��,� + ���−��,� + ���,�+𝟏 + ���,�−�� ]
𝟒
���,� = [���−��,�−𝟏 + ���+��,�+𝟏 + ���−��,�+𝟏
𝟒
+ ���+,�−�� ]
1. Given the Poisson’s equation: ∇2 � = −10(� 2 + � 2 + 5) over the square domain such that 0
≤ � ≤ 3 and 0 ≤ � ≤ 3 with Dirichlet boundary condition of �(�, �) = 0.
iteration. Assume ℎ = 𝑘 = 1.
Calculate the steady state temperatures at interior points by using Gauss-Seidel method upto 5th
2. Torsion on a square bar of size 9cm*9cm subjected to twisting is governed by: ∇2 � = −4, with Dirichlet
boundary condition of �(�, �) = 0 and ℎ = 1. Calculate the steady state temperatures at interior
points. Assume a grid size of 3cm*3cm. Iterate until the minimum difference at any point is correct
up to two decimal places by applying Gauss-Seidel method.
m using � = � = 4. Two adjacent boundaries are held at 00C, and the heat on the other
3. Determine the steady-state heat distribution in a thin square metal plate with dimensions 0.5 m by 0.5
boundaries increases linearly from 00C at one corner to 1000C where the sides meet.
Nepal Engineering Numerical
CHAPTER
4. Solve the parabolic equation 2𝑓�� (�, �) = 𝑓𝑡 (�, �) 0 ≤ � ≤ 1.5 and given initial condition
6
��(�, 0) =
50(4 − �), 0 ≤ � ≤ 4 with boundary condition ��(0, �) = 0 =
��(4, �) 0 ≤ � ≤ 1.5
2. Solve the elliptic equation ���� + ���� = 0 over a square mesh of side four units satisfying
1. What is boundary value problem? Derive Laplace five-point formula.
��� 2
following PDE:
Subdivide the region into nine equal squares to form a mesh and find the values of 𝜙 in the
���
8. Solve the Poisson equation ∇2 𝑓 = 2� 2 � 2 , over the square domain 0 ≤ � ≤ 3, 0 ≤ � ≤ 3, with f=0
successive values at any point is correct to two decimal places.
on
9. Solve the equation ∇2 � = −10(� 2 + � 2 + 10) over the square mesh 0 ≤ � ≤ 3, 0 ≤ � ≤ 3 with
the boundary and h=1. (**)
�=0
on the boundary and mesh length ℎ = 𝑘 = 1 (**)
10. Solve the Poisson equation ∇2 𝑓 = � 2 � + 2, over the square domain 0 ≤ � ≤ 3, 0 ≤ � ≤
3, with f=0 on the boundary and h=1.
11. Torsion on a square bar of size 15cm*15cm. If two sides of the sides are held at 1000C and the other
two sides are held at 00C. Calculate the steady state temperature at interior points. Assume a grid size of
12. Solve the parabolic equation 2𝑓�� (�, �) = 𝑓𝑡 (�, �) 0 ≤ � ≤ 1.5 and given initial condition
5cm*5cm.
��(�, 0) =
50(4 − �), 0 ≤ � ≤ 4 with boundary condition ��(0, �) = 0 = ��(4, �) 0 ≤ � ≤ 1.5