0% found this document useful (0 votes)
2 views

Python_key

The document provides a comprehensive overview of linear systems, including their definition, mathematical representation, and methods for solving them, such as Gauss elimination. It also covers the use of Python for solving linear equations, computing eigenvalues and eigenvectors, and applications of linear regression in Metallurgy and Materials Engineering. Additionally, it discusses interpolation methods and the Taylor series for computing sine values.

Uploaded by

Sekhar Sankuri
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Python_key

The document provides a comprehensive overview of linear systems, including their definition, mathematical representation, and methods for solving them, such as Gauss elimination. It also covers the use of Python for solving linear equations, computing eigenvalues and eigenvectors, and applications of linear regression in Metallurgy and Materials Engineering. Additionally, it discusses interpolation methods and the Taylor series for computing sine values.

Uploaded by

Sekhar Sankuri
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. a) what is linear system and how is it mathematically represented.

(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.

2. -5a+3b+4c=9; 2a+5b+6c=7; 38a+8b+20c=3


a) Use Python to solve above three equations using numpy.linalg.solve
(3marks)
Correct representation of the system in matrix form – 1 Mark
 Defining coefficient matrix A and constant vector B.
Use of numpy.linalg.solve function – 1 Mark
 Correct function call and obtaining the solution– 1 Mark
 Proper execution of the Python script and correct numerical result.
b) write python code to do the same with pseudo inverse using only matrix
multiplication and traditionsl inversion. (donot use 'pinv') (3marks)
Correct formulation of the pseudo-inverse using matrix multiplication – 1 Mark
 Computing the inverse of ATA and multiplying with ATAB
 Implementation using numpy functions – 1 Mark
 Using np.linalg.inv() and matrix multiplication (@ operator or np.dot).
Correct Output – 1 Mark
 Proper execution and correct numerical result matching (a).
3. a) How do you compute the eigen values and eigen vectors for the matrix A in
above question.2 using the python built-in-function.(3marks)
Computing Eigenvalues and Eigenvectors using Python – 3 Marks
Definition of eigenvalues and eigenvectors – 1 Mark
a. Explanation of the mathematical concept: Av=λv
Use of numpy.linalg.eig() function – 1 Mark
b. Correct function usage to compute eigenvalues and eigenvectors.
Correct Python implementation and output interpretation – 1 Mark
c. Example implementation with proper output.

b) illustrate some basic applications of linear regression in Metallurgy and Materials


Engineering Department (3marks)
Application in predicting material properties, process optimization, failure analysis (e.g.,
strength, hardness, fatigue life, heat treatment, alloy composition analysis, crack growth
prediction, corrosion rate estimation) – 3x1=3 Mark

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

You might also like