Chapter 4
Numerical Method
TU BCA past exam questions
Past questions and answers
59 questions set from this chapter, 2 of them more than once; 5 are most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.
- Most repeated · 4 of 8 exams
- Asked 3 times
- 2020 · 5 marks
- 2021 · 5 marks
- 2025 · 5 marks
Solve the Poisson equation over the square domain and with on the boundary and .
Similar questions: Solve the Poisson equation $\Delta^2 f = (2022)
Answer
With the interior grid points are . Let . All boundary values are .
The five-point formula is
Right-hand sides: .
Equations 2 and 3 give . Then
From the first, . In the second, . From the third, , so .
Hence
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 4 of 8 exams
- 2022 · 5 marks
Solve the Poisson equation over the square domain with
Similar questions: Solve the Poisson equation $\nabla^2 f = (2025)
Answer
With the interior grid points are . Let . All boundary values are .
The five-point formula is
Right-hand sides: .
Equations 2 and 3 give . Then
From the first, . In the second, . From the third, , so .
Hence
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 8 exams
- 2020 · 5 marks
Solve the following set of equations using Gauss-Jordan Method.
Similar questions: Solve the following set of linear equations (2026) · Solve the following equations by using Gauss-Jordan (2024)
Answer
The second equation is read as .
Augmented matrix:
Swap to get a pivot of 1:
:
:
:
gives . Then :
Check in the first equation: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 8 exams
- 2024 · 5 marks
Solve the following equations by using Gauss-Jordan method.
2x+3y+4z=5 3x+4y+5z=6 4x+5y+6z=7
Similar questions: Solve the following set of equations using (2020) · Solve the following set of linear equations (2026)
Answer
:
:
:
:
The rank of and of the augmented matrix are both , so the system is consistent but has infinitely many solutions. Taking :
Check in the first equation: . ✓ (For example gives and gives .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Most repeated · 3 of 8 exams
- 2026 · 5 marks
Solve the following set of linear equations using Gauss Jordan method:
x + y + z = 6
2x + 3y + z = 10
x + 2y + 3z = 13
Similar questions: Solve the following set of equations using (2020) · Solve the following equations by using Gauss-Jordan (2024)
Answer
Augmented matrix:
, :
Eliminate above and below the second pivot: , :
gives . Then , :
Solution: . Check: , , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2021 · 10 marks
- 2023 · 10 marks
Write an algorithm and program to compute root of nonlinear equation using bisection method.
Answer
Bisection method. If is continuous on and , a root lies in . Repeatedly halve the interval and keep the half where the sign change persists.
Algorithm
- Define . Read , , tolerance and maximum iterations .
- If , print "invalid interval" and stop.
- Repeat for to :
- .
- If or , print as the root and stop.
- If set , else set .
- Print as the approximate root.
Program (C)
#include <stdio.h>
#include <math.h>
double f(double x) {
return x * x * x - 4 * x + 1; /* change as required */
}
int main() {
double a, b, c, eps;
int i, maxit;
printf("Enter a, b, tolerance and max iterations: ");
scanf("%lf %lf %lf %d", &a, &b, &eps, &maxit);
if (f(a) * f(b) > 0) {
printf("Root is not bracketed in [a, b]\n");
return 1;
}
for (i = 1; i <= maxit; i++) {
c = (a + b) / 2;
printf("Iter %d: c = %.6f, f(c) = %.6f\n", i, c, f(c));
if (f(c) == 0 || (b - a) / 2 < eps)
break;
if (f(a) * f(c) < 0)
b = c;
else
a = c;
}
printf("Approximate root = %.6f\n", c);
return 0;
}
The number of iterations needed for error below is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Why is the study of errors important to a computational scientist? Differentiate between inherent and numerical errors.
Answer
Why errors matter. Almost every numerical computation gives an approximate answer. A computational scientist must know where the error comes from, how large it is and how it grows, because:
- the reliability of a result depends on its error bound; a result without an error estimate is of little use;
- errors can accumulate over thousands of operations and make a stable-looking program give nonsense;
- it guides the choice of algorithm, step size, number of iterations and precision needed;
- it tells us when to stop an iterative method (tolerance) and how to avoid ill-conditioned or unstable formulations.
Inherent errors are errors already present in the input data before the computation begins. They arise from measurement limits, imperfect instruments, or from the mathematical model/data being approximated (for example taking or a measured length of cm). Their size is fixed by the data and cannot be reduced by a better algorithm, only by better data.
Numerical errors are introduced by the computation itself. They consist of:
- Round-off error: caused by representing numbers with a finite number of digits, e.g. .
- Truncation error: caused by replacing an infinite process by a finite one, e.g. cutting a Taylor series after a few terms or replacing a derivative by a finite difference.
| Inherent error | Numerical error |
|---|---|
| Present in the data before the calculation | Arises during the calculation |
| Due to measurement / modelling | Due to round-off and truncation |
| Cannot be reduced by the method | Can be reduced by a better method or higher precision |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Find the root of equation using bisection method where root lies between 5 and 6.
Answer
Let .
At the given end points and . There is no sign change, so no root lies in (the actual roots are ). The bisection method needs a sign change, so the interval is corrected to , where and .
Midpoint ; keep the half in which the sign changes.
| n | a | b | c | f(c) |
|---|---|---|---|---|
| 1 | 1 | 2 | 1.5 | -1.7500 |
| 2 | 1.5 | 2 | 1.75 | 0.0625 |
| 3 | 1.5 | 1.75 | 1.625 | -0.8594 |
| 4 | 1.625 | 1.75 | 1.6875 | -0.4023 |
| 5 | 1.6875 | 1.75 | 1.71875 | -0.1709 |
| 6 | 1.71875 | 1.75 | 1.734375 | -0.0544 |
| 7 | 1.734375 | 1.75 | 1.7421875 | 0.0040 |
| 8 | 1.734375 | 1.7421875 | 1.73828 | -0.0253 |
The root is approximately (exact value ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Find the square root of 3,5 using second order Lagrange interpolation polynomial using the following data table.
Answer
The table is , so we want . For second order (three points) Lagrange interpolation choose the points nearest to : with .
At :
(check: )
So (true value ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Write a program to calculate the integral using Trapezoidal Rule.
Answer
Trapezoidal rule: divide into equal parts of width :
Program (C) for with as an example function:
#include <stdio.h>
#include <math.h>
double f(double x) {
return x * x + 1; /* change to the required function */
}
int main() {
double a, b, h, sum, result;
int n, i;
printf("Enter lower limit a, upper limit b: ");
scanf("%lf %lf", &a, &b);
printf("Enter number of sub-intervals n: ");
scanf("%d", &n);
h = (b - a) / n;
sum = f(a) + f(b);
for (i = 1; i < n; i++)
sum += 2 * f(a + i * h);
result = (h / 2) * sum;
printf("Integral = %.6f\n", result);
return 0;
}
For the program prints (exact ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Use classical Runge-Kutta method to estimate when with and .
Answer
Here , , , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 10 marks
a) Factorize the matrix Using Cholesky's method.
b) Locate the root of equation using the fixed point method.
Answer
(a) Cholesky's method factorizes a symmetric positive definite matrix as . First check the pivots.
The second leading minor is , so is not positive definite and a real Cholesky factor does not exist. It can be completed only with complex entries, :
(Sign of : .)
Equivalently, in real arithmetic, with The negative entry in confirms is indefinite.
(b) (roots and ). Rewrite in the form :
Convergence needs near the root: , and , so the iteration converges to . (The form has and diverges.)
Take and iterate :
| n | |
|---|---|
| 1 | 1.22474 |
| 2 | 0.88049 |
| 3 | 1.05807 |
| 4 | 0.97053 |
| 5 | 1.01463 |
| 6 | 0.99266 |
| 7 | 1.00366 |
| 8 | 0.99817 |
| 9 | 1.00092 |
| 10 | 0.99954 |
The values oscillate about and approach , so the root is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 10 marks
Given the data points:
012
234
4916
Estimate the function value at using cubic splines.
Answer
Data: , with . Use the natural cubic spline (), where .
For the interior node:
On :
At :
So (the true value of is ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
Compute the root of equation in the vicinity of using Newton-Raphson method.
Answer
. Newton-Raphson formula:
Start with : .
| n | ||||
|---|---|---|---|---|
| 0 | 5 | 6 | 5 | 3.8 |
| 1 | 3.8 | 1.44 | 2.6 | 3.2462 |
| 2 | 3.2462 | 0.3098 | 1.4923 | 3.0406 |
| 3 | 3.0406 | 0.0446 | 1.0812 | 3.0015 |
| 4 | 3.0015 | 0.0015 | 1.0030 | 3.0000 |
The iteration converges to the root (the other root of is ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
Write an algorithm to compute integration using Simpson's 1/3 rule. Evaluate integration of using Simpson's 1/3 rule.
Answer
Algorithm (Simpson's 1/3 rule)
- Read , and an even number of sub-intervals .
- Compute .
- Set .
- For : compute ; if is odd add to , otherwise add .
- Result .
- Print and stop.
Evaluation: , , , take , .
| x | 0 | 0.75 | 1.5 | 2.25 | 3 |
|---|---|---|---|---|---|
| f(x) | -5 | -1.8125 | 4.75 | 14.6875 | 28 |
| weight | 1 | 4 | 2 | 4 | 1 |
Exact value: . Simpson's rule is exact for polynomials up to degree 3, so the result is exact.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
What is meant by ill-conditioned system? Find the Cholesky decomposition of the following matrix:
Answer
Ill-conditioned system. A linear system is ill-conditioned if a very small change (or rounding error) in the coefficients or the right-hand side produces a large change in the solution. The coefficient matrix is then nearly singular: its determinant is close to zero relative to its entries and its condition number is very large. Such systems give unreliable answers even with a stable algorithm.
Cholesky decomposition (valid since is symmetric positive definite: leading minors ):
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
Use the classical RK method to estimate of the equation with , assume .
Answer
, , . Two steps are needed.
Step 1 ():
Step 2 ():
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
Write a short note on (Any Two):
a) Types of Errors
b) Convergent Methods
c) PDE
Answer
(a) Types of Errors
Errors in numerical computation are of the following kinds.
- Inherent (data) errors: present in the input data because of measurement or modelling limits.
- Round-off errors: arise because computers store numbers with a finite number of digits, e.g. .
- Truncation errors: arise when an infinite process is replaced by a finite one, e.g. stopping a Taylor series after terms.
- Blunders/gross errors: human mistakes such as wrong data entry or wrong formula.
They are measured as absolute error , relative error and percentage error .
(b) Convergent Methods
An iterative method is convergent if the sequence approaches the true root as , i.e. . For fixed-point iteration, convergence is guaranteed if near the root. The speed is described by the order of convergence : . Bisection converges linearly () but always, Secant has and Newton-Raphson has (quadratic). Methods that do not satisfy these conditions diverge or oscillate.
(c) PDE
A partial differential equation contains the partial derivatives of an unknown function of two or more independent variables. The common second order linear types are:
- Elliptic (Laplace , Poisson ),
- Parabolic (heat equation ),
- Hyperbolic (wave equation ).
Numerically they are solved by replacing derivatives by finite differences on a grid, e.g. , and solving the resulting algebraic equations.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 10 marks
a) Solve the following system of equations using Gauss-Seidel method:
2x - 7y - 10z = -17
5x + y + 3z = 14
x + 10y + 9z = 7
b) Write an expansion of Taylor’s Theorem. Solve the equation: for using Taylor method.
Answer
(a) Gauss-Seidel method
The system is not diagonally dominant in the given order, so rearrange the equations (second equation first for , third for , first for ):
Start with and always use the latest values.
| Iter | x | y | z |
|---|---|---|---|
| 1 | 2.8000 | 0.4200 | 1.9660 |
| 2 | 1.5364 | -1.2230 | 2.8634 |
| 3 | 1.3266 | -2.0097 | 3.3721 |
| 4 | 1.1787 | -2.4528 | 3.6527 |
| 5 | 1.0989 | -2.6973 | 3.8079 |
| 6 | 1.0547 | -2.8326 | 3.8938 |
| 8 | 1.0167 | -2.9488 | 3.9675 |
| 12 | 1.0016 | -2.9952 | 3.9970 |
The iterates converge (slowly, because the dominance is weak) to the exact solution
Check: , , .
(b) Taylor's theorem
For , :
At :
Including further terms ( term , and so on) the sum rises slowly and settles near , so .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
If the true value of π is 3.1415926 and its approximate value is given by 3.1428571. Find the absolute and relative errors.
Answer
True value , approximate value .
Absolute error
Relative error
Percentage error .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
What are the advantages of Lagrange's formula over Newton's formula? When Newton's forward interpolation formula is used?
Answer
Advantages of Lagrange's formula over Newton's formula
- It works for unequally spaced as well as equally spaced data, whereas Newton's forward/backward formulas need equal spacing (Newton's divided difference formula handles unequal spacing but needs a table).
- No difference table has to be built; the formula is written directly from the data points.
- The data points can be taken in any order, and the formula is symmetric in .
- It can also be used for inverse interpolation (interchange the roles of and ).
Its drawback is that adding a new data point forces the whole polynomial to be recomputed, which Newton's formula avoids by just adding one more term.
Newton's forward interpolation formula is used when:
- the values of are equally spaced, , and
- the point at which is required lies near the beginning of the table (the first few values), so that is small.
(For points near the end of the table, Newton's backward formula is used.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
Find the polynomial that interpolates f(0) = 0, f(1) = 1, f(2) = 0, f(3) = 1, f(4) = 0 using Newton divided differences. Use the Newton table to generate the necessary divided differences.
Answer
Divided difference table for and :
| 1st | 2nd | 3rd | 4th | ||
|---|---|---|---|---|---|
| 0 | 0 | ||||
| 1 | |||||
| 1 | 1 | -1 | |||
| -1 | 2/3 | ||||
| 2 | 0 | 1 | -1/3 | ||
| 1 | -2/3 | ||||
| 3 | 1 | -1 | |||
| -1 | |||||
| 4 | 0 |
(For example, the 3rd difference at the top is , and the 4th is .)
Newton's divided difference polynomial:
Expanding:
Check: , , , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
Using the trapezium rule, evaluate the integral with 2 and 4 sub intervals. Compare with the exact solution. Comment on the magnitudes of the errors obtained.
Answer
, , .
Exact value: , so
n = 2, h = 0.5:
n = 4, h = 0.25:
Errors
| n | Trapezoidal value | Error |
|---|---|---|
| 2 | 0.077442 | 0.000670 |
| 4 | 0.076940 | 0.000168 |
Comment: Halving reduces the error by about a factor of 4 (), which agrees with the error of the trapezoidal rule. More sub-intervals therefore give a more accurate result.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
For solving a linear system, compare Gauss elimination method and Gauss Jordan method. Why Gauss Seidel method is better than Jacobi's iterative method?
Answer
Gauss elimination vs Gauss-Jordan
| Gauss elimination | Gauss-Jordan |
|---|---|
| Reduces the matrix to upper triangular form | Reduces it to diagonal/identity form |
| Needs back substitution to get the unknowns | Solutions read directly; no back substitution |
| Fewer operations (about ) | More operations (about ) |
| Preferred for solving a single system | Convenient for finding the matrix inverse |
| Elimination only below the pivot | Elimination above and below the pivot |
Both are direct methods and need pivoting for stability.
Why Gauss-Seidel is better than Jacobi
In Jacobi's method every new value is computed only from the old iterate . In Gauss-Seidel the newly computed values are used immediately in the same iteration:
Hence it usually converges about twice as fast (fewer iterations for the same accuracy), and it needs only one vector of storage because values are overwritten in place, while Jacobi must keep both the old and new vectors.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
Using Euler's method find y(0.2) from with h = 0.
Answer
The step size is cut off in the question; take . Euler's method: with , , .
Step 1: at
Step 2: at
(Exact solution gives , so the Euler error is about .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 10 marks
When would we not use N-R method? Find the root of the equation lying in (0, 1) using Bisection method performing 10 iterations.
Answer
When N-R method is not used (or fails)
- when at or near the root or at an iterate (division by zero, or a huge step);
- when is very small (nearly flat curve), so the iterates fly far from the root;
- when is not differentiable, or is difficult/expensive to compute;
- when the initial guess is poor, so the iterates diverge, oscillate or cycle (for example near a local maximum/minimum or an inflection point);
- for multiple roots, where convergence drops from quadratic to linear.
In such cases a bracketing method such as bisection (or regula falsi, secant) is safer.
Bisection for on
, so a root lies in .
| n | a | b | c | f(c) |
|---|---|---|---|---|
| 1 | 0 | 1 | 0.5 | -0.8750 |
| 2 | 0 | 0.5 | 0.25 | 0.0156 |
| 3 | 0.25 | 0.5 | 0.375 | -0.4473 |
| 4 | 0.25 | 0.375 | 0.3125 | -0.2195 |
| 5 | 0.25 | 0.3125 | 0.28125 | -0.1028 |
| 6 | 0.25 | 0.28125 | 0.265625 | -0.0438 |
| 7 | 0.25 | 0.265625 | 0.2578125 | -0.0141 |
| 8 | 0.25 | 0.2578125 | 0.2539063 | 0.0007 |
| 9 | 0.2539063 | 0.2578125 | 0.2558594 | -0.0067 |
| 10 | 0.2539063 | 0.2558594 | 0.2548828 | -0.0030 |
After 10 iterations the root lies in , so (the actual root is ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 10 marks
Find the dominant eigenvalue of by power method. Apply Gauss Seidel method to solve system of equations:
6x1 − 2x2 + x3 = 11;
-2x1 + 7x2 + 2x3 = 5;
x1 + 2x2 − 5x3 = −1,
with the initial vector of (0, 0, 0).
Answer
Power method for
Start with . At each step compute , take the largest component as the eigenvalue estimate and divide by it.
| k | |||
|---|---|---|---|
| 1 | (5, 9) | 9 | (0.5556, 1) |
| 2 | (4.1111, 6.7778) | 6.7778 | (0.6066, 1) |
| 3 | (4.2131, 7.0328) | 7.0328 | (0.5991, 1) |
| 4 | (4.1981, 6.9953) | 6.9953 | (0.6001, 1) |
| 5 | (4.2003, 7.0007) | 7.0007 | (0.6000, 1) |
The estimates converge to the dominant eigenvalue with eigenvector . (Check: characteristic equation , roots and .)
Gauss-Seidel
The system is diagonally dominant:
Start with :
| Iter | |||
|---|---|---|---|
| 1 | 1.8333 | 1.2381 | 1.0619 |
| 2 | 2.0690 | 1.0020 | 1.0146 |
| 3 | 1.9982 | 0.9953 | 0.9978 |
| 4 | 1.9988 | 1.0003 | 0.9999 |
| 5 | 2.0001 | 1.0001 | 1.0001 |
| 6 | 2.0000 | 1.0000 | 1.0000 |
Solution: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 10 marks
Prepare the multi-step methods available for solving ordinary differential equations. Evaluate the value of y at x = 0.1 and 0.2 to 4 decimal places given using Taylor series method.
Answer
Multi-step methods for ODEs. A multi-step method computes using several previous values (a single-step method such as Euler or Runge-Kutta uses only ). The main ones are:
- Adams-Bashforth (explicit), e.g. 4th order:
- Adams-Moulton (implicit), e.g. 4th order:
- Milne's predictor-corrector: predictor , corrector .
- Adams-Bashforth-Moulton predictor-corrector, using the AB formula to predict and AM to correct.
They need only one new function evaluation per step but require starting values from a single-step method.
Taylor series solution of , :
At :
At :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Define error. Explain the Taxonomy Errors.
Answer
Error is the difference between the true (exact) value of a quantity and the approximate value obtained or used in a computation:
Absolute error is , relative error is absolute error divided by , and percentage error is relative error times .
Taxonomy (classification) of errors
- Inherent errors: errors in the input data, caused by limits of measurement or by approximating a physical problem by a mathematical model.
- Round-off errors: caused by the finite number of digits a computer or calculator can store; numbers are rounded or chopped, e.g. , . They can accumulate over many operations and cause loss of significance when nearly equal numbers are subtracted.
- Truncation errors: caused by replacing an infinite or exact mathematical process with a finite one, e.g. using only the first few terms of a Taylor series, or using a finite difference in place of a derivative. The size depends on the method (the step size ).
- Modelling errors: arise from simplifying assumptions made while forming the mathematical model.
- Blunders (gross errors): human or programming mistakes such as wrong data entry, wrong formula or wrong units; they can be avoided by checking.
Round-off and truncation errors together are called numerical errors.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Estimate the value of sin θ at 9 = 45° using Newton's backward difference formula from the following set of data.θ102030405060
Sin θ0.17360.34200.50000.64280.76600.8660
Answer
Equally spaced data with . The point is near the end of the table, so Newton's backward formula is used with :
Backward difference table:
| 10 | 0.1736 | |||||
| 20 | 0.3420 | 0.1684 | ||||
| 30 | 0.5000 | 0.1580 | -0.0104 | |||
| 40 | 0.6428 | 0.1428 | -0.0152 | -0.0048 | ||
| 50 | 0.7660 | 0.1232 | -0.0196 | -0.0044 | 0.0004 | |
| 60 | 0.8660 | 0.1000 | -0.0232 | -0.0036 | 0.0008 | 0.0004 |
With and the last entries of each column:
- , term
- , term
- , term
(The true value is .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Write an algorithm and program to calculate integration using Trapezoidal rule.
Answer
Trapezoidal rule:
Algorithm
- Define the function .
- Read the limits , and the number of sub-intervals .
- Compute .
- Set .
- For to : ; .
- Compute .
- Print and stop.
Program (C)
#include <stdio.h>
#include <math.h>
double f(double x) {
return 1.0 / (1.0 + x * x); /* change as required */
}
int main() {
double a, b, h, sum, I;
int n, i;
printf("Enter a, b and n: ");
scanf("%lf %lf %d", &a, &b, &n);
h = (b - a) / n;
sum = f(a) + f(b);
for (i = 1; i < n; i++)
sum = sum + 2 * f(a + i * h);
I = h / 2 * sum;
printf("Value of integral = %.6f\n", I);
return 0;
}
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
What is the form of resultant matrix using Gauss-Jordan method? Solve the following system of equations using Gauss-Jordan Method.
x + 2y - 3z = 4
2x + 4y - 6z = 8
x - 2y - 5z = 4
Answer
Form of the resultant matrix. In Gauss-Jordan elimination the augmented matrix is reduced by row operations until the coefficient part becomes the identity matrix, ; the last column is then the solution directly (no back substitution).
Solution of the system
:
Swap , then :
:
The rank is (the second equation is twice the first), so the system is consistent with infinitely many solutions. Let :
Check in the third equation: . ✓
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Define ordinary differential equation. Use the fourth order Runge-Kutta method to estimate y(0.4) of the equation: dydx=x2+y2 with y(0) = 0 assuming that h = 0.2
Answer
Ordinary differential equation (ODE): an equation that contains an unknown function of a single independent variable and its derivatives, e.g. . With a given value it is an initial value problem.
RK4 for , ,
Step 1 (): , , ,
Step 2 ():
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Solve for the steady state temperatures in a rectangular plate of 8cm x 10cm, if one 10cm side is held at 50°C, and the other 10cm side is held at 30°C and other two sides are held at 10°C. Assume grids of size 2cm x 2cm.
Answer
Take the plate with and (cm). The two 10 cm sides and are held at and ; the 8 cm sides and are at . With cm the interior points are and , giving 12 unknowns ( for , for ). The steady state satisfies Laplace's equation , i.e.
Boundary values: .
Examples of the equations:
and similarly for the others. Solving the 12 equations (by Gauss-Seidel iteration or elimination, starting with all values ):
| 29.69 | 36.09 | 36.09 | 29.69 | |
| 22.68 | 28.59 | 28.59 | 22.68 | |
| 22.42 | 27.00 | 27.00 | 22.42 |
The steady state temperatures are about , , , , , (symmetric about ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Write a short note on (Any Two):
a) Partial Differential Equations
b) Linear Interpretation
c) Boundary value problems
Answer
(a) Partial Differential Equations
A PDE relates an unknown function of two or more independent variables to its partial derivatives. The general second order linear form is classified by :
- elliptic (Laplace , Poisson ): steady state problems;
- parabolic (heat equation ): diffusion problems;
- hyperbolic (wave equation ): vibrations and wave propagation.
Numerically the region is covered by a grid and each derivative is replaced by a finite difference, e.g. . This gives a system of algebraic equations solved by Gauss-Seidel/Liebmann iteration, or by explicit and implicit (Crank-Nicolson) schemes for time-dependent problems.
(b) Linear Interpolation
Linear interpolation estimates a value between two known data points and by fitting a straight line through them:
It is the first order case of Lagrange/Newton interpolation. It is simple, but the error is large when the function is strongly curved or the points are far apart. Example: from and , .
(c) Boundary Value Problems
A boundary value problem is a differential equation whose conditions are given at two or more points (the boundaries) rather than at a single starting point, e.g. with . Unlike initial value problems it cannot be marched forward step by step. Methods used:
- Shooting method: guess the missing initial slope, solve as an IVP and adjust the guess until the far boundary condition is met;
- Finite difference method: replace derivatives by differences at grid points, giving a (tri-diagonal) linear system which is solved directly.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 10 marks
a) Fit a straight line to the following set of data using Least Square Regression.
b) Apply the factorization method (any) to solve the equations:
2x + 3y + 7z = 4
2x + 3y + z = 5
3x + 4y + z = 7
Answer
(a) The data table is not reproduced in the question, so the method is given in general form with a worked example.
For data , , fit by minimising . Setting gives the normal equations
Example: and : , , , , .
The fitted line is .
(b) LU factorization (Doolittle)
Without row exchange the second pivot would be , so interchange equations 2 and 3. The system becomes , .
with
(Check: row 2 of : , ; row 3: , .)
Forward substitution : , , .
Back substitution :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 10 marks
a) Write and implement an algorithm to solve the system of linear equations using Gauss-Seidel method with suitable example.
b) Write a program to solve the ordinary differentia; equations using Heun's method.
Answer
(a) Gauss-Seidel method
For with diagonally dominant, rewrite equation as
Algorithm
- Read , the matrix , vector , tolerance , maximum iterations .
- Set all .
- For to :
- For each : ; compute the new using the formula (with the latest values); record .
- If the maximum change , stop.
- Print .
Program (C)
#include <stdio.h>
#include <math.h>
int main() {
int n, i, j, k, maxit;
double a[10][10], b[10], x[10] = {0}, s, old, err, eps;
printf("Enter n: ");
scanf("%d", &n);
printf("Enter augmented matrix rows (a1..an b):\n");
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) scanf("%lf", &a[i][j]);
scanf("%lf", &b[i]);
}
printf("Enter tolerance and max iterations: ");
scanf("%lf %d", &eps, &maxit);
for (k = 1; k <= maxit; k++) {
err = 0;
for (i = 0; i < n; i++) {
s = b[i];
for (j = 0; j < n; j++)
if (j != i) s -= a[i][j] * x[j];
old = x[i];
x[i] = s / a[i][i];
if (fabs(x[i] - old) > err) err = fabs(x[i] - old);
}
if (err < eps) break;
}
printf("Solution after %d iterations:\n", k);
for (i = 0; i < n; i++) printf("x%d = %.5f\n", i + 1, x[i]);
return 0;
}
Example: . Starting from the iterates are , , , and so on, converging to .
(b) Heun's method
For , :
#include <stdio.h>
#include <math.h>
double f(double x, double y) {
return x + y; /* change as required */
}
int main() {
double x0, y0, xn, h, k1, k2, yp;
int n, i;
printf("Enter x0, y0, xn and number of steps n: ");
scanf("%lf %lf %lf %d", &x0, &y0, &xn, &n);
h = (xn - x0) / n;
printf("x\t\ty\n%f\t%f\n", x0, y0);
for (i = 0; i < n; i++) {
k1 = f(x0, y0);
yp = y0 + h * k1; /* predictor (Euler) */
k2 = f(x0 + h, yp);
y0 = y0 + h / 2 * (k1 + k2); /* corrector (average slope) */
x0 = x0 + h;
printf("%f\t%f\n", x0, y0);
}
return 0;
}
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Explain absolute and relative error. Find the relative error of number 5.6 if both of its digits are correct.
Answer
Absolute error is the magnitude of the difference between the true value and the approximate value :
Relative error is the absolute error compared to the true value: It has no units and may be quoted as a percentage ().
Number 5.6 with both digits correct. If both digits are correct, the number is correct to one decimal place, so the maximum absolute error is half a unit of the last place:
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
On what type of equations Newton's methods can be applicable. Justify.
Answer
The Newton-Raphson iteration is applicable to equations that satisfy the following:
- is algebraic or transcendental (polynomial, trigonometric, exponential, logarithmic), e.g. or ;
- is continuous and differentiable near the root, so that can be evaluated;
- near the root (a simple root), because appears in the denominator;
- a reasonably good initial guess exists, close enough that in the neighbourhood, which guarantees convergence.
Justification. The formula comes from the tangent line at (first-order Taylor expansion), which needs the derivative to exist; the tangent's intercept with the -axis is the next approximation. For a simple root the convergence is quadratic, , so it is very fast. It does not work well for multiple roots ( at the root), non-differentiable functions or a poor starting point.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Write a program to compute integral 0∫x/2 √sinx dx Simpson's 1/3 rule.
Answer
The integral is (the upper limit is read as ). Simpson's 1/3 rule with an even number of sub-intervals, :
Program (C)
#include <stdio.h>
#include <math.h>
double f(double x) {
return sqrt(sin(x));
}
int main() {
double a = 0.0, b = M_PI / 2, h, sum, I;
int n, i;
printf("Enter even number of sub-intervals n: ");
scanf("%d", &n);
if (n % 2 != 0) {
printf("n must be even\n");
return 1;
}
h = (b - a) / n;
sum = f(a) + f(b);
for (i = 1; i < n; i++) {
if (i % 2 == 1)
sum += 4 * f(a + i * h);
else
sum += 2 * f(a + i * h);
}
I = h / 3 * sum;
printf("Integral = %.6f\n", I);
return 0;
}
For the program prints about (the true value is ; the small difference is due to the infinite slope of at , and the result improves as increases).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Using Runge-Kutta method of 4th order solve the following equation taking each step h = 0.1 dydx=4xy - xy given y(0) = 3.3 calculate y at x = 0.1 and 0.2.
Answer
The right-hand side is read literally as , with , .
Step 1 ():
Step 2 ():
(The exact solution gives and .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Solve the laplace equation Uxx + Uyy = 0 for the following square mesh with the boundary values.
Answer
Laplace equation by finite differences (Liebmann's method). Replacing by central differences on a square mesh () gives the standard five-point formula
so every interior value is the average of its four neighbours.
Worked mesh. Take a mesh with interior points (top row) and (bottom row), boundary value along the top edge and along the other three edges.
By symmetry and :
Hence and . (For a different boundary diagram, substitute its boundary values in the same four equations; they can be solved directly or by repeated averaging until values stop changing.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 10 marks
Solve the given set of linear equations using Dolittle LU decomposition method:
3x 1 + 2x 2 + x 3 = 10
2x 1 + 3x 2 + 2x 3 = 14
3x 1 + 2x 2 + 3x 3 = 14
Answer
Write with unit lower triangular (Doolittle).
Forward substitution , :
Back substitution :
Solution: . Check: , , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 10 marks
Define initial value problems and final value problems. Using heun’s method, find value of y when x=0.3 given that dydx = x + y and y=1 when x=0.
Answer
Initial value problem (IVP). A differential equation together with conditions on the unknown function given at a single starting point, e.g. . The solution is marched forward from .
Final value (boundary value) problem. The conditions are specified at more than one point (e.g. at both ends and , or at the final point), such as . It cannot be marched directly from one end.
Heun's method. Predictor and corrector:
Here , , ; take (three steps to reach ).
Step 1 (): , ,
Step 2 (): , ,
Step 3 (): , ,
So (exact value ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 10 marks
How can x we use Laterpolation techniques (methods) to approximate the value of the integral for the functions whose antiderivative can't be found? Explain. Write a program to solve sin x - 2x + 1 = 0 using Bisection method.
Answer
Numerical integration by interpolation. When the antiderivative of cannot be found in closed form (e.g. ), we replace by an interpolating polynomial through the tabulated points and integrate that instead:
Polynomials are easy to integrate exactly. With equally spaced nodes this gives the Newton-Cotes formulas: a degree-1 polynomial gives the trapezoidal rule , degree 2 gives Simpson's 1/3 rule , degree 3 gives Simpson's 3/8 rule. Joining many sub-intervals gives the composite rules, whose error falls as decreases.
Program (C): bisection for . , , so a root lies in .
#include <stdio.h>
#include <math.h>
double f(double x) { return sin(x) - 2*x + 1; }
int main() {
double a = 0, b = 1, c, tol = 0.00001;
if (f(a) * f(b) > 0) {
printf("Root not bracketed\n");
return 0;
}
do {
c = (a + b) / 2;
if (f(a) * f(c) < 0) b = c;
else a = c;
} while (fabs(b - a) > tol);
c = (a + b) / 2;
printf("Root = %.5f\n", c);
return 0;
}
The program prints a root of about .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
What do you mean by true error? Find a positive root of equation , which lies between 0 and 1 using bisection method.
Answer
True error. The difference between the exact (true) value and the approximate value: . Its ratio to the true value, as a percentage, is the relative true error.
Bisection for on . , , . The positive root is exactly , at the upper end of the interval, and bisection approaches it:
| n | a | b | c=(a+b)/2 | f(c) |
|---|---|---|---|---|
| 1 | 0 | 1 | 0.5 | -0.75 |
| 2 | 0.5 | 1 | 0.75 | -0.4375 |
| 3 | 0.75 | 1 | 0.875 | -0.2344 |
| 4 | 0.875 | 1 | 0.9375 | -0.1211 |
| 5 | 0.9375 | 1 | 0.96875 | -0.0615 |
Since at every step, keeps moving to and the midpoints tend to . The root is (true error ; after 5 steps the error is already about ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
Solve the following system of equations by Gauss elimination method.
Answer
Augmented matrix:
Forward elimination. , :
:
so .
Back substitution.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
Write a program to compute value of when such that with and using Euler's method.
Answer
Euler's method: with , , , ; four steps reach .
#include <stdio.h>
double f(double x, double y) { return 3*x*x + 1; }
int main() {
double x = 1, y = 2, h = 0.25, xn = 2;
printf("x\ty\n%.2f\t%.5f\n", x, y);
while (x < xn - 1e-9) {
y = y + h * f(x, y);
x = x + h;
printf("%.2f\t%.5f\n", x, y);
}
printf("y(%.1f) = %.5f\n", xn, y);
return 0;
}
Output of the iteration:
| x | y |
|---|---|
| 1.00 | 2.00000 |
| 1.25 | 3.00000 |
| 1.50 | 4.42188 |
| 1.75 | 6.35938 |
| 2.00 | 8.90625 |
So (the exact value gives ; the difference is Euler's truncation error for ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
Find the largest Eigen value and corresponding Eigen vector of the following matrix using power method.
Answer
Start with and repeatedly compute , dividing by the largest component.
The scale factor stays at and the third component tends to .
Largest eigenvalue , with eigenvector .
Check: . (The other eigenvalues are , so convergence is geometric with ratio .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 10 marks
What do you mean by ill condition? Solve the following system using Jacobi iteration method.
Answer
Ill-conditioned system. A system is ill-conditioned when a small change in the coefficients or in (or a small rounding error) causes a large change in the solution. The coefficient matrix is nearly singular (determinant close to zero, large condition number ). Example: has solution but gives .
Jacobi iteration. Rewrite each equation for its diagonal unknown and use only the previous iterate:
Start with :
| k | a | b | c |
|---|---|---|---|
| 1 | 2.5 | 3.0 | 2.0 |
| 2 | 0.0 | 0.7 | 0.0 |
| 3 | 2.15 | 3.0 | 1.825 |
| 4 | 0.0875 | 0.98 | 0.175 |
| 5 | 1.9225 | 2.8775 | 1.7112 |
| 6 | 0.2056 | 1.162 | 0.3194 |
| 7 | 1.7593 | 2.7489 | 1.6067 |
The system is only weakly diagonally dominant, so the iterates oscillate and converge slowly towards the exact solution
which satisfies all three equations (, , ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 10 marks
How interpolation is differ from regression? Write down algorithm and program for Lagrange interpolation polynomial.
Answer
Interpolation vs regression.
| Interpolation | Regression (curve fitting) |
|---|---|
| The curve passes exactly through every given data point | The curve follows the general trend and need not pass through any point |
| Used when data are accurate (tabulated values) | Used when data contain noise or experimental error |
| Degree of polynomial depends on number of points ( points, degree ) | Degree chosen independently, usually much smaller than the number of points |
| Estimates values between the given points | Gives a best-fit model by minimising the sum of squared errors |
Lagrange interpolation. For points , :
Algorithm.
- Read , the data points and the value to interpolate.
- Set .
- For to : set ; for to , : ; then .
- Print as .
Program (C).
#include <stdio.h>
int main() {
int n, i, j;
float x[20], y[20], xp, term, sum = 0;
printf("Enter number of points: ");
scanf("%d", &n);
printf("Enter x and y values:\n");
for (i = 0; i < n; i++)
scanf("%f %f", &x[i], &y[i]);
printf("Enter x to interpolate: ");
scanf("%f", &xp);
for (i = 0; i < n; i++) {
term = y[i];
for (j = 0; j < n; j++)
if (j != i)
term *= (xp - x[j]) / (x[i] - x[j]);
sum += term;
}
printf("f(%.3f) = %.4f\n", xp, sum);
return 0;
}
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 10 marks
What is fixed point iteration method? How it converge the root of non-linear equation? Find the root of equation using N-R method.
Answer
Fixed point iteration. To solve , rewrite it as and iterate
from an initial guess . A solution is a fixed point of .
Convergence. If and are continuous near the root and for all in an interval around containing , then the iterates converge to , since the error satisfies . The smaller , the faster the convergence (linear, order 1); if it diverges.
Newton-Raphson for .
Take :
| n | x_n | f(x_n) | f'(x_n) | x_{n+1} |
|---|---|---|---|---|
| 0 | 0 | 2 | -3 | 0.6667 |
| 1 | 0.6667 | 0.4444 | -1.6667 | 0.9333 |
| 2 | 0.9333 | 0.0711 | -1.1333 | 0.9961 |
| 3 | 0.9961 | 0.0039 | -1.0078 | 0.99998 |
The iterates converge to the root . (The other root, , is obtained from a starting value such as ; indeed .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2026 · 5 marks
Explain different types of errors in numerical computation with examples.
Answer
An error is the difference between the exact value and the value obtained in computation. The main types are:
- Inherent (input) error. Error already present in the data, due to faulty measurement or approximate input. Example: using or a length measured as cm when it is really cm.
- Round-off error. Caused by representing numbers with a finite number of digits (rounding or chopping). Example: stored to four digits; the error is round-off error. It accumulates over many operations.
- Truncation error. Caused by cutting off an infinite process after finitely many terms. Example: ignores the remaining terms; replacing a derivative by a finite difference.
- Blunders (gross errors). Human or programming mistakes, such as a wrong formula or a transposed digit.
- Modelling error. Error from simplifying assumptions in the mathematical model (e.g. ignoring air resistance).
Measures of error.
- Absolute error:
- Relative error:
- Percentage error:
Example: for true value and approximation , , , i.e. .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2026 · 5 marks
Apply Bisection Method to find a real root of x³ − x − 1 = 0 correct up to three decimal places.
Answer
Let . and , so a root lies in .
| n | a | b | c=(a+b)/2 | f(c) |
|---|---|---|---|---|
| 1 | 1 | 2 | 1.5 | 0.875 |
| 2 | 1 | 1.5 | 1.25 | -0.2969 |
| 3 | 1.25 | 1.5 | 1.375 | 0.2246 |
| 4 | 1.25 | 1.375 | 1.3125 | -0.0515 |
| 5 | 1.3125 | 1.375 | 1.34375 | 0.0826 |
| 6 | 1.3125 | 1.34375 | 1.32813 | 0.0146 |
| 7 | 1.3125 | 1.32813 | 1.32031 | -0.0187 |
| 8 | 1.32031 | 1.32813 | 1.32422 | -0.0021 |
| 9 | 1.32422 | 1.32813 | 1.32617 | 0.0062 |
| 10 | 1.32422 | 1.32617 | 1.32520 | 0.0020 |
| 11 | 1.32422 | 1.32520 | 1.32471 | -0.00005 |
The interval is now , of width below , so the root correct to three decimal places is
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2026 · 5 marks
Derive Newton’s forward interpolation formula.
Answer
Let be given at equally spaced points , , with . The forward difference operator is , and , so .
Let , i.e. . Then
Expand by the binomial theorem:
Hence Newton's forward interpolation formula:
It is a polynomial of degree passing through the points, and is best used for near the beginning of the table.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2026 · 5 marks
Solve dx/dy=x+y, y(0) = 1 using Euler’s method (h = 0.1) for x = 0.1.
Answer
The equation is read as with , (the given is a misprint for ).
Euler's method: .
So . (The exact solution gives .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2026 · 5 marks
Apply Trapezoidal rule to evaluate a definite integral.
Answer
Trapezoidal rule. To evaluate , divide into equal sub-intervals of width , with and . On each sub-interval the curve is replaced by a straight line, so the area is a trapezium of area . Summing:
The error is of order : .
Example. Evaluate with , .
| x | 0 | 0.25 | 0.5 | 0.75 | 1 |
|---|---|---|---|---|---|
| y | 1 | 0.94118 | 0.8 | 0.64 | 0.5 |
The exact value is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2026 · 10 marks
Explain Shooting Method for boundary value problems with algorithm.
Answer
Boundary value problem (BVP). A second-order differential equation whose conditions are given at two points:
Shooting method. The BVP is converted into an initial value problem (IVP) by guessing the missing initial slope. Treat the slope as an unknown, solve the IVP
up to (using Runge-Kutta or Euler on the equivalent first-order system ), and obtain . The aim is to choose so that the "shot" lands on the target:
This is a root-finding problem in , solved by the secant method, bisection or Newton's method. For a linear BVP, is linear in , so two shots suffice:
Algorithm.
- Read , step size , tolerance .
- Choose two initial guesses for .
- For each guess, solve the IVP with , from to , and record , .
- Compute the new slope by the secant formula
- Solve the IVP with and compute .
- If , stop; the last IVP solution is the required solution of the BVP. Otherwise set and go to step 4.
Remarks. It is simple and reuses IVP solvers, but may be unstable for stiff problems or when the solution is very sensitive to ; then the finite difference method or multiple shooting is preferred.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2026 · 10 marks
Differentiate between Interpolation and approximation with their significances. Derive the formula for Simpson’s (3/8) composite formula.
Answer
Interpolation vs approximation.
| Interpolation | Approximation |
|---|---|
| Constructs a function that passes exactly through all the given data points | Constructs a simpler function that is close to the data or to over an interval, not necessarily through the points |
| Used for accurate tabulated data; estimates values between points | Used for noisy data or to replace a complicated function; fits by least squares or minimax |
| Degree grows with number of points | Degree chosen freely and kept low |
| Error is zero at the nodes | Error is small overall but non-zero everywhere |
Significance: interpolation fills gaps in tables, and underlies numerical differentiation and integration. Approximation smooths experimental data, predicts trends, and replaces functions that are expensive to evaluate.
Simpson's 3/8 composite rule. Fit a cubic through four points (). Using Newton's forward formula with , :
Using , , :
Substituting , , :
(The coefficient of is ; of : , and so on.)
Composite form. For sub-intervals ( a multiple of 3), , apply the rule to each block of three sub-intervals and add. Interior nodes that are multiples of 3 are shared by two blocks and get weight ; the others get weight :
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from TU BCA 2020 Fourth Semester Operating System (TU board exam, 2020), TU BCA 2021 Fourth Semester Operating System (TU board exam, 2021), TU BCA 2022 Fourth Semester Operating System (TU board exam, 2022), TU BCA 2023 Fourth Semester Operating System (TU board exam, 2023), TU BCA 2024 Fourth Semester Operating System (TU board exam, 2024), TU BCA 2025 Fourth Semester Operating System (TU board exam, 2025), TU BCA 2026 Fourth Semester Operating System (TU board exam, 2026), TU BCA 2020 Fourth Semester Database Management System (TU board exam, 2020), TU BCA 2021 Fourth Semester Database Management System (TU board exam, 2021), TU BCA 2022 Fourth Semester Database Management System (TU board exam, 2022), TU BCA 2023 Fourth Semester Database Management System (TU board exam, 2023), TU BCA 2024 Fourth Semester Database Management System (TU board exam, 2024), TU BCA 2025 Fourth Semester Database Management System (TU board exam, 2025), TU BCA 2026 Fourth Semester Database Management System (TU board exam, 2026), TU BCA 2020 Fourth Semester Software Engineering (TU board exam, 2020), TU BCA 2021 Fourth Semester Software Engineering (TU board exam, 2021), TU BCA 2022 Fourth Semester Software Engineering (TU board exam, 2022), TU BCA 2023 Fourth Semester Software Engineering (TU board exam, 2023), TU BCA 2024 Fourth Semester Software Engineering (TU board exam, 2024), TU BCA 2025 Fourth Semester Software Engineering (TU board exam, 2025), TU BCA 2026 Fourth Semester Software Engineering (TU board exam, 2026), TU BCA 2020 Fourth Semester Numerical Method (TU board exam, 2020), TU BCA 2021 Fourth Semester Numerical Method (TU board exam, 2021), TU BCA 2022 Fourth Semester Numerical Method (TU board exam, 2022), TU BCA 2023 Fourth Semester Numerical Method (TU board exam, 2023), TU BCA 2024 Fourth Semester Numerical Method (TU board exam, 2024), TU BCA 2025 Fourth Semester Numerical Method (TU board exam, 2025), TU BCA 2026 Fourth Semester Numerical Method (TU board exam, 2026), TU BCA 2019 Fourth Semester Scripting Language (TU board exam, 2019), TU BCA 2020 Fourth Semester Scripting Language (TU board exam, 2020), TU BCA 2021 Fourth Semester Scripting Language (TU board exam, 2021), TU BCA 2022 Fourth Semester Scripting Language (TU board exam, 2022), TU BCA 2023 Fourth Semester Scripting Language (TU board exam, 2023), TU BCA 2024 Fourth Semester Scripting Language (TU board exam, 2024), TU BCA 2025 Fourth Semester Scripting Language (TU board exam, 2025) and TU BCA 2026 Fourth Semester Scripting Language (TU board exam, 2026). Answers are written for this site; check them against your class notes.