Python_key
Python_key
(3Marks)
Definition of a Linear System – 1 Mark
A system where the output is a linear function of the input.
Explanation of linearity properties: superposition (additivity and
homogeneity).
Mathematical Representation – 2 Marks
General form of a linear system: Ax = b, where:
o A is a coefficient matrix (1 Mark)
o x is the unknown variable vector, and b is the result vector (1 Mark)
b) Explain Gauss elimination method for solving linear systems by taking an
example ( 3marks)
Explanation of Gauss Elimination Method – 1 Mark
Definition and purpose of the method (converting a system into upper triangular form
and solving using back-substitution).
Step-by-Step Procedure – 1 Mark
Forward elimination process (transforming the coefficient matrix).
Back-substitution to find the solution.
Example with Solution – 1 Mark
A simple example (e.g., 2×2 or 3×3 system) with key elimination steps.
4. Given a set of points like (x1,y1), (x2,y2),(x3,y3) now illustrates the process of
computing y value for an x living between x1 and x2 using i) linear interpolations
(3marks)
Formula explanation: y=y1+(y2−y1)(x2−x1)(x−x1)– 1 Mark
Step-by-step interpolation process – 1 Mark
Example with numerical substitution – 1 Mark
ii) cubic spline(3marks)
Concept explanation of cubic splines (piecewise polynomial fitting) – 1 Mark
Step-by-step explanation of setting up equations for spline interpolation – 1 Mark
Example illustrating cubic spline application – 1 Mark
5. a.) Compute sin (pi/45) using taylor series assuming a=0 (3marks)
Computing sin(π/45) using Taylor Series (assume a=0) – 4 Marks
Taylor series expansion of sin(x)=0 at x=0 1Marks
Sin(x)= x-(x3/3!)+ (x5/5!)- (x7/7!)+…..
1. Computing sin(π/45) up to reasonable accuracy (at least 4 terms) – 1 Mark
2. Python implementation using loops or recursion – 1 Mark
3. Correct output comparison with built-in function (math.sin()) – 1 Mark
(b) Identifying the Integer Whose Cube is Closest to a Given Roll Number – 2 Marks
1. Correct implementation of cube root rounding (round(n**(1/3))) – 1 Mark
2. Comparison of results to determine the closest integer – 1 Mark