Menu

Computational Mathematics [ Lab Programs ]


triangle using for loop

Aim:

 
UNIT - I: Eigen values and Eigenvectors:
Programs:
      • Finding real and complex Eigen values.
      • Finding Eigen vectors.

Solution :

PROGRAM: (Eigen_Values_Vectors.py)

 
import sympy as sp

# Define matrix (you can change values)
A = sp.Matrix([[1, 2],
               [5, 4]])

# Eigenvalues and eigenvectors
eigen_data = A.eigenvects()

print("Eigenvalues and Eigenvectors:\n")

for val, mult, vecs in eigen_data:
    print("Eigenvalue:", val)
    print("Eigenvector:", vecs[0])
    print()


OUTPUT:

 
Eigenvalues and Eigenvectors:

Eigenvalue: -1
Eigenvector: Matrix([[-1], [1]])

Eigenvalue: 6
Eigenvector: Matrix([[2/5], [1]])




Related Content :

1.
UNIT - I: Eigen values and Eigenvectors:
Programs:
      • Finding real and complex Eigen values.
      • Finding Eigen vectors.    View Solution


2.
UNIT - II: Solution of Algebraic and Transcendental Equations:
Bisection method, Newton Raphson Method
Programs:
      • Root of a given equation using Bisection method.
      • Root of a given equation Newton Raphson Method.    View Solution


3.
UNIT-III: Linear system of equations:
Jacobi's iteration method and Gauss-Seidal iteration method
Programs:
      • Solution of given system of linear equations using Jacobi's method.
      • Solution of given system of linear equations using Gauss-Seidal method.    View Solution


4.
UNIT-IV: First-Order ODEs:
Exact and non-exact equations, Applications: exponential growth/decay, Newton's law of cooling.
Programs:
      • Solving exact and non-exact equations.
      • Solving exponential growth/decay and Newton's law of cooling problems.    View Solution


5.
UNIT-V: Higher order linear differential equations with constant coefficients:
Programs:
      • Solving homogeneous ODEs.
      • Solving non-homogeneous ODEs.    View Solution